On Dec 4, 2006, at 2:14 PM, arman_jan wrote:
I am using Jdom's XSLTransformer class to transform one xml file to
another.
The output file should have all character data enclosed in cdata
section. I
use <xsl:output method="xml" indent="yes" cdata-section-
elements="value"/>
Just to be clear, the cdata-section-elements only refers to output
elements of that name (so it isn't about preserving CDATAs from the
input document).
in my xsl stylesheet. When I do a regular command line transform
using xalan
2.7.0 I get the desired output.
java org.apache.xalan.xslt.Process -IN input.xml -XSL sheet.xsl -
OUT out.xml
However, when I perform a transformation inside Java code, my <value>
element doesn't have the text enclosed in cdata-section.
This is strange. Have you looked at what the JDOM library is doing
exactly when calling Xalan? Are you certain that Xalan is being used?
-- Santiago