[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] [Summary] Why is Encoding Metadata (e.g. encoding="UTF-8")put Inside the XML Document?
- From: Dave Pawson <davep@dpawson.co.uk>
- To: "Costello, Roger L." <costello@mitre.org>
- Date: Thu, 20 Sep 2007 14:57:04 +0100
Costello, Roger L. wrote:
> Very interesting!
>
> Here's the description I now have:
>
> Assuming external information did not decide the encoding ...
>
> An XML Parser will make an initial "guess" of the encoding based upon
> the presence or absence of a Byte Order Mark (BOM). The XML parser then
> interprets the bit strings using that guess up to the first ">"
> character (the end of the XML declaration). Now that it knows the
> "real" encoding it interprets the rest of the document using the
> encoding it found in the XML declaration.
>
> Do I have it correct?
'<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
So the encoding is optional?
Need to cater for the great unwashed too!
regards
--
Dave Pawson
XSLT, XSL-FO and Docbook FAQ
http://www.dpawson.co.uk
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]