Differences

This shows you the differences between two versions of the page.

Link to this comparison view

rule [2014/09/16 14:26] (current)
Line 1: Line 1:
 +===== The <rule> Element =====
 +==== Definition and Usage ====
 +
 +The [[rule|<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|<media>]] element of application/x-ncl-settings type),
 +that is, the //var// attribute must have as its valuea property name of
 +the [[media|<media>]] element of "application/x-ncl-settings" type.
 +
 +==== Syntax ====
 +^ Element ^ Attributes ^ Content ^ Parent ^
 +| [[rule|<rule>]] | //id//, __//var//__, __//comparator//__, __//value//__ | -- | [[rulebase|<ruleBase>]] or [[compositerule|<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|<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. |
 +
 +
 +
  
Back to top