Subject: Re: [xsl] XSLT for Extensibility From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Sun, 30 Jan 2005 07:32:32 +1100 |
> How do you allow the user to plug in new tasks? > > This is a general problem I'm having, how do you create hooks, > callbacks, er, how do you create an XSLT framework? > Read about FXSL. It is a system to build and use higher-order functions in pure XSLT. FXSL functions can be passed as parameters (callbacks) or returned as results. They also are curried functions in that they allow for partial application -- applying a function on less arguments than the function accepts results in the return of another function, which accepts only the missing arguments and then behaves as the original function. The latest version of FXSL for XSLT 2.0 allows one to wite xsl:function 's in this way. Also, it is possible to create a HOF wrapper around any other function, including the standard XPath 2.0 Functions and Operators and the standard XSLT functions and also useful constructs. FXSL provides such HOF wrappers for nearly all XPath 2.0 F & O's. This means that XSLT 2.0 + FXSL is a functional programming system with full support for higher-order function programming. FXSL also provides its own implementation of almost all Haskell Prelude functions (such as foldr, foldl, map, scanl, zip-with, split, span, drop, filter, ... etc.), which serve as the kernel for building other useful HOF. > -- > > I asked elsewhere, and pipelines were suggested This is naturally done in FXSL by functional composition. As result otherwise difficlut problems can be solved in a one-liner XPath expression. Read more about FXSL at: http://fxsl.sf.net Cheers, Dimitre Novatchev.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLT for Extensibility, Alan | Thread | [xsl] Assign the xsl:copy-of output, Aasia Haroon |
[xsl] XSLT for Extensibility, Alan | Date | [xsl] Assign the xsl:copy-of output, Aasia Haroon |
Month |