dls.nodeExpand( node as Node, restriction as cts.query? ) as Node
This function recursively examines the node for XInclude references and expands them, following the rules of the XInclude specification. The result is a node in which all the XInclude references have been resolved, or an error if there were unresolvable references with no fallback specifications. The URIs are mapped according to the specified restrictions.
dls-user
role is required to run
this function, or the privilege:http://marklogic.com/xdmp/privileges/dls-user
xinc:node-expand
to expand such documents.
// Returns the contents of the 'baz.xml' document version that was created // before the specified date, along with all of its referenced nodes. const dls = require('/MarkLogic/dls'); let node = cts.doc('/foo/bar/baz.xml'); dls.nodeExpand( node, dls.asOfQuery(xs.dateTime('2009-04-06T09:39:33.576-07:00')));
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.