xsl-list
[Top] [All Lists]

Re: Translation of values inside variables XSLT 1.1

2005-06-13 06:12:06
 
   It might be a bit more difficult then this, but make sure that you
   qualify your variable (parameters also) with a $. It is possible that
   you might also need the curly brackets around the variable name.

   <xsl:variabe name="dest">
          <xsl:copy-of select="translate($source, 'V1', 'V2')"/>
   </xsl:variable>

translate translates individual characters, the above transaltes V toV
and 1 to 2.

Search for "replace" in the xsl faq at www.dpawson.co.uk



   OR

   <xsl:variabe name="dest">
          <xsl:copy-of select="translate({$source}, 'V1', 'V2')"/>
   </xsl:variable>

the characters {} never have any significance in an XPath expression,
and will always generate a syntax error, unless they are part of a string
literal. 

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
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>
--~--