Subject: Re: [xsl] Need help with using lookup table and string translation From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 11 May 2009 21:47:58 +0100 |
> The 'for in' looks like xslt2 function. well an xpath2 expression, yes. > for $x in key('tr_string-by-str', $key) return (x$/ru, $x/en, .)[1] but you are in luck here as the for isn't actually doing anything in that case you could write key('tr_string-by-str', $key)/(ru,en, current())[1] in xpath2 or in xslt1 <xsl:variable nae="x" select="key('tr_string-by-str', $key)"/> <xsl:choose> <xsl:when test="$x/ru"> <xsl:value-of select="$x/ru"/> </xsl:when> <xsl:when test="$x/en"> <xsl:value-of select="$x/en"/> </xsl:when> ... david ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Need help with using look, Dmitri Snytkine | Thread | Re: [xsl] Need help with using look, Wendell Piez |
Re: [xsl] [xls] run-time variable n, Lars Huttar | Date | Re: [xsl] Need help with using look, Wendell Piez |
Month |