DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=23147>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=23147 Carriage returns in text nodes double after being transformed/parsed. ------- Additional Comments From [EMAIL PROTECTED] 2004-03-10 16:06 ------- Ronald: Your hand-crafted test case is equivalent to the case in which character references are used. You've created a DOM document that explicitly contains a carriage return in it. The hand-crafted document is equivalent to the following XML document: <test>AA AA</test> The same reasoning I described before applies here. Xalan treats a hand- crafted document the same way it treats a document that has been produced by an XML parser. The only way that a carriage return can appear in the internal representation of an XML document delivered by a parser is if a character reference is used. The carriage return is output as a significant character, and then the line-feed is output using a platform-friendly end-of-line representation (carriage-return/line-feed, if you're using Windows). In this case, you happen to be using the text output method in your stylesheet, so the output looks a bit odd. If you had been using the the xml output, you would have seen the following output for the hand-crafted document: 65 65 38 35 49 51 59 13 10 65 65 A A & # 1 3 ; CR LF A A The bottom-line is that you should only try to put a carriage-return character into the internal representation of an XML document when you want it to be treated as a significant character in its own right. A carriage-return is only treated as part of the end-of-line sequence when it appears in a physical XML document.