[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Making XPath expressions out of variables

Subject: Re: Making XPath expressions out of variables
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Wed, 29 Oct 2003 16:46:35 +0100
xsl with params
> <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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.