|
Subject: [xsl] Re: Making XPath expressions out of variables From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Wed, 29 Oct 2003 16:46:35 +0100 |
> <xsl:for-each select="//$record-type">
> <xsl:sort select="$sort-by" order="$sort-order" />
> <xsl:if test="$lh-operator $operand $rh-operator">
> <tr>
> <xsl:for-each select="*">
> <td><xsl:value-of select="." /></td>
> </xsl:for-each>
> </tr>
> </xsl:if>
> </xsl:for-each>
>
> Any ideas? Is it possible? Or do I need to use this basic construct
multiple
> times using <xsl:if> for each variable and the correct names of nodes and
> operands. (The number of permutations is massive!)
Using FXSL one can write in (XSLT2):
<xsl:if test="f:apply($operator, $lh-operand, $rh-operand)">
. . . . . . . .
</xsl:if>
in XSLT 1.0 this will be written as:
<xsl:variable name="vResult" >
<xsl:apply-templates select="$operator">
<xsl:with-params name="arg1" select="$lh-operand"/>
<xsl:with-params name="arg2" select="$rh-operand"/>
</xsl:apply-templates>
</xsl:variable>
<xsl:if test="$vResult">
. . . . . . . .
</xsl:if>
=====
Cheers,
Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Making XPath expressions , Richard Lewis | Thread | RE: [xsl] Making XPath expressions , Michael Kay |
| RE: [xsl] non-breaking whitespace, Saverio Perugini | Date | Re: [xsl] Finding topmost element o, David Carlisle |
| Month |