[jdom-interest] stop jdom from escaping (creating dynamic xsl stylesheet)

Rhodes, Phillip C. Phillip.Rhodes at alcoa.com
Mon Jun 11 10:22:51 PDT 2001

I can not do this because the xsl:value-of is interspersed in the text.

For example:
You name is <xsl:value-of select="name"/>.  You are <xsl:value-of
select="age"/> years old.

Basically, I have a bunch of xsl templates that have use xsl:value-of to
fetch the correct values into the text.

Is there a way to get around the escaping of my xsl-value-of?


-----Original Message-----
From: Jason Hunter [mailto:jhunter at collab.net]
Sent: Monday, June 11, 2001 12:58 PM
To: Rhodes, Phillip C.
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] stop jdom from escaping (creating dynamic
xsl stylesheet)

> "Rhodes, Phillip C." wrote:
> I am creating xsl with jdom and it is escaping <xsl:value-of />
> Example:
> String xsl = "Your name is" + "<xsl:value-of select=\"name\" />";
> Element element = new Element(xsl);
> When I output the document, it will escape the > and < characters.

JDOM is behaving properly, because you passed text for what should be an
element.  You want to create the <xsl:value> element as an Element, and
all will work fine.


More information about the jdom-interest mailing list