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
Summary: apply-templates not working correctly on CDATA nodes
Product: XalanJ2
Version: 2.4
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: Xalan
AssignedTo: xalan-dev@xxxxxxxxxxxxxx
ReportedBy: antonio_arena@xxxxxxxx
When selecting a template that has a CDATA as its text node, the text is not
displayed. At most the CDATA end tag is displayed. This bug occurs when the
node is built from the program; when the node is included in the originitaing
XML, no strange behavior. The template to look for in the system.xsl file is
ef:output[@type='text/plain']. I expect the CDATA section to be emitted inside
an HTML pre section. The ef:profile template usually doesn't emit text, it's
only there to show the strange behavior. The ef:user node is embedded in the
CDATA section!
The com.enginframe.server.TransformTest class is used to mimic my Web Server
application when contructing the output:
1) Create DOM from XML file;
2) Add dynamic content to the DOM;
3) Apply stylesheets to DOM;
4) Emit DOM to client.
To reproduce the bug, run my test class like this:
java -cp xalan.jar;xercesImpl.jar;xml-apis.jar;test.jar
com.enginframe.server.TransformTest index.xml layout.xsl output.html
The first input is the XML file; the second input is the XSL file; the third
input is the file to write to.
I'm using Xalan 2.4.1 (latest from Jakarta) on Windows 2K with Java 1.3.1.
This bug can also be reproduced on Linux with the same JDK. I also tried it on
Xalan 2.3.1 with the same results.
When using Xalan 1 inside Cocoon 1.8.2 or using my own classes, it works fine.
|