 
 
 
 
 
 
 
  
  <condition name="IF_Example">
    <in name="i" type="integer" />
    <in name="j" type="integer" />
    <outThen name="out1" type="integer" />
    <outElse name="out2" type="integer" />
    <!-- IF Condition must be written in XQuery language -->
    <if>$i lt $j</if>
    <then>out1=i;</then>
    <else>out2=j;</else>
  </condition>
Note that all the operators and functions defined in the XQuery standard (see
http://www.w3.org/TR/xquery-operators/) can be used to make the boolean
expression of the <if> tag. These can process both numerical and
string variables, and can also contain XPath expressions to access elements of
an array when the input port type is an array (for ex. the expression ``
contains($inlistitem[1]text(), 'a') '' tests if the 1st element
of the array provided by the 'in' port contains the letter 'a').