Functional XSLT/XPath/XQuery - #4 Monad pattern