Re: disable-output-escaping

"Maria Amuchastegui" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
This worked great. Thank you!

Maria


"Martin Honnen" <[email protected]> wrote in message 
news:[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&lt;sup&gt;MC&lt;/sup&gt;:">
>>>>
>>>>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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.