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=21712>.
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=21712

XMLSerializer misses ignorableWhiteSpace when not indenting





------- Additional Comments From [EMAIL PROTECTED]  2003-07-18 18:20 -------
Whitespace reported in ignorableWhitespace calls is white space in element 
content. It isn't part of the content model for the element (defined in your 
DTD), and unless the user has attached an 'xml:space' attribute to an element 
with the value 'preserve', the application (such as the serializer) is free to 
process this whitespace how it sees fit. Have a look at section 2.10 in the XML 
rec (http://www.w3.org/TR/REC-xml#sec-white-space). Even if you 
specify 'xml:space' attributes, they only indicate the intent that applications 
preserve all whitespace. Applications may choose to ignore it. Currently the 
ignorableWhitespace handler doesn't read this value. It probably should. 

Patches are always welcome. :)

As a side note, whitespace that occurs outside of the root element is 
considered markup. It's not part of the infoset (see Bug #5077), and isn't 
reported in SAX. So although you should be able to roundtrip whitespace in 
element content ("ignoreable whitespace") if you use 'xml:space' attributes, 
you might not be able to roundtrip all whitespace from your original document.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to