|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Making XPath expressions out of variables
> <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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








