|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Bug Sorting Zeros
Yes, that's exactly what's going on. Since 'TOTAL' would convert to NaN,
Xalan, when sorting, chooses to sort all NaN values as if they were 0. The
reason that 'TOTAL' appears after 0 is due to the following sentence from
the XSLT recommendation, section 10:
"The sort must be stable: in the sorted list of nodes, any sub list that
has sort keys that all compare equal must be in document order."
This is one of the great, unanswered questions: since NaN is not ordered,
how do you order it in a sort?
Maybe one of the working group members can comment as to whether or not the
working group is going to address this?
Dave
"Gareth Sylvester-Bradley"
<gareth.sbradley@xxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
e.com> cc: (bcc: David N Bertoni/CAM/Lotus)
Sent by: Subject: RE: Bug Sorting Zeros
owner-xsl-list@xxxxxxxxxxxx
rytech.com
06/25/2001 09:51 AM
Please respond to xsl-list
> BEFORE THE SORT: 0,1,2,3,4....52,TOTAL
> AFTER THE SORT (ascending order): 0,TOTAL,1,2,3,4....52
> AFTER THE SORT (descending order): 52,51,50......3,2,1,0,TOTAL
Doesn't this look more like the string 'TOTAL' is being sorted as if it
were
zero (and a stable sorted used)?
*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
**************************************************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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








