This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How to define a xsl:sort's order attribute using a variable
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] How to define a xsl:sort's order attribute using a variable
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Wed, 27 Jun 2001 19:23:06 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I want to sort a list of <person> elements, and define the
> "select" and
> "order" attributes of the xsl:sort element using variables,
> rather than
> hardcoded values.
Take a look in the FAQ.
order is an attribute value template.
select is an expression that gives the sort key, not an expression that
gives an expression that gives the sort key. For simple cases use
select="*[name()=$var]", in more complex cases use saxon:evaluate() or
xalan:evaluate().
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list