N1 Grid Service Provisioning System 5.0 XML Schema Reference Guide

Boolean Operators

This section describes elements that serve as Boolean operators. These elements appear in the condition of an <if> step. Boolean operators can evaluate only to true or false.

<istrue> Boolean Operator

This Boolean operator is used to determine whether a particular value is true. <istrue> contains a single attribute, value, and has no child elements. <istrue> evaluates to true if and only if value equals true. The comparison is case-insensitive.

Attributes for the <istrue> Boolean Operator

The <istrue> operator has one required attribute, value, which is the value to compare against true. This attribute can reference simple substitution variables.


Example 2–7 Using the <istrue> Boolean Operator

The following examples show how <istrue> is used and the results:


<equals> Boolean Operator

This Boolean operator is used to determine whether a particular value is equal to another value. This operator has the value1, value2, and exact attributes. This operator has no child elements, and evaluates to true if and only if value1 and value2 are equal. If exact is true, the values must be exactly the same, including case. If exact is false, the comparison is case-insensitive.

<istrue value="..."/> is a syntactic shorthand for the following statement:


<equals value1="..." value2="true"/>

Attributes for the <equals> Boolean Operator

The <equals> operator has the following attributes:


Example 2–8 Using the <equals> Boolean Operator

The following examples show how <equals> is used and the results:


<matches> Boolean Operator

This Boolean operator is used to determine whether a particular value matches a pattern. This operator has the value, pattern, and exact attributes. This operator has no child elements and evaluates to true if and only if the value of value matches the glob-style pattern contained in pattern. If exact is true, the values must be a case-sensitive match. Otherwise, the values can be a case-insensitive match.

Attributes for the <matches> Boolean Operator

The <matches> operator has the following attributes:


Example 2–9 Using the <matches> Boolean Operator

The following examples show how <matches> is used and the results:


<not> Boolean Operator

This Boolean operator negates the result of another Boolean operator. This operator has no attributes and has a single child element, which is one of the other Boolean operators. This operator evaluates to true only if the value of its contained operator is not true.


Example 2–10 Using the <not> Boolean Operator

The following examples show how <not> is used and the results:


<and> Boolean Operator

This Boolean operator logically ANDs the results of other Boolean operators. This operator has no attributes and can contain any number of child elements, which are the other Boolean operators. The <and> operator evaluates to true only if all of its child elements evaluate to true.


Example 2–11 Using the <and> Boolean Operator

The following examples show how <and> is used and the results:


<or> Boolean Operator

This Boolean operator logically ORs the results of other Boolean operators. This operator has no attributes and can contain any number of child elements, which are the other Boolean operators. The <or> operator evaluates to true only if it contains at least one child element that evaluates to true.


Example 2–12 Using the <or> Boolean Operator

The following examples show how <or> is used and the results: