This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: translate one char to 2 or more chars
- To: xsl-list at mulberrytech dot com
- Subject: Re: translate one char to 2 or more chars
- From: Marta Lobato <lobatosm at tcd dot ie>
- Date: Wed, 01 Mar 2000 17:40:26 +0000
- Reply-To: xsl-list at mulberrytech dot com
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