On Tue, 01 Jun 2010 11:58:40 -0700, Tim Meagher <[email protected]> wrote: > <state-transition> > <annotation>CPF Options Test</annotation> > <state>http://marklogic.com/states/initial</state> > <on-success>http://marklogic.com/states/final</on-success> > <on-failure>http://marklogic.com/states/error</on-failure> > <default-action> > <module>/test-cpf.xqy</module> > <options> > <insert>false</insert> > </options> > </default-action> > </state-transition> > <state-transition>
> > 1. Am I adding the options in the correct part of the XML document > given > that I don't have an execute section? Yes. It goes right after the module path whether in a default action or an execute block. > 2. Can I specify options without a module namespace? It should be in some namespace other than the pipeline namespace itself (in XSD terms, it is a wildcard with namespace=##other). We have the convention of using the module path as the namespace, but you are free to invent your own. > 3. Are the <destination-root/> and <destination-collection/> elements > required? No, not at all. That is just an example of some options that that particular action made use of. You define your options element to contain whatever information your action is going to want to make use of (or your condition, for that matter). CPF will pass that along in the $cpf:options external variable, and then it is up to your action to make of it what you will. > 4. Is it as simple as reading the value of $options/insert in my > module? Yup. Just get the namespaces consistent between your path expression in the action and the namespace of the elements in the pipeline. > I am building toward testing this, but I want to avoid endless > iterations if > I'm just not applying it correctly. No worries. //Mary [email protected] Principal Engineer Mark Logic Corporation _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
