Lambda the Ultimate

inactiveTopic Dynamic Functions using FXSL
started 3/20/2002; 3:30:39 AM - last post 3/20/2002; 9:33:53 AM
Ehud Lamm - Dynamic Functions using FXSL  blueArrow
3/20/2002; 3:30:39 AM (reads: 1261, responses: 1)
Dynamic Functions using FXSL
Dynamic Functions using FXSL: Composition, Partial Applications and Lambda Expressions.

This article is a follow-up from the recent publication The Functional Programming Language XSLT. Provided here is the answer to a FAQ about functional programming in XSLT: Can functions be created dynamically during run-time and what are some general ways to achieve this?. Using the XSLT functional programming library FXSL, examples are given of performing functional composition, currying and partial application of functions, as well as of dynamically creating a function, which corresponds to a lambda expression.

The first article was discussed on LtU some time ago.

The conclusion of the article may influence you to read it.

Posted to xml by Ehud Lamm on 3/20/02; 3:41:34 AM

Alex Moffat - Re: Dynamic Functions using FXSL  blueArrow
3/20/2002; 9:33:53 AM (reads: 663, responses: 0)
Possibly tangential:

It doesn't cure or ameliorate the semantic difficulties but I have an alternative syntax for xslt that reduces the "noise" introduced by the xml syntax. I've used it to write similar functional xsltxt. For example the compose-flist.xsl stylesheet can be written as shown below

stylesheet "1.0"
namespace "xalan" ""
tpl .name "compose-flist" ("pFunList":"/..", "pArg1")
    when "not($pFunList)"
      copy-of "$pArg1"
      var "vrtfFunRest"
        call "compose-flist" ("pFunList":"$pFunList[position() > 1]",
      apply .select "$pFunList[1]"

An implementation (java) is at that can convert from xsl to "xsltxt" and back. It can also directly work with the javax.xml.transform package to produce stylesheets from "xsltxt" representations.

Any and all comments would be appreciated.