xsl-list
[Top] [All Lists]

[xsl] Bug with character map?

2012-07-26 11:30:19
Hi,

I'm using a character map in my stylesheet to convert some special characters.

Here is my code:

<xsl:stylesheet version="2.0"
    xmlns="http://www.w3.org/1999/xhtml";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    exclude-result-prefixes="xsi xsl">

    <xsl:character-map name="funny-quote">
      <xsl:output-character character="&#146;" string="’"/>
    </xsl:character-map>

    <xsl:output method="xhtml" indent="yes" use-character-maps="funny-quote"/>

    <xsl:variable name="link"
+select="'http://www.infiressources.ca/fer/depotdocuments/Modeles_et_demarches_d&#146;education_therapeutique-place_des_TIC.pdf'"/>

    <xsl:template match="/">
        <html>
            &#160;
            <a>
                <xsl:attribute name="href"><xsl:value-of 
select="$link"/></xsl:attribute>
                <xsl:value-of select="$link"/>
            </a>
            <br/>&#160;
            <xsl:text disable-output-escaping="yes">&lt;a 
href=&quot;</xsl:text><xsl:value-of select="$link"/><xsl:text
+disable-output-escaping="yes">"&gt;</xsl:text><xsl:value-of 
select="$link"/><xsl:text disable-output-escaping="yes">&lt;/a&gt;</xsl:text>
        </html>
    </xsl:template>
</xsl:stylesheet>

I generate 2 hyperlinks.  I was expecting the 2 links to be exactly the same.  
However, the first link's href value is wrong.  Is this a bug or am I missing
+something?

I'm using Saxon HE 9.3.0.5.

Frederic Bergeron

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>