Date: Thu, 18 Dec 2003 01:08:52 +0100 From: Martin Heinen <martin@sumuk.de> To: Martin Horcicka <horcicka@freebsd.cz> Cc: Hiroki Sato <hrs@freebsd.org> Subject: Re: Problems with mirrors.xml and advisories.xml Message-ID: <20031218010852.A44498@sumuk.de> In-Reply-To: <20031215174940.B38847@www.freebsd.cz>; from horcicka@freebsd.cz on Mon, Dec 15, 2003 at 06:11:10PM %2B0100 References: <20031215154521.O38847@www.freebsd.cz> <20031216.011538.104073140.hrs@eos.ocn.ne.jp> <20031215174940.B38847@www.freebsd.cz>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Mon, Dec 15, 2003 at 06:11:10PM +0100, Martin Horcicka wrote:
> Hiroki Sato (2003-12-16 01:15 +0900):
> > The menu entries will be sorted in alphabetical order of *translated*
> > country name. Didn't it work properly? If you use transtable but
> > the sort order is wrong, please show me the results (and the changes
> > you added). At least I know it works fine for www/ja.
> >
> > Or, is non-alphabetical order needed?
>
> Yes, the menu entries are sorted in alphabetical order of translated country
> names but the sort ordering seems to be English - e.g. all non-English
> characters are sorted after the English ones. What I want is Czech sort
> ordering. I've exported the doc and www trees and added doc/cs_CZ.ISO8859-2
> and www/cs (which are not in the official cvs repository yet) to:
I encountered the same problem when sorting by
translated country names. Attached is a simple
test case: Running »xsltproc sort.xsl names.xml«
will produce the following list:
| <word>Deutschland</word>
| <word>Dänemark</word>
| <word>a</word>
| <word>b</word>
| <word>c</word>
| <word>Ä</word>
| <word>ä</word>
This is wrong, »names.xml« is already sorted
so the order should not change.
It seems that language dependent sorting is
not supported in textproc/libxslt. The file
»FEATURES« of libxslt-1.1.0 contains the following:
| YES xsl:sort
| YES select = string-expression
| NO lang = { nmtoken }
Hiroki's work is such a big time saver that
I consider to commit the German version with the
slightly displaced ordering. This might give
me the time to think about a solution for the
problem instead of sorting manually :-)
--
Marxpitn
[-- Attachment #2 --]
<?xml version="1.0" encoding="iso-8859-1"?>
<list>
<word>a</word>
<word>ä</word>
<word>b</word>
<word>c</word>
<word>Ä</word>
<word>Dänemark</word>
<word>Deutschland</word>
</list>
[-- Attachment #3 --]
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output type="xml" encoding="iso-8859-1"
omit-xml-declaration="yes"
indent="yes"/>
<xsl:template match="/list">
<list>
<xsl:for-each select="word">
<xsl:sort lang="de-DE" data-type="text" select="." />
<word>
<xsl:value-of select="." />
</word>
</xsl:for-each>
</list>
</xsl:template>
</xsl:stylesheet>
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031218010852.A44498>
