[jdom-interest] Trouble with Embedded HTML during XSLT Transformation

Blatt, Katie KBlatt at edmunds.com
Wed Jun 6 12:32:10 PDT 2001

Hi all,

I'm desperately seeking help with a problem I'm having with an XSLT
transformation using JDom.  I'm pretty new to Jdom/XSLT/etc. and I'm not
really sure if the problem is JDOM or XALAN related.  Nonetheless, here

One of my XML elements has HTML text in it. I'm storing it as CDATA:
<FullButton><![CDATA[<input type ="hidden" name="year" value="2001"><input
type ="hidden" name="make" value="Volvo"><input type ="hidden" name="model"
value="S40"><input type ="hidden" name="trim" value="SE 4dr Sedan (1.9L 4cyl
Turbo 5A)">]]></FullButton>

After I do the transformation, the "<" and ">" are all transformed into &lt;
and &gt;, screwing up the html formatting.  I have spent all morning trying
various fixes that I have found on various message boards, including:

* using disable-output-esacping="yes"- this just causes my resulting HTML
doc to have this declartion surrounding the appropriate text:

* using <xsl:copy-of .../> instead of <xsl:value-of>

* inserting a cdata-section-elements="//styleinfo/FullButton"  element into
the <xsl:output .../> declaration.

I can't get anything to work.  I was searching around on apache's Xalan
site, and it looks like Xalan *SHOULD* process this correctly.  So I'm
wondering if it's something with JDom?  For the most part, I am using the
most recent Jdom .java files from the CVS (as opposed to what's in the build
6 .jar file)- and I'm also using xalan.jar etc. from the Jdom repository.

Any advice is greatly appreciated!

kblatt at edmunds.com

More information about the jdom-interest mailing list