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

Re: [xsl] EXSLT and XSLT 2.0


Subject: Re: [xsl] EXSLT and XSLT 2.0
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 14 Oct 2008 16:09:34 -0700

On Tue, Oct 14, 2008 at 3:16 PM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>> Is it fair to say that except maybe for some of the math
>> functions, all extension functions and elements in EXSLT are
>> completely irrelevant if you are using XSLT 2.0? EXSLT is
>> mostly of the past?
>>
>> Have I overlooked something useful?
>
> I think the string handling is all redundant. Most of the date and time
> handling is redundant, except for date:parse-date() but I don't think that's
> widely implemented.

To add to this statement (with which I completely agree), it seems
that most of the "set" module functions (such as set intersection and
difference) are not needed, as there is good XPath 2.0 support for
this ( the standard XPath 2.0 F & O operators/functions like op:union,
op:intersect, op:except, fn:deep-equal).

set:distinct() was helpful before, but we have very natural grouping
constructs in XSLT 2.0 and the standard Xpath 2.0 fn:distinct-values.

EXSLT certainly does not offer any support for sequences, as these had
not been suggested yet at the time EXSLT was defined.


> Random number generation and thr trigonometric functions
> are still very useful. And as David says, there's still no dyn:evaluate().


FXSL provides random number generation and the trigonometric
functions. FXSL is a set of functions written in pure XSLT 2.0 and
does not require any additional library or implementation support.

Certainly, FXSL offers a lot more types of functions, such as
exponential and logarithmic functions, trigonometric and inverse
trigonometric functions, solving one variable equations in R
(Newton-Raphston method). Differentiation and definite integral
calculation are also provided. Some generic graph-traversal functions
are provided.

FXSL offers a lot of text-processing functions, such as text
justification, spell-check and generating candidate words, indexing
and concordance.

FXSL provides a generic LR-1 Parsing Framework with which the user can
implement a parser for any LR-1 language. This has been exploited in
producing a parser for JSON and providing the ability to treat a JSON
object as an XML document. Another application is an XPath 2.0 parser
and this could be used as a starting point to implement dyn:evaluate()
(however I have never felt pressing need for such capability).

Of course, the most significant fact about FXSL is the set of generic
higher-order functions for list processing (folding), function
application, partial application (currying or closure), transitive
closure, iteration, etc. People, who know Haskell will quickly
understand that FXSL implements most of the functions in the Haskell
Prelude module.



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play



>
> Michael Kay
> http://www.saxonica.com/


Current Thread
Keywords