I am using both Xerces and Xalan in a Servlet environment. I'm having
the following problem, though:
I need to allow a user to type in some data into an html textarea field.
This text MAY be html.
I then need to preview this html-text back to the user. Using the DOM, I
write out an xml construct using the following code:
Element body = doc.CreateElement ("Body"); // doc is a Document
Node bodyText = doc.createCDATASection (_body); // _body is a String set
which outputs the following:
When I try and style this document using Xalan, I cannot get it to pass
the CDATA section through unencoded. My styling rule looks like this...
I've also tried seting the cdata-section-elements attribute of the
xsl:output element to "Body". Additionally, I've tried both
doc.createTextNode() and doc.createCDATASection() in the java code.
Any ideas what I am doing wrong, or if I've hit a bug or an