You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/04/19 16:53:09 UTC

DO NOT REPLY [Bug 8292] - SAX parser modifies the InputSource

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8292>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8292

SAX parser modifies the InputSource





------- Additional Comments From gmarcy@us.ibm.com  2002-04-19 14:53 -------
The SAX InputSource JavaDoc says two things.  First:

An InputSource object belongs to the application: the SAX parser shall never 
modify it in any way (it may modify a copy if necessary).

So, if it is indeed the case that the SAX parser changes the InputSource then 
that would be a bug.  But it also says:

However, standard processing of both byte and character streams is to close them 
on as part of end-of-parse cleanup, so applications should not attempt to re-use 
such streams after they have been handed to a parser.

Therefore it is also the case that any expectation that you have that a stream 
that you give to a parser via an InputSource is reusable is not valid.  You must 
always create new streams any time that they are provided to the parser.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org