emacs-devel
[Top][All Lists]
Advanced

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

Re: 23.0.60; [nxml] BOM and utf-8


From: Mark A. Hershberger
Subject: Re: 23.0.60; [nxml] BOM and utf-8
Date: Sat, 17 May 2008 16:38:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Patrick Drechsler <address@hidden> writes:

> is the attached xml file (simple.xml) really invalid (as indicated by
> nxhtml) or is this a bug in nxhtml?

The file simple.xml is really invalid.

http://www.w3.org/TR/2006/REC-xml-20060816/#sec-prolog-dtd

The XML spec gives the following syntax description for the prolog of an
XML file (I've only copied the relevant parts):

    [3]    S        ::=  (#x20 | #x9 | #xD | #xA)+
    [22]   prolog   ::=  XMLDecl? Misc* (doctypedecl  Misc*)?
    [23]   XMLDecl  ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

Note that there is no S before the literal “<?xml" and that "<?xml" is
optional.

So, yes, an file that contains whitespace before "<?xml" is invalid XML.

-- 
http://hexmode.com/
GPG Fingerprint: 7E15 362D A32C DFAB E4D2  B37A 735E F10A 2DFC BFF5

Ideas create idols; only wonder leads to knowing.
    -- St. Gregory of Nyssa

Attachment: pgp8H306bHhPu.pgp
Description: PGP signature


reply via email to

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