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

Re: using traslate function to replace strings

Subject: Re: using traslate function to replace strings
From: "Marina Cuello" <cuello@xxxxxxxxxxxxxx>
Date: Fri, 6 Aug 2004 19:16:56 -0300
traslate
> "${VITRIA}" to "dependency". The following code is
> changing "${VITRIA}" to "dependenc".

I think "translate" make a "one to one" translation, each character in the
second parameter is changed to the counterpart on the third parameter, and
that's why you get the last "y" cut.

If you Know there would be only one "${VITRIA}" in each of the strings you
need to translate, you could try something like this:

<xsl:variable name="cutB" select="substring-before(@VALUE,'${VITRIA}')"/>
<xsl:variable name="cutA" select="substring-after(@VALUE,'${VITRIA}')"/>
.
.
.
<xsl:attribute name="VALUE">
                <xsl:value-of select="concat($cutA,'dependency'.$cutB)"/>
</xsl:attribute>

If there is more than one, I don't have experience enought to be sure, but
perhaps you can make a recursive template to achieve it.

Marina

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.