Loading TOC...

temporal.axisGetStart

temporal.axisGetStart(
   $axis-name as String
) as cts.reference

Summary

This function returns the range index used to define the start of the period by the named axis.

A TEMPORAL-AXISNOTFOUND exception is thrown if the axis does not exist.

Parameters
$axis-name The name of the axis from which to return the range index.

Example

var temporal = require("/MarkLogic/temporal.xqy");
 
temporal.axisGetStart("system");

// Returns the range index reference used for the start of the period of the 
// axis named, "system." 

Comments

  • If you want to dissect the cts.reference you get back, you can do the following: JavaScript: <code>var temporal = require('/MarkLogic/temporal'); var start = temporal.axisGetStart("mySystem"); start.toObject().elementReference.localname</code> XQuery: <code> import module namespace temporal = "http://marklogic.com/xdmp/temporal" at "/MarkLogic/temporal.xqy"; declare namespace cts = "http://marklogic.com/cts"; <r>{temporal:axis-get-start("mySystem")}</r>/cts:element-reference/cts:localname/fn:string()</code>
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy