conditions

The conditions under which the <actions> of the enclosing <rule> are performed. The <conditions> are always specified in Conjunctive Normal Form (CNF) or Disjunctive Normal Form (DNF). As such, the content of <conditions> is either a disjunction of conjunctions specified by a (possibly empty) set of <and> elements or a conjunction of disjunctions specified by a (possibly empty) set of <or> elements. The <actions> of the enclosing <rule> are only performed when the logical expression represented in CNF or DNF evaluates to true or when no conditions are specified.

Remarks

The evaluation of the conditions uses short-circuit logic so that no additional tests are performed when it is possible to determine the resultant Boolean value of the <conditions>.

All individual condition tests are represented by an element of the form <if-* op=“some operator”>.

Some condition tests have a mode parameter that indicates the algorithm to use for comparisons. The following table details the modes that are available.

Element

Description

case

Character-by-character case-sensitive comparison.

nocase

Character-by-character case-insensitive comparison.

regex

Regular expression match of the entire string. Case-insensitive by default, but can be changed by an escape in the expression. See http://java.sun.com/j2se/1.4/docs/api/java/util/regex/Pattern.html and http://java.sun.com/j2se/1.4/docs/api/java/util/regex/Matcher.html#matches().

Pattern options CASE_INSENSITIVE, DOTALL, and UNICODE_CASE are used but can be reversed using the appropriate embedded escapes.

src-dn

Compares using semantics appropriate to the DN format for the source data store.

dest-dn

Compares using semantics appropriate to the DN format for the destination data store.

numeric

Compares numerically.

octet

Compares octet (Base64-encoded) values.

structured

Compares structured attributes according to the comparison rules for the structured syntax of the attribute.

Example

See <policy>.

Allowed Content

Element

Description

and

Logical conjunction.

or

Logical disjunction.

Attributes

None

Content Rule

( and * | or * )

Parent Elements

Element

Description

rule

Rule within a policy.