This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Passing sort criteria as a paramter
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 25 Jan 2002 20:06:43 -0000
- Subject: RE: [xsl] Passing sort criteria as a paramter
- Reply-to: xsl-list at lists dot mulberrytech dot com
> I have been passing the sort element name into my xsl by way of a
> parameter. I then do this:
>
> <xsl:sort select="*[local-name() = $sortby"]">
>
> and this works great. Now, I want to qualify the element name, such
> that the select attribute would read
>
> select="Amount[../IsCredit=1]"
>
> if I wanted to just park the select attribute at one element.
>
> Now, how can I pass the above predicated element name into the
> stylesheet?
If you want to process general XPath expressions supplied as strings, you
need a processor that supports the evaluate() extension function, e.g. Saxon
or Xalan.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list