I can't reproduce this. Could you please send a complete source document and stylesheet to demonstrate the problem. Also please indicate which Saxon version you are using (though there haven't been any changes in this area for a long time.)

Are you quite sure that the transformation is running using Saxon? Xalan (and Saxon 6.5) default to linguistic collation rather than codepoint collation. In current Saxon releases you only get linguistic collation if you use an attribute such as "lang" or "collation".

Michael Kay
Saxonica


On 22 Apr 2013, at 14:29, philippe.favrais@continental-corporation.com wrote:

Hello all,

I am having a problem with the xsl:sort which do not give the result i expected. According to UTF-8, i would expect that numerical number come before '_'.
As you can see below this is not what i get.
Does anyone have an idea ?

Code:

        <xsl:for-each select="$fastAnalogInputs">
                <xsl:sort select="./@Name" data-type="text" />
#define <xsl:value-of select="./@Name"/>                (<xsl:value-of select="position()-1"/>u)<xsl:text/>
        </xsl:for-each>

Note: $fastAnalogInputs is a list of elements that have string in their @Name attribute.


Expected result:

#define ECU_SIGNAL_10_MUX_1_LN_0  (32u)
#define ECU_SIGNAL_11_MUX_1_LN_1  (33u)
#define ECU_SIGNAL_12_MUX_1_LN_2  (34u)
#define ECU_SIGNAL_13_MUX_1_LN_3  (35u)
#define ECU_SIGNAL_14_MUX_1_LN_4  (36u)
#define ECU_SIGNAL_15_MUX_1_LN_1  (37u)
#define ECU_SIGNAL_1_CH_1  (38u)
#define ECU_SIGNAL_1_MUX_0_LN_1  (39u)

Actual result:

#define ECU_SIGNAL_1_CH_1                (32u)
#define ECU_SIGNAL_1_MUX_0_LN_1                (33u)
#define ECU_SIGNAL_10_MUX_1_LN_0                (34u)
#define ECU_SIGNAL_11_MUX_1_LN_1                (35u)
#define ECU_SIGNAL_12_MUX_1_LN_2                (36u)
#define ECU_SIGNAL_13_MUX_1_LN_3                (37u)
#define ECU_SIGNAL_14_MUX_1_LN_4                (38u)
#define ECU_SIGNAL_15_MUX_1_LN_1                (39u)

Thank you in advance
Philippe
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help