xsl-list
[Top] [All Lists]

Re: [xsl] Decoding HTML tags

2012-10-01 10:46:55
Wow.  I didn't think that worked like that.  Cool, thanks.

On Mon, Oct 1, 2012 at 8:42 AM, Martin Honnen 
<Martin(_dot_)Honnen(_at_)gmx(_dot_)de> wrote:
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

href="http://gymnasticscoaching.com/new/2012/09/straight-body-cast-hand-drill/";
</content>

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

<b>Straight Body Cast Handstand Drll</b>
<br/>
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"/>
</xsl:template>



--

        Martin Honnen --- MVP Data Platform Development
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




-- 
Karl Stubsjoen
MeetScoresOnline.com
(602) 845-0006

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>