gechu
gechu

Reputation: 217

display xml elements inside xml using xslt

Ia using XSLT 1.0 and I do have a XML while looks like this

<item name="note"><value>&lt;p&gt;Add the &amp;lt;bean&amp;gt; tag pased below to the &amp;lt;beans&amp;gt; element in this file .... </value></item> 

I want to display it like this in HTML

Add the <bean> tag passed below to the <beans> element in this file. 

Note here that the <p> will be converted to a paragraph tag as I use disable-output-escaping= yes.

This is what I have in my xslt

<xsl:template match="item[@name='note']">
    <xsl:value-of select="value" disable-output-escaping="yes" />
</xsl:template>

With this xslt it ignores the bean and beans xml and it does not get displayed in the page. How do I make sure to display it the way I want it?

Upvotes: 0

Views: 259

Answers (1)

Mads Hansen
Mads Hansen

Reputation: 66781

The problem is that some of your entities have been "double escaped".
&amp;lt;bean&amp;gt; should be &lt;bean&gt;

Upvotes: 0

Related Questions