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

setPreserveSpace(true) doesn't play nice with setIndenting(true)





------- Additional Comments From [EMAIL PROTECTED]  2002-10-25 08:04 -------
Here are some comments from a discussion with Assaf Arkin the original author 
of the serializer:

In order for the XML document to look "user friendly" with indentation, the XML 
serializer must be able to add spaces into the content model of elements. This 
causes the content model of elements to change.

Sometimes XML elements tolerate this change because the content is not mixed, 
or the content is mixed and normalized. For example, in HTML all mixed content 
is normalized, leading/trailing whitespaces are ignores, multiple whitespaces 
are treated as a single whitespace. HTML can be produced with indentation.

Indicating that an element is whitespace preserving means that the content 
model MUST not be changed. The content of that element could not be changed by 
the serializer, and so it will not appear "user friendly" in the resulting 
document.

Setting whitespace preserving to true for the entire document would prevent the 
entire document from appearing "user friendly". This is consistent with XML 1.0 
and XML 1.1.

The way the serializer works now, if you prevent it from identing the content 
of a specific element, it ALWAYS produces valid XML for that element. If you 
make it indent the content of an element that is whitespace preserving you MAY 
produce invalid XML. (MAY is good enough not to do that ever)

To conclude: a good enhancement to the serializer will be to make the two flags 
(whitespace preserving and indentation) mutually exclusive, and setting one 
would reset the other. That way, it could not be abused. The patch I proposed 
MAY produce invalid XML.

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

Reply via email to