Subject: Re: [xsl] XSLT Text Processing: Fun with Anagrams From: "Rashmi Rubdi" <rashmi.sub@xxxxxxxxx> Date: Tue, 24 Apr 2007 22:24:25 -0400 |
It took me a while to figure out the CVS repository since I'm using it the first time on SourceForge -- but anyways, I got everything and tried the 3 XSL sheets you mentioned.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar dictEnglish.xml testGenerateAnagramDict.xsl > output.xml
Everthing looks great in the output except for one small thing: I noticed that words with apostrophes were also being considered.
For example: <aChain key="'aainprsst"><w>aspirant's</w><w>partisan's</w></aChain>
I think the above should be (if I'm not wrong with my understanding of English words): <aChain key="'aainprsst"><w>aspirants</w><w>partisans</w></aChain> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------------------------------------------- java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar dictAnagrams.xml testGetDictAnagrams.xsl > output2.xml which worked out great.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar dummy.xml testGetAnagrams.xsl > output.xml
I don't think there's an option to call an XSL stylesheet without an input XML, so I created a dummy xml file with just one node, but got a blank output.
Please let me know if testGetAnagrams.xsl expects an input XML, if so what it should be.
-Thank you Rashmi
Hi Rashmi,
You should get the FXSL distribution from CVS, not from the zip files, which are almost one year old.
The files you'd be using for the anagrams solution are:
testGetAnagrams.xsl Gets anagrams with a specific key, without an anagram dict.
testGenerateAnagramDict.xsl Produces an Anagram dict from the regular English dct
testGetDictAnagrams.xsl Gets anagrams with a specific key, using an anagram dict
Please, do let me know if you still have any problems accessing the sources.
-- Cheers, Dimitre Novatchev
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT Text Processing: Fun, Dimitre Novatchev | Thread | Re: [xsl] XSLT Text Processing: Fun, Rashmi Rubdi |
Re: [xsl] Generating JSP/JSTL, Joe Dane | Date | Re: [xsl] XSLT Text Processing: Fun, Rashmi Rubdi |
Month |