Loading TOC...

dls:document-retention-rules

dls:document-retention-rules(
   $uri as xs:string
) as element(dls:retention-rule)*

Summary

This function returns a sequence of dls:retentionRule element nodes. This allows users to determine why a version of a document is being retained.

Parameters
uri The URI of the document. The URI must identify a numbered version of a managed document or an error is thrown.

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-retention-rules("/foo/bar/baz.xml")

  (: Returns all of the retention rules that apply to the 'baz.xml' document. :)
    

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