#156428 xalan: xalan sorts in the following order: A, B, a, b

Package:
xalan
Source:
xalan
Description:
XSLT processor utility
Submitter:
Vincent Lefevre
Date:
2013-10-14 09:33:04 UTC
Severity:
normal
#156428#5
Date:
2002-08-12 15:52:01 UTC
From:
To:
xalan sorts in the following order: A, B, a, b, which in incorrect.
It should have been either A, a, B, b or a, A, b, B.

#156428#10
Date:
2013-07-29 20:54:56 UTC
From:
To:
tags 156428 moreinfo
thanks

Would it be possible to have more details on how to reproduce ?

Thx

#156428#15
Date:
2013-07-30 09:19:24 UTC
From:
To:
Here's a testcase:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
  <root>
    <item>c</item>
    <item>A</item>
    <item>B</item>
    <item>b</item>
    <item>a</item>
    <item>C</item>
    <upper-first>
      <xsl:for-each select="//item">
        <xsl:sort select="."
                  lang="en"
                  case-order="upper-first"/>
        <xsl:value-of select="."/>
      </xsl:for-each>
    </upper-first>
    <lower-first>
      <xsl:for-each select="//item">
        <xsl:sort select="."
                  lang="en"
                  case-order="lower-first"/>
        <xsl:value-of select="."/>
      </xsl:for-each>
    </lower-first>
  </root>
</xsl:template>

</xsl:stylesheet>

I get:

$ xalan -xsl case-sort.xsl -in case-sort.xsl
<?xml version="1.0" encoding="UTF-8"?>
<root>
<item>c</item>
<item>A</item>
<item>B</item>
<item>b</item>
<item>a</item>
<item>C</item>
<upper-first>ABCabc</upper-first>
<lower-first>ABCabc</lower-first>
</root>

One should have:

  <upper-first>AaBbCc</upper-first>
  <lower-first>aAbBcC</lower-first>