English wordlist progress
I've done a lot of work on the English wordlist, and discovered that doing grouping in XSLT with Saxon seems to be much faster than doing it in XQuery in eXist, so I'm returning a simpler list of items from eXist and doing all the heavy lifting with <xsl:for-each-group> in XSLT. The English glosses now come down in distinct values, accompanied by a list of Moses headwords that contain the gloss. If you click on the gloss, you now get a distinct list of the Moses headwords, each with its distinct gloss, and then you can click on the headword to retrieve the complete entry. I still haven't figured out how to hide/show the content block under the gloss, because it doesn't come back with a distinct id; the gloss key which is used to look up the entries can't function as an id (it sometimes begins with a number, and has unacceptable characters in it such as asterisks). I'll need to figure out a strategy for this.
Note to self: here's a possibility: The XSLT could use generate-id() to create a unique id for the list item for each gloss, and the gloss could pass that id to GetEntriesForGloss(), which could then include a modified version of it in the div that comes back from the AJAX call. Then it would be easy to do hide/show, and avoid retrieving the same thing multiple times.