xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 5761] - Multi Level Sorting fails when select-statement returns no result in xsl:sort
Date Wed, 09 Jan 2002 19:01:21 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5761>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5761

Multi Level Sorting fails when select-statement returns no result in xsl:sort





------- Additional Comments From mkm@softwareag.com  2002-01-09 11:01 -------
I'd like to state that other XSLT-Processors handle the situation in the
correct way. I consider the Xalan-behaviour as a bug.

I the first-level sort is not applicable, the processor should
just proceed and use the document-order, wich is not the case with
Xalan.

Otherwise it would be very ugly to handle sorting controlled by
parameters, consider the following example:

<xsl:apply-templates select="to-be-sorted-elements">
   <xsl:sort select="@numeric-valued-attribute[$sort-key='numeric'] data-
type="numeric"/>
   <xsl:sort select="@text-valued-attribute[$sort-key='text'] data-type="text"/>
<xsl:apply-templates>

If you set the sort-key parameter to 'numeric' the first sort level
is applicable and you get the 'to-be-sorted-elements' in a numeric order.

If you set the sort-key parameter to 'text', I'd expect to get the same
elements in text/alphabetic order. The first level is not applicable,
so the sorting should return the elements just in document order, the
second level applies, therefore elements get sorted in text/alphabetical
order.

May be the processor gives a warning as a level is not usable, but the
sorting must proceed with deeper levels keeping elements in document-order
(in case of non-applicable first level) or as 'all-elements-equal' 
(in case of non-applicable deeper levels).

*** I don't consider a non usuable level is a stylesheet problem and
    think thata a lover level sort is meaningful even if the upper level sort
    is not applicable ***

Mime
View raw message