[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Decoding HTML tags

Subject: Re: [xsl] Decoding HTML tags
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Mon, 01 Oct 2012 17:42:35 +0200

Karl Stubsjoen wrote:
Is there anyway to get from an encoded html tag to the actual tag in
an xsl transformation?  If I have an element like this:

<content>&lt;b&gt;Straight Body Cast Handstand Drill&lt;/b&gt;&lt;br
/&gt;&lt;br /&gt;I like the drill:  &lt;a

I need this from the content element (i added line returns to make
easier to read):

<b>Straight Body Cast Handstand Drll</b>
I like the drill:
<a href="....">....</a>

and so on..

Assuming your XSLT processor supports it you can do

<xsl:template match="content">
  <xsl:value-of select="." disable-output-escaping="yes"/>


	Martin Honnen --- MVP Data Platform Development

Current Thread