Special characters sort incorrectly, Windows only
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 2
- Joined: Sun Jan 17, 2010 5:15 pm
Special characters sort incorrectly, Windows only
Post 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>
<?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>
-
- Posts: 2883
- Joined: Tue May 17, 2005 4:01 pm
Re: Special characters sort incorrectly, Windows only
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
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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Sun Jan 17, 2010 5:15 pm
Re: Special characters sort incorrectly, Windows only
Post by KjetilHauge »
That did the trick, thank you very much.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service