Re: disable-output-escaping
Martin Honnen <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
Maria Amuchastegui wrote:
> The FAQ page says there is usually a workaround. What would be the
> workaround?
>>>I have this in my XML data:
>>><ServiceHeader header="Services Étoiles<sup>MC</sup>:">
>>>
>>>And this in my stylesheet:
>>><xsl:value-of select="@header" disable-output-escaping="yes"/>
>>>
If you can change your XML data to
<ServiceHeader>
<header>Services Étoiles<sup>MC</sup>:</header>
and then in the stylesheet use
<xsl:apply-templates select="header" />
instead of the
<xsl:value-of select="@header" disable-output-escaping="yes"/>
you have currently.
Then add a template for
<xsl:template match="header>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="sup">
<xsl:copy>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
If you can't change the input XML then you have more work in the XSLT,
you need to break up the string and create the element <sup> as needed.
--
Martin Honnen
http://JavaScript.FAQTs.com/