Balisage Paper: Simplifying XSLT stylesheet development using higher order functions
Higher-order functions (HOFs) are sometimes considered hard to get your head around, but they can help make stylesheets easier to maintain and can even provide a certain degree of information hiding for XSLT libraries. HOFs can be easy to use, and together with the new packaging features of XSLT 3.0 they can dramatically simplify common tasks in XSLT stylesheet and library development. Built-in functions like fn:filter, fn:map, and fn:fold-left/right have many general applications for filtering, binary search trees, and other tasks. HOFs can offer some new challenges, as well; this paper will also discuss some problems to look out for and some things not to do. HOFs are great fun, and with them programming in XSLT will be even more fun than it already is!