dls.documentVersionUri

dls.documentVersionUri(
   document-uri as String,
   version as Number
) as String

Summary

This function returns the URI of the specified version of the document located at the specified URI. The specified version of the document may, or may not, actually exist.

Parameters
document-uri The URI of the latest version of the document.
version The version of the document for which to return the URI.

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-uri("/foo/bar/baz.xml", 2)

  =>

  /foo/bar/baz.xml_versions/2-baz.xml
    

Example

const dls = require('/MarkLogic/dls');

dls.documentVersionUri('/foo/bar/baz.xml', 2)
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy