xinc:link-expand

xinc:link-expand(
   $context as node(),
   $ref as element(xi:include)
) as node()*

Summary

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.

Usage Notes

Since this function only performs a single-level expansion of a single reference, applications will typically call node-expand instead.

Example

  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] )
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy