Digital-Humanities-Quarterly / dhq-journal

DHQ is an open-access, peer-reviewed journal of digital humanities.
http://www.digitalhumanities.org/dhq/
11 stars 5 forks source link

Update XSLT for DHQ indexes to XSLT 2 or 3, then fix sorting of author names #69

Closed amclark42 closed 2 weeks ago

amclark42 commented 7 months ago

While testing my fixes for broken links, I discovered a bug in the Authors index: "Sánchez-Salido" is sorted in between "Smith" and "Snickars", not up next to another "Sanchez".

Screenshot of author Sánchez-Salido sorting between Smith and Snickars

The reason appears to be the XSLT code in author_index.xsl which lower-cases capital letters and removes any other characters that aren't a–z (read: diacritics aren't allowed). With this code in place, I believe "Sánchez-Salido" is given a sort key of "snchezsalido".

The complicated code required to make sortable keys is insufficient. To fix it would require an awful lot of complex and unreadable XSLT 1.0 code. Or we could upgrade to XSLT 2.0 or 3.0, and just use lower-case() to generate that sort key. I recommend the latter!

amclark42 commented 2 months ago

I am fixing this as part of my push to make links relative within DHQ.

amclark42 commented 2 weeks ago

Fixed in #89. The solution will be part of the static site rollout.