Page 1 of 1

Special characters sort incorrectly, Windows only

Posted: Sun Jan 17, 2010 5:26 pm
by KjetilHauge
Special characters, in my case Norwegian/Danish "æøå" sort with "eoa" under Windows XP and Vista, while they sort correctly under Mac OS 10.5 and 10.6, all oXygen 11.1. and XSLT 2.0, Saxon. See examples below. Suggestions are most welcome.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="sorttest.xsl"?>
<test>
<item>ædabæda - this should be the third item from the end</item>
<item>å, du store min - this should be the last item</item>
<item>zebra</item>
<item>øl means beer and should sort second to last </item>
<item>foxtrot</item>
<item>baker</item>
<item>able</item>
</test>

<xsl:stylesheet version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"></xsl:output>
<xsl:template match="/">
<html>
<head>
<title>test</title>
</head>
<body>
<xsl:for-each select="test/item">
<xsl:sort lang="no" order="ascending" select="."></xsl:sort>
<p>
<xsl:value-of select="."></xsl:value-of>
</p>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Re: Special characters sort incorrectly, Windows only

Posted: Mon Jan 18, 2010 5:48 pm
by adrian
Hi,

Are you sure you are using the same transformer in the transformation scenario on both platforms?

The Saxon 6.5.5 transformer (the default transformer for a new scenario) does not sort correctly in this case so you should change it to Saxon-EE.

You can find the transformer in Configure Transformation Scenario(Document -> Transformation), Edit the associated scenario and check the Transformer combo.

Regards,
Adrian

Re: Special characters sort incorrectly, Windows only

Posted: Mon Jan 18, 2010 6:48 pm
by KjetilHauge
That did the trick, thank you very much.