File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Escaping > and <: tags in XSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Escaping &gt; and &lt: tags in XSL" Watch "Escaping &gt; and &lt: tags in XSL" New topic

Escaping &gt; and &lt: tags in XSL

Kalyana Chakravarthi Kesanupalli

Joined: Oct 06, 2004
Posts: 2
How to escape > and < in XSL. The browser is displaying the HTML tags as is. I have some HTML tags with content in the variable like <STRONG>test</STRONG>. I want the word "test" to come in bold in the browser. Rather I am getting the eitire text <STRONG>test</STRONG> as is.

I tried with
<xsl:value-of select="$strTest" disable-output-escaping="yes" />.

Still it does not work.

Please help me out in this.
Thanks in Advance....

Regards<br />Kalyan Kesanupalli
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
I assume that <STRONG> is a HTML element that is already defined either by
HTML (its been a while I did any HTML work) or using CSS. That said,

You could do it this way is XSL:

If you have already tried this and it didn't work, let us know.
I have previously did similar escapes and it always worked for my.
[ October 06, 2004: Message edited by: Madhav Lakkapragada ]

Take a Minute, Donate an Hour, Change a Life
I agree. Here's the link:
subject: Escaping &gt; and &lt: tags in XSL
It's not a secret anymore!