[oXygen-user] Saxon and strange behaviour of xsl:sort with lang

George Cristian Bina george at oxygenxml.com
Tue Jul 24 09:44:27 CDT 2012


Hi Jirka,

I get the same results both from command line and from oXygen. We tested 
this on Mac, Windows and Linux. Can you try without the lang attribute 
from the command line - I suspect you will get the same result as with 
lang="cs" on that machine.
Anyway, we will investigate more on what is happening and come back with 
more details as soon as we have them.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 7/24/12 4:58 PM, Jirka Kosek wrote:
> 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>&#xA;</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
>
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>


More information about the oXygen-user mailing list