Loading TOC...

MarkLogic 12 EA 2 Product Documentation
temporal:document-period

temporal:document-period(
   $temporal-collection as xs:string,
   $axis as xs:string,
   $root as node()
) as xs:dateTime*

Summary

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.

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

Example


xquery version "1.0-ml"; 
 
import module namespace temporal = "http://marklogic.com/xdmp/temporal" 
      at "/MarkLogic/temporal.xqy";

temporal:document-period("temporal", "valid", 
  fn:doc("clue.xml.7788866244426452375"))

(: Returns the period for the valid axis set for the document, 
   "clue.xml.7788866244426452375". :)

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