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

Re: XSLT Text Processing: Fun with Anagrams

Subject: Re: XSLT Text Processing: Fun with Anagrams
From: "Rashmi Rubdi" <rashmi.sub@xxxxxxxxx>
Date: Tue, 24 Apr 2007 22:24:25 -0400
Re:  XSLT Text Processing: Fun with Anagrams
Hi Dimitre and everyone,

Thank you for your help and for additional instructions.

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.

I could see the output for:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Then I tried :

--------------------------------------------------------------
java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar dictAnagrams.xml
testGetDictAnagrams.xsl > output2.xml which worked out great.

-------------------------------------------------------------

However I wasn't able to try one more style sheet successfully:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar dummy.xml
testGetAnagrams.xsl > output.xml

I think testGetAnagrams.xsl is supposed to be a stand-alone stylesheet?

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.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Overall, this is excellent demonstration of XSLT's capabilities.

-Thank you
Rashmi

On 4/24/07, Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote:
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

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.