temporal.documentPeriod( $temporal-collection as String, $axis as String, $root as Node ) as ValueIterator
This function returns the period (as a dateTime pair) for the named axis in the document identified by its root node in the named collection.
An TEMPORAL-NOAXISINFO exception is thrown if no information is found in root for the axis.
|$temporal-collection||The name of the temporal collection.|
|$axis||The name of axis from which to get the period.|
|$root||The root node of the document.|
var temporal = require("/MarkLogic/temporal.xqy"); temporal.documentPeriod("temporal", "valid", cts.doc("clue.xml.7788866244426452375")); => Returns the period for the valid axis set for the document, "clue.xml.7788866244426452375".