[ http://issues.apache.org/jira/browse/XALANJ-1240?page=all ]

Brian Minchau updated XALANJ-1240:
----------------------------------

    Version: 2.4Dx
                 (was: Latest Development Code)

> sort data-type="text" not sorting text with "-" correctly
> ---------------------------------------------------------
>
>          Key: XALANJ-1240
>          URL: http://issues.apache.org/jira/browse/XALANJ-1240
>      Project: XalanJ2
>         Type: Bug
>   Components: Xalan
>     Versions: 2.4Dx
>  Environment: Operating System: Other
> Platform: Other
>     Reporter: Tom Amiro
>     Assignee: Xalan Developers Mailing List

>
> When doing text sorts, both Xalan and XSLTC appear to be ignoring the 
> "-" character. Textually, the - should come before 0.
> Here's a simple test case modified from sort40.
> xsl file
> ========
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
> version="1.0">
> <xsl:template match="/">
>   <xsl:variable name="numnodes" select="doc/num" />
>   <out>
>     Descending order....
>     <xsl:for-each select="$numnodes">
>       <xsl:sort data-type="text" />
>       <xsl:value-of select="."/><xsl:text> </xsl:text>
>     </xsl:for-each>
>   </out>
> </xsl:template>
> </xsl:stylesheet>
> xml file
> ========
> <?xml version="1.0"?>
> <!-- Test for xsl:sort -->
> <doc>
>   <num>99</num>
>   <num>3</num>
>   <num>100</num>
>   <num>40</num>
>   <num>69</num>
>   <num>82</num>
>   <num>1</num>
>   <num>0</num>
>   <num>0008</num>
>   <num>5</num>
>   <num>04</num>
>   <num>002</num>
>   <num>666</num>
>   <num>777</num>
>   <num>Abc</num>
>   <num>Hello</num>
>   <num>-13</num>
>   <num>-47</num>
> </doc>
> Obtained output  from Saxon, Xalan, and XSLTC
> =============================================
> Running saxon on sort
> <?xml version="1.0" encoding="utf-8"?><out>
>     Descending order....
>     -13 -47 0 0008 002 04 1 100 3 40 5 666 69 777 82 99 Abc Hello </out>
> Running xalan on sort
> <?xml version="1.0" encoding="UTF-8"?>
> <out>
>     Descending order....
>     0 0008 002 04 1 100 -13 3 40 -47 5 666 69 777 82 99 Abc Hello </out>
> Running XSLTC with Xerces Parser on sort
> <?xml version="1.0" encoding="UTF-8"?>
> <out>
>     Descending order....
>     0 0008 002 04 1 100 -13 3 40 -47 5 666 69 777 82 99 Abc Hello </out>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to