[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: using traslate function to replace strings
> "${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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|