I have the following xml-node :
<name>P & P</name>
And following XSL
<a href="example.htm" >
<xsl:attribute name="title">
<xsl:value-of select="name" disable-output-escaping="yes"></xsl:value-of>
</xsl:attribute>
<xsl:value-of select="name" disable-output-escaping="yes"></xsl:value-of>
</a>
That compiles to this HTML
<a href="example.com" title="P &amp; P">
P & P
</a>
So the non-escaping worked for the value (the text between <A></A>
) but not for the attribute.
Am I missing something here?
Thanks!
Best Answer
From an OP's comment:
What you need to generate can be done perfectly without D-O-E.
When applied on the following XML document:
the wanted, correct result is produced: