[Top][All Lists]
[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
pgp8H306bHhPu.pgp
Description: PGP signature
- 23.0.60; [nxml] BOM and utf-8, Patrick Drechsler, 2008/05/17
- Re: 23.0.60; [nxml] BOM and utf-8, Lennart Borgman (gmail), 2008/05/17
- Re: 23.0.60; [nxml] BOM and utf-8,
Mark A. Hershberger <=
- Re: 23.0.60; [nxml] BOM and utf-8, tomas, 2008/05/22
- Re: 23.0.60; [nxml] BOM and utf-8, Miles Bader, 2008/05/22
- Re: 23.0.60; [nxml] BOM and utf-8, Jason Rumney, 2008/05/22
- Re: 23.0.60; [nxml] BOM and utf-8, tomas, 2008/05/27
- Re: 23.0.60; [nxml] BOM and utf-8, Stephen J. Turnbull, 2008/05/22