W3C home > Mailing lists > Public > xml-editor@w3.org > January to March 2005

Re: Syntactical incorrect example for Encoding Declaration in XML 1.1 Recommendation

From: François Yergeau <francois@yergeau.com>
Date: Wed, 09 Mar 2005 15:24:55 -0800
To: Arvid Hülsebus <arvid.huelsebus@atanion.com>
Cc: xml-editor@w3.org
Message-id: <422F85C7.40204@yergeau.com>

Arvid Hülsebus a écrit :
> I just wanted to copy an example for an Encoding Declaration (section 
> 4.3.3, http://www.w3.org/TR/xml11/#NT-EncodingDecl). My XML parser 
> noticed the missing Version Info attributes. Perhaps it would be a good 
> idea to include these in the example. This would result in something 
> like this:
> 
> <?xml version='1.1' encoding='UTF-8'?>
> <?xml version='1.1' encoding='EUC-JP'?>

You are confusing the encoding declaration (production [80]), the text 
declaration (production [77]) and the XML declaration (production [23]).

The encoding declaration is an optional part of either the text 
declaration or the XML declaration.  The XML declaration must have the 
version info pseudo-attribute, but it is optional in the text 
declaration.  The examples at the end of 4.3.3 are, as the paragraph 
above says, text declarations (containing encoding declarations, but no 
version info).

Regards,

-- 
François Yergeau
Received on Wednesday, 9 March 2005 23:25:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:46 UTC