Subject: Re: translate one char to 2 or more chars
From: Marta Lobato <lobatosm@xxxxxx>
Date: Wed, 01 Mar 2000 17:40:26 +0000
|
Hi,
I had the same problem but with the character '.
I wrote a javascript function with a text as a parameter,
and if this text contained the ' caracter it caused an
error in the browser so I found this solution:
<xsl:elem name="span">
<xsl:attribute name="id">elem</xsl:attribute>
<xsl:variable name="char">'</xsl:variable>
<xsl:variable name="apos">‘</xsl:variable>
<xsl:attribute name="onMouseOver">script-function('<xsl:value-of
elect="translate($text_with_char,$char,$apos)"/>'); </xsl:attribute>
</xsl:elem>
I don't know if it is the best way to do it but it works
fine in xt, it generates the output that I was expecting.
Hope it helps,
Marta Lobato.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|