General syntax |
<attributeExists name="regexp" [value="regexp" regexpid="id_name" invert="false"] />
|
Description |
Tests if an attribute exists. The optional value
defined matches if the attribute has the given value. When found first matching
attribute all child instructions of the node will be executed (no further test if more
than one matches available and no further execution of the child instruction for
further matches). This test is an alias instruction for the test Element. |
Attributes |
Name |
Use |
Annotation |
name |
required |
Defines the name of attribute. It can be either a string or any
Regular Expression. |
value |
optional |
Defines the value of ‘name’. The value can be either a string or
any Regular Expression reference. If the optional attribute value is omitted, then the
test will basically just execute an existence check. If the value attribute is
defined, then the test is successful if the value matches the pattern. |
regexpid |
optional |
Defines the unique id within the namespace to reference the test
using regular expressions. Allowed character set: [p{Alnum}\_\-] = [a-z A-Z 0-9 _
-] |
invert |
optional |
The boolean value “true” inverts the behavior of the instruction.
If the attribute is not configured the default value “false” is used and the behavior
of the instruction is not inverted. If the value is set to true and the criteria do
not match, the child instructions will be executed. |
Examples |
<!-- tests if at least one attributes name starts with SYMBOL_ by using a regular expression-->
<attributeExists name="SYMBOL_(.*)" />
<!-- tests if at least one attributes name is starting with SYMBOL_ by using a regular expression and
if its value starts with SYM exists -->
<attributeExists name="SYMBOL_(.*)" value="SYM(.*)/>
|