|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: SAX InputSource and character streams
On 20 February 2001 at 18:27 David Brownell wrote:- > > > When constructing a SAX InputSource from a character stream > > > (java.io.Reader), is it correct to assume that any encoding > > > declaration given in the document will be ignored? > > No ... the XML 1.0 spec does however say (near the end of 4.3.3) that > > it is an error for an entity including an encoding declaration to be presented > to the XML processor in an encoding other than that named in the declaration. > But what exactly consitutes an XML Processor? I would say that the SAX API allows the application to intervene in several places that (according to the XML 1.0 recommendation) are the responsibility of the XML processor. So, in this case, by deciding to pass the SAX Parser a character stream, the application has taken on part of the responsibility of an XML processor - namely the responsibility of dealing with any encoding issues, thereby relieving the SAX processor of any need, indeed any right, to have an opinion on how the encoding is performed. Still not convinced? Regards Rob Lugt ElCel Technology
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








