
dls:document-history( $uri as xs:string ) as element(dls:document-history)
Returns the version history of the document located at the specified URI.
| 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";
dls:document-history("/foo/bar/baz.xml")
=>
<dls:document-history uri="/foo/bar/baz.xml" xmlns:dls="http://marklogic.com/xdmp/dls">
<dls:version>
<dls:version-id>1</dls:version-id>
<dls:document-uri>/foo/bar/baz.xml</dls:document-uri>
<dls:latest>false</dls:latest>
<dls:created>2009-04-07T13:54:26.721-07:00</dls:created>
<dls:replaced>2009-04-14T13:52:21.674-07:00</dls:replaced>
<dls:author>10677693687367813363</dls:author>
<dls:annotation>part insert</dls:annotation>
<dls:deleted>false</dls:deleted>
</dls:version><dls:version>
<dls:version-id>2</dls:version-id>
<dls:document-uri>/foo/bar/baz.xml</dls:document-uri>
<dls:latest>true</dls:latest>
<dls:created>2009-04-14T13:52:21.674-07:00</dls:created>
<dls:author>10677693687367813363</dls:author>
<dls:annotation>Changed the title from Baz Gets Down</dls:annotation>
<dls:deleted>false</dls:deleted>
</dls:version>
</dls:document-history>
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.