<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.3105.105" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>I was having
troubles building xsl stylesheets with JDom. The problem is that the xsl
strings would have xsl:value-of inside them to do data transformation. You
can also do it if you have arbitary sentences of html with markup contained in
them.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=428013821-11062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>For
example:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>You are
<xsl:value-of select="age"/> years old.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=428013821-11062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>I have paragraphs of
this stuff, and I did not want to do parsing and build a JDom tree.
Instead, I created a "UnescapedText" object. This object wrappers any text
that you do not want to be escaped or modified.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=428013821-11062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>Now I
can:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>String x= "you are
<i>very</i> nice!"</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>UnescapedText ut =
new UnescapedText(x);</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>Element element =
new Element("html");</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=428013821-11062001>element.addContent(ut);</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=428013821-11062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>This will output
correctly, without the escaping.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=428013821-11062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>I modified Element
to be able to take this object. I also modified XMLOutputter to be able to
output the document.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=428013821-11062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>It compiles and runs
well...against b6</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=428013821-11062001></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=428013821-11062001>Let me
know.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=428013821-11062001>Phillip</SPAN></FONT></DIV></BODY></HTML>