all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Basic question on choosing nxml-mode schema
Date: Wed, 9 Nov 2016 10:06:38 +0100	[thread overview]
Message-ID: <20161109090638.GF17359@tuxteam.de> (raw)
In-Reply-To: <1447994335.988177.1478636797036@mail.yahoo.com>

-----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:
> 
> ---
> <!doctype html>
> <html lang="en"> 
> <head>
>   <meta charset="utf-8">
>   <title>Reveal.js 3 Slide Demo</title>...
> ---
> 
> 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"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> 
> <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
> <head>---
> 
> then this works, but then later in the document, each "slide" is contained in <section> 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-----



  reply	other threads:[~2016-11-09  9:06 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 [this message]
2016-11-09  9:38     ` Yuri Khan
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

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

  git send-email \
    --in-reply-to=20161109090638.GF17359@tuxteam.de \
    --to=tomas@tuxteam.de \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.