[oXygen-user] Saxon and strange behaviour of xsl:sort with lang
Jirka Kosek
jirka at kosek.cz
Tue Jul 24 08:58:15 CDT 2012
Hi,
I have hit strange behaviour when invoking Saxon from oXygen. It seems
that lang attribute is not honoured when used on xsl:sort while
collation works properly. Plese see following transformation:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:variable name="data" select="('Zdena', 'Chvojí', 'Cimbál',
'Čočka')"/>
<xsl:template name="main">
<xsl:for-each select="$data">
<xsl:sort select="." lang="cs"/>
<xsl:value-of select="."/>
<xsl:text>, </xsl:text>
</xsl:for-each>
<xsl:text>
</xsl:text>
<xsl:for-each select="$data">
<xsl:sort select="."
collation="http://saxon.sf.net/collation?lang=cs"/>
<xsl:value-of select="."/>
<xsl:text>, </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
It should produce the following result (at it produces it when Saxon is
invoked from command-line):
Cimbál, Čočka, Chvojí, Zdena,
Cimbál, Čočka, Chvojí, Zdena,
But when run from oXygen output is wrong, lang="cs" is not honoured:
Chvojí, Cimbál, Čočka, Zdena,
Cimbál, Čočka, Chvojí, Zdena,
Is there anything in Saxon integration which interferes with lang? Or
perhaps JVM issue?
Thanks for englightenment,
Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: jirka at kosek.cz http://xmlguru.cz
------------------------------------------------------------------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20120724/38337847/attachment.bin
More information about the oXygen-user
mailing list