MarkLogic 9 Product Documentation
dls:document-version-as-of

dls:document-version-as-of(
   $uri as xs:string,
   $as-of as xs:dateTime
) as document-node()

Summary

This function returns the most recent version of a document as of a point in time.

Parameters
uri The URI of the document.
as-of The date and time from which you want to retrieve the most recent version of the document.

Required Privileges

The dls-user role is required to run this function, or the privilege:
http://marklogic.com/xdmp/privileges/dls-user

Example

  xquery version "1.0-ml";

  import module namespace dls = "http://marklogic.com/xdmp/dls" 
      at "/MarkLogic/dls.xqy";

  dls:document-version-as-of(
                   "/foo/bar/baz.xml",
                    xs:dateTime("2009-04-07T09:43:16.531-07:00")) 

  (: Returns the most recent version of the 'baz.xml' document since the 
     specified date and time. :)
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy