do-if

Causes the actions specified by the first <arg-actions> to be performed if the conditions specified by <arg-conditions> evaluate to true or the actions specified by the second <arg-actions> (if it exists) to be performed if the conditions specified by <arg-conditions> evaluate to false.

Example

<do-if> 
 <arg-conditions>
  <and>
   <if-op-attr name="Given Name" op="equal" mode="nocase">fred</if-op-attr>
  </and>
 </arg-conditions> 
 <arg-actions> 
  <do-set-dest-attr-value name="Surname"> 
   <arg-value type="string"> 
    <token-text>Flintstone</token-text>
   </arg-value> 
  </do-add-dest-attr-value> 
 </arg-actions>
 <arg-actions> 
  <do-set-dest-attr-value name="Surname"> 
   <arg-value type="string"> 
    <token-text>Rubble</token-text>
   </arg-value> 
  </do-add-dest-attr-value> 
 </arg-actions>
</do-if>

Allowed Content

Element

Description

arg-conditions

Conditions argument.

arg-actions

Actions argument.

Attributes

Attribute

Possible Values

Default Value

disabled

true | false

True if this element is disabled.

false

notrace

true | false

True if this element should not be traced during execution of the policy.

false

Content Rule

( arg-conditions , arg-actions , arg-actions ? )

Parent Elements

Element

Description

actions

Actions that are performed by a <rule>.

arg-actions

Actions argument.