Loading TOC...

MarkLogic Server 11.0 Product Documentation
dls:document-versions-query

dls:document-versions-query(
   $uri as xs:string
) as cts:properties-fragment-query

Summary

This function returns a query that matches any version of the specified URI. If the URI contains either of the wildcard characters '?' or '*', then the search is wildcarded. Specifying '*' matches any numbered version of any managed document.

Parameters
uri The URI 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";

  cts:search(fn:doc(), dls:document-versions-query("/foo/bar/baz.xml"))

  (: Returns the contents of all versions of the 'baz.xml' document. :)
     

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