Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Like the <dlm:audience> element this element must contain at least one and may contain many <attribute> or <parent> elements. In fact the implementing class implements the Evaluator interface enabling the implementing class to be passed back from the factory.

The paren element has one optional attribute "mode" which can contain one of three values: "OR", which is also the default if not specified, "AND", or "NOT". "OR" causes the paren element to evaluate all contained tests and if any of them returns true then it too will return true. "AND" only returns true if all contained tests are true. "NOT" can be used to negate from one to many contained tests. If more than one is included an "OR" operation is first performed on the contained tests and the result is inverted and returned. For a single test its inverse is returned as expected.

<attribute> ELEMENT

Like the <paren> element the class providing the functionality of the <attribute> element implements the Evaluator interface. The <attribute> element can perform five tests on attributes found in the passed in IPerson object. Its supported xml attributes are as follows.

Attribute Name

Description

name

The key of the particular attribute to be tested in the IPerson object.

mode

Indicates the type of test and can be one of the following: exists, equals, contains, startsWith, and endsWith.

value

The value against which the attribute is to be compared. This attribute is not required and indeed is not used for the "exists" mode.

These two elements, <paren> and <attribute>, can be nested to any level as needed.

...