[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: SAX InputSource and character streams

  • From: Rob Lugt <roblugt@e...>
  • To: David Brownell <david-b@p...>, Mike Brown <mike@s...>,xml-dev@l...
  • Date: Tue, 20 Feb 2001 22:34:09 +0000

constructing a saxophone
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.