xinc:link-expand( $context as node(), $ref as element(xi:include) ) as node()*
This function performs a single level expansion of a single XInclude reference. XInclude references in the referenced node will not be expanded.
Parameters | |
---|---|
context | The root node containing the XInclude reference, which is used for the interpretation of relative links with empty href attributes. |
ref | An XInclude include element. |
xquery version "1.0-ml"; import module namespace xinc = "http://marklogic.com/xinclude" at "/MarkLogic/xinclude/xinclude.xqy"; declare namespace xi="http://www.w3.org/2001/XInclude"; let $root := fn:doc("http://example.org/mydoc.xml") return xinc:link-expand( $root, $root/section[1]/xi:include[1] )