[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic question on choosing nxml-mode schema

From: Yuri Khan
Subject: Re: Basic question on choosing nxml-mode schema
Date: Wed, 9 Nov 2016 15:38:04 +0600

On Wed, Nov 9, 2016 at 4:06 PM,  <> wrote:

>> I want to use nxml-mode to edit a document using reveal-js. The sample 
>> documents they use in the tutorials begins:
>> nxml-mode has a problem with most aspects of this: the initial tag is 
>> "unknown markup declaration", the
>> html tag is 'missing xmlns="";', the charset is 
>> "Attribute not allowed", etc.
>> If I replace this header stuff with a more-usual
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> then this works, but then later in the document, each "slide" is contained 
>> in <section> tags, and these show up as "Unknown element".
> 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.

HTML5 in fact defines an HTML serialization and an XHTML
serialization, which are equally valid and largely equivalent (except
for a few minor points). All major browsers support the XHTML
serialization in their current versions[1].


You can author your document in XHTML serialization using nxml.

However, the xhtml schema bundled with nxml is that of XHTML 1.0, not
XHTML5. It does not know about <section> or <nav> or any other
newfangled elements of HTML5.

You’d need to either clone and extend the XHTML 1.0 schema to make it
accept XHTML5 on your own, or obtain schema files from somebody who
already walked this path. This thread[2] of half a year ago and this
repository[3] over at Github might help you in that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]