Re: text() word lists
On Fri, 6 Feb 2004, Dimitre Novatchev wrote: > > --- Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote: > > > > Using FXSL and Saxon 7 (This was intended to be essentially an XSLT 1.0 > > solution, until I realized that there cannot be references to variables > > in > > xsl:key -- I need to change this a little bit to work in XSLT 1.0) > > Yes, the only change needed is to change the xsl:key definition to: > > <xsl:key name="kWordByVal" match="word" > use="translate(., > 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', > 'abcdefghijklmnopqrstuvwxyz' > )"/> > > > So, this is an XSLT 1.0 solution -- 50 lines of code. Thanks to both Dimitre and David for the XSLT1 and XSLT2 solutions. I've fiddled with both to do a variety of orders and all seems to be smashingly wonderful. I haven't yet tested them on huge texts or anything, will be interesting to compare the speeds. (Though maybe I'll only want to retrieve the first 30% of results in that case... there'll be lots of single uses at the bottom.) I'll see what other nifty things I can think of to do! Mucho gratias, -James > > > Enjoy, > > Dimitre Novatchev > FXSL developer, > > http://fxsl.sourceforge.net/ -- the home of FXSL > Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html > > > __________________________________ > Do you Yahoo!? > Yahoo! Finance: Get your refund fast by filing online. > http://taxes.yahoo.com/filing.html > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > --- Dr James Cummings, Oxford Text Archive, University of Oxford James.Cummings at ota.ahds.ac.uk http://users.ox.ac.uk/~jamesc/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format