Re: making mozilla's xml to behave in a non-standard way
Matthew Wilson <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 14 Jul 2004 22:30:24 +0200, "@(none)" <""olivier\"@(none)"> wrote: >I do not know which MS/Sun/whatsover developper launched the fashion of >rejecting white spaces at the beginning of XML documents, but clearly it >is a way to make some brand reject other implementations. If you look at "The Annotated XML Specification" at http://www.xml.com/axml/testaxml.htm , by Tim Bray, one of the editors of the specification, has the following annotation: "The XML Declaration Must Come First As the text makes clear, the XML declaration or the text declaration (if you have one) has to be the first thing in the entity (if you're not up on entities yet, assume for the moment that an entity is a file). This does not mean the first non-blank thing in the entity, it means right at the front of the entity; the first bytes a program gets when it opens the file and starts reading." This is linked from section 2.8, from the (T) icon in the definition of prolog: [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? In other words, whitespace before the XML declaration is not allowed. Matthew Wilson