General syntax | <class [value="regexp" regexpid="my_id" invert="false"] /> |
Description | Test the class name of the component. This test is an alias instruction for the test Element and specialAttribute Element. |
Attributes | Name | Use | Annotation |
value | optional | 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 of 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 a special attribute class.name exists / is defined -->
<class />
<!-- tests if class name equals AC -->
<class value=" AC" />
<!-- tests if class name starts with AC -->
<class value="AC(.*)" /> |