Subject: [xsl] Re: Efficient dictionary lookup|
From: Martin Holmes <mholmes@xxxxxxx>
Date: Thu, 22 Mar 2012 17:49:20 -0700
[SNIP]On 22/03/2012 21:39, Martin Holmes wrote: > HI all, > > As part of a small pilot project, I'm implementing a set of spelling > normalization rules applied through XSLT 2.0 using Saxon 9. One > operation that happens extremely frequently is a dictionary lookup;
sounds like you want to use a key then the processor will almost certainly create an efficient lookup index.
If your dictionary is in a file say dict.xml <words> <word>one</word> <word>hello</word> </words>
<xsl:key name="w" match="word" use="."/>
declares the index and
will return the word if it is in the dictionary.