I have a very strange behavior when I got mutations in a node in xml when I try to parse it with an XSLT.
So we now assume that CustomerName has the Value ‘MÖP’.
In this case, the resulting HTML ‘a’ tag would have a href to ‘M%C3%B6P’
<a href="{CustomerName}">
<xsl:value-of disable-output-escaping="yes" select="CustomerName"/>
</a>
In this case, the resulting HTML ‘div’ tag would have an id ‘MÖP’
<div style="display:none">
<xsl:attribute name="id"><xsl:value-of select="CustomerName"/></xsl:attribute>
</div>
It seems like the attribute href in the a tag has something to do with it.
My question is, why is it like that ?
An what can i do that in both cases i got the same output ?
Greetz
The XSLT processor is doing you a favour by escaping the URL value in the
hrefattribute of the HTML link element. This is by design, see http://www.w3.org/TR/xslt-xquery-serialization/#HTML_ESCAPE-URI-ATTRIBUTES. If you really don’t want that and you use an XSLT 2.0 processor then you can use<xsl:ouput method="html" escape-uri-attributes="no"/>in your stylesheet.