1. fxsl



Dimtre Novatchev

What is it? Dimtre tells us:

FXSL is a native XSLT 1.0/2.0 implementation of Higher-Order-Functions (HOF) in the XSLT language.

FXSL + XSLT 2.0 is essentially a complete and closed functional programming system.

The completeness and closedness refer to the ability to make (almost) any standard XPath 2.0 and XSLT 2.0 function a HOF, and the ability to create new HOFs from once that are already defined, by functional composition and currying/partial-application.

The completeness is also the result of implementing a "kernel" of functions, which have direct 1:1 correspondence (actually almost always have identical names and signatures) to the functions defined in the Haskell Prelude.

Until now it was believed that although XSLT is based on functional programming ideas, it is not as yet a full functional programming language, as it lacks the ability to treat functions as a first-class data type. Based on numerous concrete XSLT implementations of some of the major functional programming design patterns, including some of the most generic list-processing and tree-processing functions, this article provides ample proof that XSLT is in fact a full-pledged functional programming language. The presented code forms the base of a first XSLT functional programming library. It is emphasized that a decision to include higher-order functions support in XPath 2.0 will make functional programming in XSLT even more straightforward, natural and convenient.

fxsl is available for XSLT 1.0, and now 2.0. Also for MSXSL, Saxon and XALAN. Its home page is sourceforge, and topxml as articles on its use.

Announce: FXSL for XSLT 2.0 (version 1.1)

for XSLT 2.0 (version 1.1) has been released and can be downloaded from: sourceforge

There is a mailing list (forum) at sourceforge