This is the XPointer module, which is used with the modular documents CPF application.
To use the XPointer module as part of your own XQuery module, include the following line in your XQuery prolog:
import module namespace xp = "http://marklogic.com/xpointer" at "/MarkLogic/xinclude/xpointer.xqy"
The library namespace prefix xp is not predefined in the server.
xp
xquery version "1.0-ml" import module namespace xp = "http://marklogic.com/xinclude/xpointer" at "/MarkLogic/xinclude/xpointer.xqy"; let $node := <root xmlns="http://marklogic.com/myns"> <this> This is text before the referenced element. <that>The referenced element.</that> This is text after the referenced element. </this> </root> return xp:dereference($node, "xmlns(ns=http://marklogic.com/myns) xpath(//ns:this/ns:that)") ===> <that xmlns="http://marklogic.com/myns">The referenced element.</that>