MarkLogic 10 Product Documentation
p:condition

p:condition(
   $module as xs:string,
   $description as xs:string?,
   $options as element()?
) as element(p:condition)

Summary

Construct a condition element.

Parameters
module The path to the module to evaluate.
description A description of the condition.
options The options element to pass to the module as the external variable $cpf:options. The options element will be in the namespace of the module.

Example

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

  let $options := 
     <options xmlns="/app/test-root.xqy">
        <root>workitem</root>
     </options> 
  return p:condition("/app/test-root.xqy", (), $options )
         ===> returns 
            <p:condition xmlns:p="http:marklogic.com/cpf/pipelines">
               <p:module>/app/test-root.xqy</p:module>
               <options xmlns="/app/test-root.xqy">
                 <root>workitem</root>
               </options> 
            </p:condition>
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy