About Stage Condition XQuery Expressions

This topic describes how to use the Transformation Sequence editor, Dependencies tab, Stage Condition subtab, Expression area, XQuery subtab to write an expression that determines whether a particular transformation stage should be run. To see the Stage Condition subtab, you must select a transformation stage in the tree on the Dependencies tab.

  • Context: The input document is the complete set of target order items.

  • Prolog: You can declare the order item property and parameter namespaces in the XQuery prolog. For example:

    	declare namespace prop='http://oracle.communications.broadband';
    
    declare namespace parm='http://oracle.communications.broadband';
    
  • Body: The XQuery body returns a Boolean, with true meaning that the transformation stage should be run and false meaning that the transformation stage should not be run.

The following example shows an XQuery expression that returns true if certain parameters have not been defined, and false if the parameters are already defined.

declare namespace prop='http://oracle.communications.cso';
declare namespace parm='http://oracle.communications.broadband';
not(fn:exists(osm:properties/prop:Parameters[fn:exists(parm:uploadSpeed) and fn:exists (parm:downloadSpeed)]))