From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Basic question on choosing nxml-mode schema Date: Wed, 9 Nov 2016 10:06:38 +0100 Message-ID: <20161109090638.GF17359@tuxteam.de> References: <1447994335.988177.1478636797036.ref@mail.yahoo.com> <1447994335.988177.1478636797036@mail.yahoo.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1478682468 13083 195.159.176.226 (9 Nov 2016 09:07:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 Nov 2016 09:07:48 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 09 10:07:44 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4Oqg-0007hp-5k for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Nov 2016 10:07:14 +0100 Original-Received: from localhost ([::1]:37968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4Oqj-00073v-85 for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Nov 2016 04:07:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4OqG-00073p-B0 for help-gnu-emacs@gnu.org; Wed, 09 Nov 2016 04:06:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4OqC-0001cu-8P for help-gnu-emacs@gnu.org; Wed, 09 Nov 2016 04:06:48 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:48812 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4OqC-0001cl-2M for help-gnu-emacs@gnu.org; Wed, 09 Nov 2016 04:06:44 -0500 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1c4Oq7-0004ug-07 for help-gnu-emacs@gnu.org; Wed, 09 Nov 2016 10:06:39 +0100 In-Reply-To: <1447994335.988177.1478636797036@mail.yahoo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111695 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, Nov 08, 2016 at 08:26:37PM +0000, Dr. Jennifer Nussbaum wrote: > Hi, this question is probably more about understanding HTML than about nxml-mode. I don't use HTML often and don't keep up to date with web design. But: > > I want to use nxml-mode to edit a document using reveal-js. The sample documents they use in the tutorials begins: > > --- > > > > > Reveal.js 3 Slide Demo... > --- > > nxml-mode has a problem with most aspects of this: the initial tag is "unknown markup declaration", the > html tag is 'missing xmlns="http://www.w3.org/1999/xhtml"', the charset is "Attribute not allowed", etc. > > If I replace this header stuff with a more-usual > > --- > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > > > --- > > then this works, but then later in the document, each "slide" is contained in
tags, and these show up as "Unknown element". > > I assume that I just don't understand what format this document is > (or should be) in, but how do I figure this out, and what schema > do I use to process it? I don't care so much about auto-completion, > I just don't want a good document to show up as "invalid" and have > non-errors highlighted. I can't help you very much on that, since I have little practical experience wih Emacs and HTML. But here are a few points: What you are seeing is most probably a HTML document (it looks like HTML5 [1]), which is *not* XML. It looks a bit like XML. It seems that after a phase trying to nudge HTML towards XML conformance, the trend these days is in the opposite direction. The header stuff you insert is declaring that the thing is XHTML (which *is* xml). A confused nxml (or well: an angry nxml: "this thing is full of errors") is to be expected then. I don't know whether nxml-mode can be coerced to "do" html; perhaps it can only cope with xml (and thus wih XHTML). Sorry for only saying what *doesn't* work. Perhaps more knowledgeable folks can remedy that :-) regards [1] https://en.wikipedia.org/wiki/HTML5 - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlgi5x4ACgkQBcgs9XrR2kb1jQCfTq2ZgkP24LrUmfNYfwL9ULLk RIQAnjfMoOIBYS/lhieblgCXlLconrH0 =UCTt -----END PGP SIGNATURE-----