Joel:
Have you tried simply in XSLT e.g., <xsl:sort lang=“grc” select=“your/xpath/here”/> without setting up or specifying a collation?
Tom
Tom Elliott, Ph.D.
Associate Director for Digital Programs and Senior Research Scholar
Institute for the Study of the Ancient World (NYU)
http://isaw.nyu.edu/people/staff/tom-elliott
On Feb 19, 2014, at 8:22 PM, Kalvesmaki, Joel <[log in to unmask]> wrote:
> One would expect, from two key reference pages...
> http://www.w3.org/TR/xslt-30/#uca-collations
> http://www.saxonica.com/documentation/extensibility/collation.html
> ...that the lines in an XQuery or XSLT should read...
>> collation="http://www.w3.org/2013/collation/UCA?lang=grc"
> ...for XSLT 3.0 or...
>> collation="http://saxon.sf.net/collation?lang=grc;ignore-modifiers=yes"
> ...for Saxon-specific implementation. But neither one has worked (in fact for the first, my oXygen returns an XTDE1035 error, despite the 3.0 invocation in my stylesheet), even when grc is replaced by gr, and even though other language-specific collations (e.g., lang=de) do work.
>
> Has anyone else faced, and gotten around, these problems?
>
> I have a kind of workaround in place using fn:translate (code pasted below; apologies if it throws off your horizontal scroll, but it might help others). Even though the technique lends itself to very precise adjustments, it doesn't seem to exude the spirit of best practices.
>
> I also realize that my question might be more suitable for oXygen's forum, but I wanted first to see if there are considerations that don't rely upon any individual tool.
>
> Best wishes,
>
> jk
> --
> Joel Kalvesmaki
> Editor in Byzantine Studies
> Dumbarton Oaks
> 1703 32nd St. NW
> Washington, DC 20007
> (202) 339-6435
>
> translate($gr,'ἀἁἂἃἄἅἆἇἈἉἊἋἌἍἎἏὰάᾀᾁᾂᾃᾄᾅᾆᾇᾈᾉᾊᾋᾌᾍᾎᾏᾰᾱᾲᾳᾴᾶᾷᾸᾹᾺΆᾼΆΑάαΒβϐΓγΔδἐἑἒἓἔἕἘἙἚἛἜἝὲέῈΈΈΕέεϵ϶ΖζἠἡἢἣἤἥἦἧἨἩἪἫἬἭἮἯὴήᾐᾑᾒᾓᾔᾕᾖᾗᾘᾙᾚᾛᾜᾝᾞᾟῂῃῄῆῇῊΉῌͰͱΉΗήηΘθϑϴἰἱἲἳἴἵἶἷἸἹἺἻἼἽἾἿὶίῐῑῒΐῖῗῘῙῚΊΊΐΙΪίιϊϳΚκϏϗϰΛλΜμΝνΞξὀὁὂὃὄὅὈὉὊὋὌὍὸόῸΌΌΟοόΠπϺϻῤῥῬΡρϱϼΣςσϲϹϽϾϿΤτὐὑὒὓὔὕὖὗὙὛὝὟὺύῠῡῢΰῦῧῨῩῪΎΎΥΫΰυϋύϒϓϔΦφϕΧχΨψὠὡὢὣὤὥὦὧὨὩὪὫὬὭὮὯὼώᾠᾡᾢᾣᾤᾥᾦᾧᾨᾩᾪᾫᾬᾭᾮᾯῲῳῴῶῷῺΏῼΏΩωώϖϚϛϜϝϞϟϘϙͲͳϠϡϷϸϢϣϤϥϦϧϨϩϪϫϬϭϮϯ᾽ι᾿῀῁῍῎῏῝῞῟῭΅`´῾ʹ͵Ͷͷͺͻͼͽ;΄΅·','ααααααααααααααααααααααααααααααααααααααααααααααααααβββγγδδεεεεεεεεεεεεεεεεεεεεεεζζηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηηθθθθιιιιιιιιιιιιιιιιιιιιιιιιιιιιιιιιιιιικκκκκλλμμννξξοοοοοοοοοοοοοοοοοοοοππϻϻρρρρρρρσσσσσσσσττυυυυυυυυυυυυυυυυυυυυυυυυυυυυυυυυυυφφφχχψψωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωϛϛϝϝϟϟϙϙϠϠϡϡϸϸϣϣϥϥϧϧϩϩϫϫϭϭϯϯ')
> ________________________________
> From: The Digital Classicist List [[log in to unmask]] on behalf of James Tauber [[log in to unmask]]
> Sent: Wednesday, February 19, 2014 10:04 AM
> To: [log in to unmask]
> Subject: [SPAM - Header] - Re: [DIGITALCLASSICIST] XQuery / XSLT collate for ancient Greek - Email found in subject
>
> In my experience, the Default Unicode Collation Element Table (DUCET) does collate polytonic Greek correctly without modification.
>
> If that's what Saxon uses by default (or even as an option), then you should be good to go with that.
>
> As a side note: if there is anyone here using Python, I wrote an implementation of the Unicode Collation Algorithm, pyuca <https://github.com/jtauber/pyuca> which can be used for correct sorting of polytonic Greek in Python scripts.
>
> James
> --
> James Tauber
> http://jktauber.com<http://jktauber.com/>/
>
>
> On Wed, Feb 19, 2014 at 3:48 AM, Tom Elliott <[log in to unmask]<mailto:[log in to unmask]>> wrote:
> Joel:
>
> I’m not familiar with this issue in XQuery, but in XSLT processing with Saxon, as long as you pass the language info, the default Unicode sort order seems to do ok (though I haven’t interrogated it closely).
>
> Tom
>
> Tom Elliott, Ph.D.
> Associate Director for Digital Programs and Senior Research Scholar
> Institute for the Study of the Ancient World (NYU)
> http://isaw.nyu.edu/people/staff/tom-elliott
>
>
>
> On Feb 17, 2014, at 7:46 PM, Kalvesmaki, Joel <[log in to unmask]<mailto:[log in to unmask]>> wrote:
>
>> Greetings,
>>
>> In writing an XQuery transformation (and using a Saxon engine) I went looking for something to fill out the X's in the line...
>> declare default collation "XXXXXX";
>> ...for ancient Greek, and discovering one was not as easy as I had expected. I'm sure that many have been written and are even available for everyone's use. But if no one can find such collations, many more will be written, unnecessarily. This seems like this sort of material that should be (but is currently not) on the Digital Classicist wiki. Any help?
>>
>> jk
>> --
>> Joel Kalvesmaki
>> Editor in Byzantine Studies
>> Dumbarton Oaks
>> 1703 32nd St. NW
>> Washington, DC 20007
>> (202) 339-6435<tel:%28202%29%20339-6435>
>
>
|