On Tue, 2023-03-21 at 15:43 +0100, Martina Filosa wrote:
> I understand that I have to tweak results-to-html in
> ROOT/stylesheet/solr probably with the same snippet of code we used
> for the alphabetical order of the indices in indices.xsl
You want to add xsl:sort to the xsl:apply-templates call for unselected
facets in results-to-html.xsl on line 72. This is within the template
matching on lst[@name='facet_fields']/lst in the mode search-results.
You might, as an experiment, add a lang attribute to the xsl:sort
without doing the translation, just to see whether that helps. It's not
a generic solution: even if there is a pre-defined collation for grc,
there is no language information for the facet, nor any guarantee that
the facet values are in the same language. Of course, if you know that
all the values in a given facet are in the same language, you can
specify the language on a facet-by-facet basis, which might work well
enough.
As a second experiment, if you're willing to upgrade the version of
Saxon you are using[1], you might specify a collation attribute to the
xsl:sort without doing the translation, with an appropriate collation
URI. URIs you might try (one at a time) are:
*
http://www.w3.org/2013/collation/UCA?strength=primary
*
http://www.w3.org/2013/collation/UCA?strength=primary&normalization=yes
This may not work at all, but if one of the URIs produces the effect
desired, it is probably a better approach than using the translate
hack.
If you don't get one of the experimental solutions working, just use
the same xsl:sort as is used in the indices.
[1] Download the JAR files from
https://github.com/Saxonica/Saxon-HE/raw/main/12/Java/SaxonHE12-1J.zip
and place them all (including those in the lib directory of the ZIP
file) into webapps/ROOT/WEB-INF/lib and remove the previous saxon JAR
files. Restart EFES.
Jamie