Extracted XQuery to XPathFunction mapper