Definition and Usage¶
The <rule> element defines simple rules for defining either alternative components or alternative descriptors.
The id attribute is the rule identifier. A rule is established by comparing (comparator attribute) a variable (var attribute) value with an absolute value. The variable shall be a property of the settings node (<media> element of application/x-ncl-settings type), that is, the var attribute must have as its valuea property name of the <media> element of "application/x-ncl-settings" type.
Syntax¶
| Element | Attributes | Content | Parent |
|---|---|---|---|
| <rule> | id, var, comparator, value | -- | <ruleBase> or <compositeRule> |
Attributes¶
| Name | Value | Description |
|---|---|---|
| id | It may receive any string value that begins with a letter or an underscore and that only contains letters, digits, <".">, and <"_">. | The id attribute uniquely identifies the element within a document. |
| var | It may receive any string value that begins with a letter or an underscore and that only contains letters, digits, <".">, and <"_">. | The var attribute uniquely identifies a property name of the settings node (<media> element of "application/x-ncl-settings" type). |
| comparator | "eq", "ne", "gt", "lt", "gte", or "lte". | The comparator attribute compares the value of the property specified by the var attribute with the absolute value specified in the value attribute. |
| value | String. | The value attribute defines a value to be compared with the property value referred by the var attribute. |