Re: [xsl] RE: String manipulation in XSLT

Subject: Re: [xsl] RE: String manipulation in XSLT
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 21 Oct 2005 06:40:20 +1000
On 10/21/05, Arun Manta <arunm@xxxxxxxxxxxxxx> wrote:
> I have a string of the form "abc.def.ghi" (java namespace ) where "abc.def" is the package name and "ghi" is the class name.
> I need to extract these two from the complete string : "abc.def.ghi" -------→ "abc.def" + "ghi"
>
> In java this would take about 1-2 lines of code, but in XSLT I cannot figure out a way to do it without writing tons of code.
> Why is the support for string manipulation and regular expressions non-existent in XSLT, when XML is all about text ( more than java etc.. )??
>
> I'm constantly frustrated by trying to write little templates to do these simple things like splitting a string etc.

This is just one reason to use FXSL -- there you'll find some of these
tasks already solved for you.

More important is the approach in FXSL to treat a string as a list of
characters and to process a string in the same way as a list. Then one
can use all the relevant powerful functions existing in FXSL.

Therefore, it comes as no surprise that there have been FXSL-based
solutions to most challenging string processing tasks (such as
tokenisation, text justification, spelling checking, finding
alternatives to a misspelled word, etc.)

The only big task (not enough free time for this) is implementing a
complete lexical-generator and parser generator compiler-compiler type
system written entirely in XSLT.

Would someone specify what functions should be present in a core
string-processing library?



Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.

Current Thread