Is XSLT a functional programming language?

后端 未结 6 1601
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 02:02

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

6条回答
  •  春和景丽
    2020-12-14 02:25

    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.

提交回复
热议问题