Property expressions in CCML


CCML expresses how to deploy some entity in a given environment. To use a CCML document, it must be resolved against a description of that environment. All versions of CCML provide expressions to test a given attribute or property of the environment for a particular value, and such expressions form the primitives of more complex ones.

  • In version 1.0, use <cc:rel prop="property" arg="argument" op="operator" type="type" />. The default operator is contains; the default type depends on the operator.

  • In versions 0.2,0.3 and 0.4, use <REL prop="property"ARG="argument" OP="operator" TYPE="type" />. The default operator is overlap; the default type depends on the operator.

  • In version 0.1, use <PROPERTY NAME="property" VALUE="argument" />. The type is implicitly string; the operator is overlap.

Types

The type can have the following values:

string

For a set operator, each value is a set of space-separated, case-sensitive strings. Otherwise, each value is a case-sensitive string

label

For a set operator, each value is a set of space-separated, case-insensitive strings. Otherwise, each value is case-insensitive string.

number

Each value is a real base-10 number.

version

Each value is a hierarchical, dotted-decimal version number.

(These lower-case type names are for version 1.0. Earlier versions used upper case.)

Operators

An operator specifies how the named property must relate to the supplied argument. Each operator has a default type. Some operators treat their arguments as sets of the specified type.

CCML Operators
Operator On sets? Default type Meaning
contains Yes string The property's set is a superset of the argument set.
overlaps Yes string The intersection of the property set and the argument set is not empty.
separate Yes string The intersection of the property set and the argument set is empty.
eq number The property value and the argument value are equal.
ne number The property value and the argument value are not equal.
gt number The property value is greater than the argument value.
lt number The property value is less than the argument value.
ge number The propertyvalue is greater than or equal to the argument value.
le number The property value is less than or equal to the argument value.

(These lower-case operator names are for version 1.0. Earlier versions used upper case.)