This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: translate one char to 2 or more chars


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]