[xsl] Dynamic xsl:value-of

Subject: [xsl] Dynamic xsl:value-of
From: "Nordström, Jonas" <Jonas.Nordstrom@xxxxxxxxxx>
Date: Fri, 26 Apr 2002 13:05:11 +0200
I need to use the "loop-counter" to get an attribute value. Sounds strange,
huh? Here's a simplified example:

Part of the XML:

<db2000>
<http>
<param name="type0" value="xxx"/>
<param name="type1" value="yyy"/>
<param name="name0" value="yyy"/>
<param name="name1" value="xxx"/>
</http>
</db2000>

I have a xslt-template with something like:

<xsl:template match="blabla">
   <xsl:value-of
select="/db2000/http/param[@name='type{position()}]/@value/>
</xsl:template>

The problem is that the syntax don't work :)

Any ideas on how I can construct the xpath expression dynamically?

Jonas Nordström
Sigma Exallon


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


Current Thread