Two Laptop Bag*
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 Java 8 in Action this week in the Java 8 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
Author

Escaping &gt; and &lt: tags in XSL

Kalyana Chakravarthi Kesanupalli
Greenhorn

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.
kesanupalli@yahoo.com
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.
Thanks.
[ October 06, 2004: Message edited by: Madhav Lakkapragada ]

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Escaping &gt; and &lt: tags in XSL
 
Similar Threads
how to use string function in xsl while converting to jsp
how to use String Function in XSL
Rendering HTML content of the xml file
XSLT - empty tag
Does XSLT template declaration order matter?