Loading TOC...

MarkLogic 10 Product Documentation
dls:document-version-query

dls:document-version-query(
   $version as xs:unsignedLong
) as cts:properties-fragment-query

Summary

This function returns a query that matches the specified version of the managed documents.

Parameters
version The version of the managed documents.

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";

  cts:search(fn:doc(), dls:document-version-query(3))

  (: Returns Version 3 of all of the managed documents in the database. :)
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.