Loading TOC...

MarkLogic 10 Product Documentation
cpf:document-set-state

cpf:document-set-state(
   $doc as xs:string,
   $state as xs:anyURI
) as empty-sequence()

Summary

Set the document's state to the given state.

Parameters
doc The URI of the document.
state The new state of the document.

Usage Notes

Setting a document's state may trigger content processing. If the document is currently being actively processed by the content processing framework, changing its state may have unexpected results. Manually setting the document's state should therefore be done only on documents whose processing status is "done".

Example

  xquery version "1.0-ml";
  import module namespace cpf = "http://marklogic.com/cpf" 
		  at "/MarkLogic/cpf/cpf.xqy";

  cpf:document-set-state( "/myDocs/example.xml", 
                          xs:anyURI("http://marklogic.com/states/reprocess") )
  

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