This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Dynamic xsl:value-of
- From: "Nordström, Jonas" <Jonas dot Nordstrom at frispar dot se>
- To: "'XSL-List at lists dot mulberrytech dot com'" <XSL-List at lists dot mulberrytech dot com>
- Date: Fri, 26 Apr 2002 13:05:11 +0200
- Subject: [xsl] Dynamic xsl:value-of
- Reply-to: xsl-list at lists dot mulberrytech dot com
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