[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] How can I avaliate an expression XPath in a variable


Subject: RE: [xsl] How can I avaliate an expression XPath in a variable
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 23 Oct 2002 13:23:34 +0300

Hi,

>       <xsl:variable name="pos" 
> select="concat('/di/docentes/prof', '[',
> position(), ']')"/>
>       #<xsl:value-of select="translate($pos, ' ', '-')"/>

No can do in XSLT, expressions cannot be dynamically constructed, us

  <xsl:variable name="pos" select="position()"/>
  <xsl:value-of select="concat('#', /di/docentes/prof[position() = $pos])" />

instead.

Cheers,

Jarno - Assemblage 23: Disappoint (Funker Vogt Remix)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords