OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
>     to the XML processor in an encoding other than that named in the

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?

Rob Lugt
ElCel Technology