Subject: Re: [xsl] 'xsl:variable' as dynamic select for 'xsl:for-each'... From: Philippe Drix <pdrix@xxxxxxxxxxxx> Date: Mon, 17 Nov 2003 14:03:50 +0100 |
Of course, this doesn't work either...
<xsl:variable name="selectclause"> <xsl:choose> <xsl:when test="$clientid = ''">"//client"</xsl:when> <xsl:otherwise>"//client[$clientid]"</xsl:otherwise> </xsl:choose> </xsl:variable>
use: <xsl:when test="$clientid = ''"><xsl:copy-of select="//client"/></xsl:when>
<xsl:for-each select="$selectclause"> my code </xsl:for-each>
Perhaps : <xsl:for-each select="$selectclause/*"> my code </xsl:for-each>
This will work with Saxon and version="1.1" Otherwise, use the function nodeset() :
<xsl:for-each select="nodeset($selectclause)/*"> etc.
Regards Ph D
== Philippe Drix ___________ __| OBJECTIVA |___________________ http://www.objectiva.fr 21-23, rue Aristide Briand - 92170 Vanves tel : +33 1 47 36 60 30 cel : 06 74 78 34 97 fax : +33 1 47 36 61 93
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] 'xsl:variable' as dynamic, David Carlisle | Thread | RE: [xsl] 'xsl:variable' as dynamic, Michael Kay |
Re: [xsl] nested xsl:choose?, andrew . curry | Date | Re: [xsl] XSL to HTML --> XHTML?, Emmanuil Batsis (Man |
Month |