sboag 01/01/11 10:40:12
Modified: java/src/org/apache/xalan/stree StreeDOMBuilder.java
Log:
In processing the characters event, only create TextImpls,
never CDATASectionImpls.
Addresses bug submitted by Thomas Foerster <[EMAIL PROTECTED]>,
01/10/2001 05:59 AM, "Different behavior between Xalan-C++ and Xalan-J?".
The bug was not the disable-escaping
mechanism itself, but the fact that the text() pattern was not matching
CDATA section nodes!
Two fixes have been made:
1) the pattern itself has been fixed so that they will work correctly with
input DOMs, and 2) the StreeDOMBuilder has been modified so that
CDATASections aren't created at all... only text nodes. Since CData
sections are not part of the XPath data model, and append operations in the
StreeDOMBuilder could screw things up anyway, Stree should not be creating
CData section nodes.
Revision Changes Path
1.14 +8 -4
xml-xalan/java/src/org/apache/xalan/stree/StreeDOMBuilder.java
Index: StreeDOMBuilder.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/stree/StreeDOMBuilder.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- StreeDOMBuilder.java 2001/01/09 22:37:34 1.13
+++ StreeDOMBuilder.java 2001/01/11 18:40:09 1.14
@@ -273,10 +273,14 @@
appendAccumulatedText(m_text_buffer, ch, start, length);
else
{
- if (m_inCData)
- m_text_buffer = (new CDATASectionImpl(m_docImpl, ch, start,
- length));
- else
+ // if (m_inCData)
+ // {
+ // CDATA SECTIONS DON'T REALLY WORK IN THE STREE. I WOULD
+ // LEAVE THIS, BUT THE APPEND MODE MAKES IT STRANGE...
+ // m_text_buffer = (new CDATASectionImpl(m_docImpl, ch, start,
+ // length));
+ // }
+ // else
m_text_buffer = (new TextImpl(m_docImpl, ch, start, length));
setPreviousIsText(true);