Several questions about functional programming languages have got me thinking about whether XSLT is a functional programming language. If not, what features are missing? Has
Saxon-SA has introduced some extension functions which make XSLT functional. You can use saxon:function() to create a function value (actually a {http://net.sf.saxon/java-type}net.sf.saxon.expr.UserFunctionCall
value) which you then call with saxon:call()
.
Saxon-B has similar functionality with the pairing of saxon:expression() and saxon:eval()
. The difference is that saxon:expression()
takes any XPath expression, and saxon:eval()
evaluates it, whereas saxon:function()
takes the name of a function which saxon:call()
calls.