logo       

Re: making mozilla's xml to behave in a non-standard way: msg#00035

mozilla.devel.xml

Subject: Re: making mozilla's xml to behave in a non-standard way

Matthew Wilson wrote:
>
> 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

There is good sense in this. It allows for automatic detection of Litte
Endian vs Big Endian and UTF-8 vs UTF-16 character sets.

Lejo.
--
Lejo | Eenvoud is het kenmerk van het ware.
|
| Antwoord graag in de nieuwsgroep.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise