unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Basic question on choosing nxml-mode schema
Date: Wed, 9 Nov 2016 15:38:04 +0600	[thread overview]
Message-ID: <CAP_d_8VOZ_GPzDhHxh41ZeO6hFFD7XcKBp1ZDKuL+ROzvvyjrQ@mail.gmail.com> (raw)
In-Reply-To: <20161109090638.GF17359@tuxteam.de>

On Wed, Nov 9, 2016 at 4:06 PM,  <tomas@tuxteam.de> 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="http://www.w3.org/1999/xhtml"', 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].

[1]: http://caniuse.com/#search=xhtml

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.

[2]: https://lists.gnu.org/archive/html/help-gnu-emacs/2016-03/msg00204.html
[3]: https://github.com/hober/html5-el



  reply	other threads:[~2016-11-09  9:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1447994335.988177.1478636797036.ref@mail.yahoo.com>
2016-11-08 20:26 ` Basic question on choosing nxml-mode schema Dr. Jennifer Nussbaum
2016-11-09  9:06   ` tomas
2016-11-09  9:38     ` Yuri Khan [this message]
2016-11-09 19:58       ` Stefan Monnier
2016-11-10 14:37         ` Dr. Jennifer Nussbaum
2016-11-10 17:05           ` Stefan Monnier
2016-11-09 21:02       ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP_d_8VOZ_GPzDhHxh41ZeO6hFFD7XcKBp1ZDKuL+ROzvvyjrQ@mail.gmail.com \
    --to=yuri.v.khan@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).