Outputing an '&' from XSL

Subject: Outputing an '&' from XSL
From: Eoin Flood <eoin.flood@xxxxxxxxxxxx>
Date: Tue, 20 Jun 2000 18:39:35 +0100
I am sure that this is probably a FAQ, but I cant find any information on it

I need to output HTML which contains the following fragment

<OBJECT classid="..">
 <PARAM NAME="movie" value="webcard.swf?param1=Ducks&param2=Unlimited"/>
</OBJECT>

but whatever I do I always get a '&amp;' in the output stream

I have tried

<?xml version="1.0"?>
<xsl:stylesheet
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 version="1.0">
<xsl:output method="html" indent="yes"/>

<xsl:template match="/">
     <snip>
    <OBJECT classid="...">
     <PARAM NAME="movie" value="webcard.swf?param1=Ducks&amp;param2=Unlimited"/>
    </OBJECT>
    </snip>
</xsl:template>

</xsl:template>

or more complicated

<xsl:template match="/">
     <snip>
    <OBJECT classid="...">

     <PARAM>
     <xsl:attribute NAME="movie">
        <xsl:text>webcard.swf?param1=Ducks</xsl:text>
        <xsl:text disable-output-escaping="yes">&amp;</xsl:text>
        <xsl:text>nickname=Ducks+Unlimited"/>
    </OBJECT>
    </snip>
</xsl:template>

I have also tried calling the setSpecialCharacters() method in the XMLParserLiaison but it does not help
no matter what I do the output HTML always contains '&amp;' instead of just '&'

I am using Xerces 1.0.3
and Xalan 1.0.1

Any help would be most gratefully appreciated

Thanks

Eoin Flood


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread