I have an XSLT file generating plain HTML. I need to wrap some elements in CDATA blocks, so intend to use cdata-section-elements. But, if the element I want to have contain CDATA is only one <p>
on the page, how do I get it to not put CDATA in all the other <p>
elements?
The input data is this:
<item>
...
<g:category>Gifts under &pound;10</g:category>
</item>
My XSL is:
<xsl:element name="a">
<xsl:attribute name="href">productlist.aspx</xsl:attribute>
<xsl:copy-of select="text()" />
</xsl:element>
I want this to render something like:
Gifts under £10
But all I get is:
Gifts under £10