General syntax |
<specialAttribute name="regexp" [value="regexp" regexpid="my_id"
invert="false"] />
|
Description |
Tests if a special attribute exists. The optional
value defined matches if the attribute has the given value. For each positive
matching special attribute, all child instructions of the node will be executed.
This test is an alias instruction for 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 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 characters: [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 defined as True and the criteria do
not match, the child instructions will be executed. |
Examples |
<!-- tests if a special attribute class.name with value AC exists. If exist execute the client
instructions -->
<specialAttribute name="class.name" value="AC">
...client instructions...
</specialAttributettribute>
<!-- tests if a special attribute class.name exist and the value starts of the the class.name with SYM.
If exist execute the client instructions-->
<specialAttributettribute name="class.name"
value="SYM(.*)">
...client instructions...
</specialAttributettribute>
<!-- tests if a special attribute part.number ant with value 123 exist. If exist execute the client
instructions -->
<specialAttributettribute name="part.number" value="123">
...client instructions...
</specialAttributettribute>
<!-- tests if a special attribute part.delete with the value true exist. If exist execute the client
instructions -->
<specialAttributettribute name="part.delete" value="true">
...client instructions...
</specialAttributettribute>
|