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=17383>. 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=17383 apply-templates not working correctly on CDATA nodes ------- Additional Comments From [EMAIL PROTECTED] 2003-06-09 22:26 ------- Hi! After further investigation and debugging (using JBuilder7 and the Xalan 2.5.1 sources) I found out the following: 1) the document created by parsing my index.xml (included in the work dir) is org.apache.xerces.dom.DeferredDocumentImpl and all of its children are DeferredXXXImpl 2) when the ClonerToResultTree class invokes the dispatchCharacterEvents method in the DOM2DTM class, the type for a DeferredCDATASectionImpl is 3 instead of 4. This let's the CDATA section data get imported correctly. 3) if you add text to the document as a CDATA section (corresponding to the Xerces class org.apache.xerces.dom.CDATASectionImpl), the aforementioned method returns 4 as the type for the node!?! This messes up the output. I wrote a test that shows these strange behaviors. The main class is TransfromTest which does the following: 1) parses the input file (work/index.xml) that contains a CDATA section 2) adds text that contains strange characters as a Text Node 3) adds text that contains strange characters as a CDATA section. Cases 1) and 2) work fine, the third is not working correctly. The cdata.zip contains: 1) src dir with the sources 2) work dir with: a) index.xml b) layout.xsl c) system.xsl d) debug.jpg (snapshot od JBuilder debugger) e) test.jar f) run.abt to execute the test To run the test, copy xml-apis.jar, xalan.jar, and xercesImpl.jar to the work dir. Set JAVA_HOME and then execute the run batch file.
