[XSL-LIST Mailing List Archive Home]
Re: [xsl] questions about XSLT philosophy: how much is too much?
Subject: Re: [xsl] questions about XSLT philosophy: how much is too much?|
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 19 Mar 2003 08:14:52 -0800 (PST)
---- "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx> wrote:
> so what's next? adding even more math functions? max()?
> min()? i notice in kay's book the list of exclusively
> saxon-related extensions, including more math functions,
> set functions and the like.
max and min are only of average difficulty. Some more challenging
examples of what can be accomplished with XSLT can be seen at:
Just to name a few:
- higher order functions
- functional composition
- partial application, currying
- dynamic creation of functions
- generic iteration
- generic recursion over lists
- generic recursion over trees
- mapping, zipping, splitting, filtering of lists
- generic binary search in Ordered
- generic sort in Ordered
- generic recursion over the characters of a string
- mapping, zipping, splitting, filtering of lists of characters
- string tokenisation, trimming and reversal
- text justification
- spelling checking and generation of correct close words.
- numerical differentiation
- numerical integration
- limits of sequences
- trigonometric functions, hyperbolic trigonometric functions
- logarithmic and exponentiation functions
- inverse trigonometric functions.
- roots of a continuous function with one real variable.
- random numbers, random numbers with specified distribution.
- randomisation of lists/node-sets.
- implementation of lazy evaluation.
- implementation of a mechanism (closely matching the "Monad
someType" class) for using reliably functions with side effects.
(the last two are not yet published).
> it seems
> that a lot of what XSLT is being used for is starting to
> push the bounds of what i initially considered stylesheet
> "transformation", and that XSLT is getting strangely close
> to being a fully-featured programming language.
Nothing strange -- XSLT is Turing-complete and this means that it is in
the group of the most powerful languages.
What some people argue is whether it is easy to accomplish the above
tasks in XSLT.
The conclusion from my own practice is that this is not so difficult
when the XSLT programmer is supported by a library of higher order
functions, which implement some most general functional programming
> so i'm curious. what is the eventual goal?
1. To support the development of portable XSLT applications.
2. To simplify XSLT programming and make it a more efficient process
by increasing the possibilities of components reuse.
3. Purely aesthetical, to use a functional programming language
(contrasted to an imperative one) has an aesthetic and intellectual
value in itself.
4. To contribute to the understanding of XSLT, (hopefully) to help in
the further development of XSLT.
http://fxsl.sourceforge.net/ -- the home of FXSL
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list