xsl-list
[Top] [All Lists]

RE: what does xsl:sort do if "select" doesn't evaluate to anything?

2003-03-19 16:56:19
The result of the select expression is converted to a string. Converting
an empty node-set to a string gives you the value "".

(The semantics change in XSLT 2.0 but the end result is very similar:
absent values sort first).

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 



-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Robert P. J. Day
Sent: 19 March 2003 04:10
To: XSL List
Subject: [xsl] what does xsl:sort do if "select" doesn't 
evaluate to anything?



  what is the defined behavior for <xsl:sort> if the 
"select=" expression is not satisfied by anything?

  eg., i want to process a bunch of <car> elements, sorted by 
their engine <displacement> values, but some of the <car> 
elements have no such element?

  i read kay pretty carefully, but his section on xsl:sort 
didn't appear to address that specific issue.

rday


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list