Hello,
I want to se a for-each loop which uses a variable as select statement, but I just don't find a way to do it.
e.g.:
xml document:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<LDD Status="0">
<blablabla/>
</LDD>
<FDD Status="1">
<blablabla/>
</FDD>
</root>
xsl stylesheet:
<!---code -->
<xsl:choose>
<xsl:when test="$type_to_check = LDD">
<xsl:call-template name="checkstatus">
<xsl:with-param name="type" select="LDD"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$type_to_check = FDD">
<xsl:call-template name="checkstatus">
<xsl:with-param name="type" select="FDD"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
<!---code -->
<xsl:template name="checkstatus">
<xsl:param name="type"/>
<xsl:variable name="nodeset" select="concat('/root/',$type,'/@Status')"/>
<xsl:for-each select="$nodeset">
<!-- do something-->
</xsl:for-each>
</xsl:template>
How can I make my xslt processor clear to use the nodeset defined by $nodeset?
thx
Frank
PS if you think I ask this question in the wrong mailinglist, please point me to the correct one.
