T
Tom Wright
Hi all
I'm using the following code with Apache and mod-xslt but it's not sorting
the elements as I want it to. At the moment, it sorts them with all items
starting with an uppercase letter first, like this:
A B C a b c
no matter what the setting of the case-order attribute is. It
rather looks like it's sorting them by ASCII (or unicode..?)
character order, rather than according to the language setting.
The lang attribute should be inferred automatically from the
system environment, but even if it is set manually (to "en-GB"),
the sort still does not work as expected.
According to the manual, with the attribute set to upper-first, it should do
this:
A a B b C c
....and with it set to lower-first, it should do this:
a A b B c C
Here's the code:
<xsl:apply-templates select="bookmark|alias[name(id(@ref)) = 'bookmark']"
mode="main">
<xsl:sort select="concat(title,id(@ref)/title)" lang="en-GB"/>
</xsl:apply-templates>
Thanks!
I'm using the following code with Apache and mod-xslt but it's not sorting
the elements as I want it to. At the moment, it sorts them with all items
starting with an uppercase letter first, like this:
A B C a b c
no matter what the setting of the case-order attribute is. It
rather looks like it's sorting them by ASCII (or unicode..?)
character order, rather than according to the language setting.
The lang attribute should be inferred automatically from the
system environment, but even if it is set manually (to "en-GB"),
the sort still does not work as expected.
According to the manual, with the attribute set to upper-first, it should do
this:
A a B b C c
....and with it set to lower-first, it should do this:
a A b B c C
Here's the code:
<xsl:apply-templates select="bookmark|alias[name(id(@ref)) = 'bookmark']"
mode="main">
<xsl:sort select="concat(title,id(@ref)/title)" lang="en-GB"/>
</xsl:apply-templates>
Thanks!