[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: translate one char to 2 or more chars

Subject: Re: translate one char to 2 or more chars
From: Marta Lobato <lobatosm@xxxxxx>
Date: Wed, 01 Mar 2000 17:40:26 +0000
javascript translate char
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">&#145;</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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.