Subject: Re: [xsl] Need help with using lookup table and string translation From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 12 May 2009 10:50:47 -0400 |
> 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>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Need help with using look, David Carlisle | Thread | Re: [xsl] Need help with using look, Dmitri Snytkine |
Re: [xsl] Error when params are in , Wendell Piez | Date | Re: [xsl] Need help with using look, Dmitri Snytkine |
Month |