[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XSLT Text Processing: Fun with Anagrams


Subject: Re: [xsl] XSLT Text Processing: Fun with Anagrams
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 24 Apr 2007 06:52:23 -0700

Hi Rashmi,

I downloaded the FXSL-XSLT2 zip distribution and tried to run the 2nd
XSLT sheet you've presented against dictEnglish.xml , but got a few
errors.

I think I'm getting the errors because I need to get some of the
latest files from the CVS repository here:
http://fxsl.cvs.sourceforge.net/fxsl/fxsl-xslt2/

I was wondering if there was a way to get the entire repository ,
instead of looking for the files I'm missing.


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
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play




On 4/23/07, Rashmi Rubdi <rashmi.sub@xxxxxxxxx> wrote:
Hi Dimitre,

I was reading the Anagram solution a little more carefully today and
noticed the point you've made .... "....The next logical step is to
persist the indexed document into an Anagram Dictionary and reuse it
from here on......." , I agree that it is a good practice, in fact
some publishing companies store the result HTML and serve HTML pages
to visitors instead of dynamically generating a page per Http Request.

I thought I'll try the anagram example locally.

I downloaded the FXSL-XSLT2 zip distribution and tried to run the 2nd
XSLT sheet you've presented against dictEnglish.xml , but got a few
errors.

I think I'm getting the errors because I need to get some of the
latest files from the CVS repository here:
http://fxsl.cvs.sourceforge.net/fxsl/fxsl-xslt2/

I was wondering if there was a way to get the entire repository ,
instead of looking for the files I'm missing.

This is what I tried so far:
C:\dev\projects\01XSLTPractice\__source\xsl\004anagram\anagram>
 java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar dictEnglish.xml
02create_anagram_dictionary.xsl > output.xml

I get errors similar to the following:

Error at xsl:function on line 673 of
file:/C:/dev/fxsl-xslt2/fxsl-xslt2/f/func-XpathConstructors.xsl:
 XPST0003: SequenceType syntax error at char 0 in {xdt:dayTimeDuration?}:
   There is no imported schema for namespace
http://www.w3.org/2005/02/xpath-datatypes

But the important point is that the distribution of FXSL has many
examples that are interesting and show the applications of XSLT, we
were taught most of them like Fibonacci etc in C, now it's interesting
to see that the solutions are also possible with XSLT.

Although I read version 1.0 of XSLT and XPath, I'm not well versed in
them - nor am I proficient in other programming languages, but now I'm
trying to learn version 2.0 properly from scratch.

Today I just finished the first chapter of XSLT 2.0 reference, and
learned some of the important features of the language, such as it's
declarative nature (rather than procedural) and that it is rules based
(template rules).

Regards
-Rashmi


Current Thread
Keywords