On 8/22/05, David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> 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[(_at_)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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--