[Bug 5295] [XSLT 2.0] xsl:for-each-group: transitivity

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5295

           Summary: [XSLT 2.0] xsl:for-each-group: transitivity
           Product: XPath / XQuery / XSLFO / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


Bug #5183 raised against distinct-values() applies equally to
xsl:for-each-group.

In 14.3 after the paragraph "Grouping keys are compared using the rules..." I
propose adding:

If the population contains values of different numeric types that differ
from each other by small amounts, then the eq operator is not transitive,
because of rounding effects occurring during type promotion. In the situation
where there are three values A, B, and C in the population such that A eq B, B
eq C, but A ne C, then the number of groups is implementation dependent,
subject only to the constraints that (a) every item in a non-singleton group is
equal to at least one other item in that group, (b) for any two distinct
groups, there is at least one pair of values (one from each group) such that
the two values are not equal to each other. 

For example, this arises when computing 

      <xsl:for-each-group select="
         xs:float('1.0'),
          xs:decimal('1.0000000000100000000001',
          xs:double( '1.00000000001')">

because the values of type xs:float and xs:double both compare equal to the
value of type xs:decimal but not equal to each other.

Received on Wednesday, 28 November 2007 18:32:30 UTC