[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: alphabetic set of xsl:result-document

Subject: Re: alphabetic set of xsl:result-document
From: James Cummings <cummings.james@xxxxxxxxx>
Date: Tue, 23 Aug 2005 14:54:06 +0100
meena nanjundeswar
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()&gt;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',
'&#x00FE;', 'th', '&#x021D;', '3', '&amp;', '', ';', '')),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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.