
dls:document-version-as-of( $uri as xs:string, $as-of as xs:dateTime ) as document-node()
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. |
dls-user role is required to run
this function, or the privilege:http://marklogic.com/xdmp/privileges/dls-user
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. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.