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

Tabulator (U+0009) character in element attribute not serialized as numerical entity 
by default xml serializer





------- Additional Comments From [EMAIL PROTECTED]  2003-08-25 16:12 -------
Hi Christian,

Some of the code is used by both attribute processing and text node processing
so if any changes are made in this area then care must be taken.

I've had a look at this. It hinges on 
  org.apache.xml.serializer.CharInfo.isSpecial(int char)
and on 
  org.apache.xml.serializer.ToStream.writeAttrString(Writer writer, String 
data, String encoding)

CharInfo has a constructor that sets 0xA and 0xD as "special", but not 0x9.
If 0xA or 0xD are seen they are written out in an attribute as &#10; and &#13; 
but there is a little bit of code in writeAttrString() that checks of the 
carriage-return and new-line are adjacent, and if they are then it only writes 
out a single new line (as it would in writing out a character node).

As I understand it, what you are asking for is that when writing out attributes 
to an XML output stream that the TAB is written out as &#9; and that a carriage-
return/new-line pair be written out as &#13;&#10; not as a single new-line 
character. Is that right?
Regards,
Brian Minchau

Reply via email to