The CPF module is installed as part of the Content Processing Framework. These functions are used by content processing actions to manage the state of the document as it is being processed.
To use the CPF module as part of your own XQuery module, include the following line in your XQuery prolog:
import module namespace cpf = "http://marklogic.com/cpf"
The library namespace prefix
cpf is not predefined in
|cpf:check-transition||Verify that the current transition is the correct one for the document.|
|cpf:document-get-error||Fetch a trace of the error that caused the document's processing to fail, if any.|
|cpf:document-get-last-updated||Determine the date and time of the last update to the document's content, if any.|
|cpf:document-get-processing-status||Determine the document's current processing status, if any.|
|cpf:document-get-state||Determine the document's current state, if any.|
|cpf:document-set-error||Set the document's error trace to the given value.|
|cpf:document-set-last-updated||Set the date and time of the document's last update.|
|cpf:document-set-processing-status||Set the document's processing status to the given value.|
|cpf:document-set-state||Set the document's state to the given state.|
|cpf:failure||Concludes the state action in failure, advancing the state as defined by the state transition.|
|cpf:success||Concludes the action successfully, advancing the state as defined by the transition.|