Loading TOC...


   $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.

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.


  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] )

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.