This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
jQuery in Action, 2nd edition
subject: Escaping &gt; and &lt: tags in XSL
Similar Threads
XSLT - empty tag
Does XSLT template declaration order matter?
Rendering HTML content of the xml file
how to use string function in xsl while converting to jsp
how to use String Function in XSL