
dls:document-versions-query( $uri as xs:string ) as cts:properties-fragment-query
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. |
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";
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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.