Subject: Re: [xsl] alphabetic set of xsl:result-document From: James Cummings <cummings.james@xxxxxxxxx> Date: Tue, 23 Aug 2005 14:54:06 +0100 |
On 8/22/05, David Carlisle <davidc@xxxxxxxxx> wrote: > > > > The actual xslt I've been hacking has an x:replace() > > function replacing certain characters (u/v i/y thorn/th) for > > Note that the xslt2 way of doing comparisons that are insensitive to such > differences is really to specify a collation that does the right thing. > However if saxon doesn't provide (or give acces to a java) collation > that does the right thing for you that would mean writing (er something) > in java that saxon sees as a collation, in which case you might find it > easier to do a string replace within xslt. (I probably would, but my > xslt is rather better than by java). Ok, I don't know much about collations in this context. What I'm doing now is a string replace function in the xslt like: ----- <xsl:function name="x:replace"> <xsl:param name="string"/><xsl:param name="list"/> <xsl:value-of select=" if(empty($list)) then $string else x:replace(replace($string,$list[1],$list[2]),$list[position()>2])"/> </xsl:function> ----- And so using it like: <xsl:for-each-group select="//div[@type='psalm']//w" group-by="substring(x:replace(lower-case(.), ('y', 'i', 'u','v', 'þ', 'th', 'ȝ', '3', '&', '', ';', '')),1,1)"> Is there a simpler and/or better way to do this using saxon? -James -- James Cummings, Cummings dot James at GMail dot com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] alphabetic set of xsl:res, David Carlisle | Thread | [xsl] () equivalent to () ?, Frans Englich |
Re: [xsl] alphabetic set of xsl:res, James Cummings | Date | [xsl] XPath 1.0 id() function, Nadia . Swaby |
Month |