Reputation: 1255
I have the following XML being output from my XSLT
Current output
<stem>
<text>
<p style="white-space: pre-wrap">
<span style="font-size:11;">How much would it cost to buy an Apple & Pear if it's a Saturday?</span>
</p>
</text>
</stem>
Desired output
<stem>
<text>
<p style="white-space: pre-wrap">
<span style="font-size:11;">How much would it cost to buy an Apple & Pear if it's a Saturday?</span>
</p>
</text>
</stem>
I tried disable-output-escaping="no" but it had no effect:
I'm using
<xsl:value-of select="." disable-output-escaping="no"/>
Thanks
Upvotes: 1
Views: 9655
Reputation: 61
If you are using XSLT 2 (as your use of Saxon suggests) there is a feature
called character maps to fine-tune how your output is serialized. To
serialize all apostrophes as '
use:
<xsl:character-map name="escape-apos">
<xsl:output-character character="'" string="&apos;"/>
</xsl:character-map>
<xsl:output method="xml" use-character-maps="escape-apos"/>
Upvotes: 4