Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XSL's disable-output-escaping in Java

843834Aug 18 2008 — edited Aug 19 2008
Hi,

I have a question about the disable-output-escaping attribute in a XSLT-Stylesheet.

I need to have a string in my output that describes a numeric entity like "& # x 0030;" (the inserted spaces are only to avoid the forumsoftware to interpret this sign). This should not be interpreted as the sign "0" but rather be literally copied in the result document.
In XSLT Stylesheet I achieve this by writing:
<xsl:value-of disable-output-escaping="yes" select="'&#x0026;#x0030;'" />
Now I've tried to create a such Node object in a DOM tree. But thats harder than I thought.
Text n = currentNode.getOwnerDocument().createTextNode((char)38 + "#x0030;");
Text n = currentNode.getOwnerDocument().createTextNode("\u0026#x0030;");
I tried to create a Text object (see above) but the ampersand sign is always interpreted as '& amp;', so that my resultstring is '& amp;#x0048;'.

Now my question is if there is a posibility to set a property like "disable-output-escaping" for a specific Text/Node object?

I would be grateful for an answer.


Best Wishes
esprimo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 16 2008
Added on Aug 18 2008
3 comments
355 views