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

invalid output from DOMWriter using MemBufFormatTarget





------- Additional Comments From [EMAIL PROTECTED]  2002-09-27 20:05 -------
Dean,
    
     Currently, for an attribute, 
     <ele_name attr_name ="xxx > xxx &gt; xxx" /ele_name>, 
     the DOMWriter's output is,
     <ele_name attr_name ="xxx > xxx > xxx" /ele_name>.

     I guess you prefer the second '>' be '&gt;' as it was in the original 
document.

     As required by the XML spec 3.3.3 Attribute-Value Normalization 
(http://www.w3.org/TR/REC-xml#AVNormalize), '&gt;' needs to be normailzed 
to '>'. So after parsing, internally we have a string like this:
     "xxx > xxx > xxx"

    When serialized out the DOM tree, the DOMWriter has no way to figure it out 
that the first '>' was a '>' in the original input document, while the 
second '>' was the normalized value of '&gt;'. And therefore, the DOMWriter 
decides not escape either of them.

    This problem does NOT exist in the text node since '>' is invalid the text 
content, so for any occurence of '<', we know it is a normalized value 
for '&lt;' and needed be escaped back to '&lt;'.

     Please let us know what u think, thanks.

Rgds,
PeiYong

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

Reply via email to