Re: [xsl] What is exciting in XSLT 2.0 (Was: Re: [xsl] parameters in XSLT 2.0)

Subject: Re: [xsl] What is exciting in XSLT 2.0 (Was: Re: [xsl] parameters in XSLT 2.0)
From: James Fuller <jim.fuller@xxxxxxxxxxxxxx>
Date: Wed, 08 Jun 2005 14:40:11 +0200
> I've looked at these, but I confess they don't make much sense to me, 
> given that I neither have a functional programming background nor
> have  any skill or interest in math.


to use functions.....you dont need a functional or math background, the
concept of a function is present in most modern programming languages....

> What sort of general problems can approaches like these solve?

functions in XSLT 2.0 can be used to assist in solving anything you
would use XSLT 2.0, just packages them up nicely for reuse.

basically in XSLT, lets say you have a function that strips out all
leading and trailing whitespace, which u have defined in XSLT 2.0 using
xsl:function with the name strip-leading-following-whitespace.

to use this in your stylesheet (the function definition must be
available either present in the stylesheet or imported) e.g.

<xsl:value-of select="strip-leading-following-whitespace(myelement)"/>

this would perform this func on the myelement element.....by having a
function library, it is easy to reuse (not to mention compose).

the FXSL approach is steeped in what is known as functional programming,
which places function and function composition at the heart of
programming (flow, arch, data structure...)....by porting some of the
most popular functions from Lisp/Haskell Dimitre is able to draw from a
very deep well and well researched field of computing to solve problems
by using a functional approach. Going down this route means you need to
change your computing instincts, esp if you come from a world populated
with objects.

gl, Jim Fuller

Current Thread