2.2.11.3 Property Expression

The protocol server MUST interpret property expressions as a sequence of one or more property constraints joined implicitly (without AND or OR operators between them) or using operators AND or OR. If there are no operators between constraints, the protocol server MUST interpret an expression in the same way as if AND was present. The protocol server MUST allow a constraint to be negated by using the NOT operator.

The protocol server MUST use the following rules to match the property expression against the items:

  • When an AND operator is used, the expression matches the item if both constraints on the left and right of the operator match the item;

  • When an OR operator is used, the expression matches the item if any one or both constraints, on the left and right of the operator match the item;

  • When a NOT operator is used, the expression matches the item if the constraint does not match the item;

The ordering of priority for AND, OR, and NOT operators is explicitly expressed by the following grammar rules. NOT has highest priority, then AND, then OR, and an implicit join has the lowest priority.

 property-expression = property-or-expression
 property-expression =/ property-expression *ws property-or-expression
 property-or-expression = property-and-expression
 property-or-expression =/ property-or-expression *ws or-operator *ws property-and-expression
 property-and-expression = property-not-expression
 property-and-expression =/ property-and-expression *ws and-operator *ws property-not-expression
 property-not-expression = property-constraint
 property-not-expression =/ not-operator *ws property-constraint