[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:sort with msxml english language, danish character

Subject: xsl:sort with msxml english language, danish characters, weird results
From: Bryan Rasmussen <bry@xxxxxxxxxx>
Date: Mon, 25 Oct 2004 11:13:51 +0200
danish character
-- 
Bryan Rasmussen

Hi, I was doing some tests of sorting by various languages/charsets etc. and I
came across the following irritation; given xml like the following:
<?xml version="1.0" encoding="UTF-8"?>
<words>
<word>aardvark</word>
<word>xdense</word>
<word>elborg</word>
<word>aardvulf</word>
<word>odense</word>
<word>eelburg</word>
<word>zebra</word>
<word>zandinsky</word>
<word>tip</word>
<word>fthling</word>
<word>fadxl</word>
<word>xerces</word>
</words>
and an xslt like the following:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="sortby" select="'en'"/>
<xsl:output method="xml" encoding="utf-8"/>
<xsl:template match="/">
<e>
<xsl:for-each select="/words/word">
<xsl:sort data-type="text" select="." lang="{$sortby}" order="descending" 
case-order="upper-first"/>
<xsl:value-of select="." />,
</xsl:for-each>
</e>
</xsl:template>
</xsl:stylesheet>

the output in msxsl the command line tool for msxml is:

<?xml version="1.0" encoding="utf-8"?><e>zebra,
zandinsky,
xerces,
tip,
xdense,
odense,
fadxl,
eelburg,
elborg,
fthling,
aardvulf,
aardvark,
</e>

This by the way is not the sort order for danish characters, it does not allow
sorting if the language sortby parameter is set to da (or at least not in the
proper order), so this being the case I wonder what the reasoning is behind the
sort order I'm seeing when the sortby parameter is en.

Anybody know, have any ideas? 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.