MarkLogic 9 Product Documentation
dls:document-version-uri

dls:document-version-uri(
   $document-uri as xs:string,
   $version as xs:integer
) as xs: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
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy