Differences

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

Link to this comparison view

switch [2014/09/16 14:26] (current)
Line 1: Line 1:
 +===== The <switch> Element =====
 +==== Definition and Usage ====
 +
 +The [[switch|<switch>]] element allows for defining alternative objects
 +(represented by [[media|<media>]], [[context|<context>]] or other [[switch|<switch>]]
 +elements) to be presented.  The choice is madeduring presentation time.
 +
 +Test rules used to choose the switch’schild component to be presented are
 +defined by [[rule|<rule>]] and [[compositerule|<compositeRule>]] elements; [[bindrule|<bindRule>]]
 +child elements associate these rules to child component objectsof the
 +[[switch|<switch>]] element.
 +
 +A [[switchport|<switchPort>]] child element may define a mapping to a subset of the
 +switch’s child components.  When a link is bound to a [[switchport|<switchPort>]]
 +element,the rules bound to mapped components are evaluated in the order they
 +are defined.  The first rule evaluated as true determines the chosen object.
 +Ifall rules bound to mapped components are evaluated as false, a default
 +component, defined by the [[defaultcomponent|<defaultComponent>]]child element,is chosen; if
 +the [[defaultcomponent|<defaultComponent>]] element is not defined, no component is selected
 +for presentation and the NCL player behaves as if the selected component
 +does not exist.
 +
 +All references to a switch’s child component are made through
 +[[switchport|<switchPort>]] elements or, by default, to the [[switch|<switch>]] element
 +without specifying any [[switchport|<switchPort>]].  In this case, it is considered as
 +if the reference is made to a default [[switchport|<switchPort>]] that contains
 +mapping elements to each child object of the switch and referring to its
 +whole content anchor.
 +
 +From the moment a [[switch|<switch>]] is evaluated, it is considered resolved
 +until the end of the current switch presentation.
 +
 +The [[switch|<switch>]] element may refer to another [[switch|<switch>]] element.  In
 +this case, it has the same specification of the referred element.
 +
 +==== Syntax ====
 +^ Element ^ Attributes ^ Content ^ Parent ^
 +| [[switch|<switch>]] | __//id//__, //refer// | ([[defaultcomponent|<defaultComponent>]]?, ([[switchport|<switchPort>]] <nowiki>|</nowiki> [[bindrule|<bindRule>]] <nowiki>|</nowiki> [[media|<media>]] <nowiki>|</nowiki> [[context|<context>]] <nowiki>|</nowiki> [[switch|<switch>]])*) | [[body|<body>]] or [[context|<context>]] or [[switch|<switch>]] |
 +==== 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. |
 +| //refer// | IDREF or the string "alias#id" where "id" is an IDREF value. | <html><p></html>The //refer// attribute refers to an element //id// that will be reused.  An element that refers to another element cannot be reused; that is, its //id// cannot be reused; that is, its //id// cannot be the value of any //refer// attribute.  The referred element shall be a [[switch|<switch>]] element.<html></p></html><html><p></html>The referred element and the element that refers to it shall be considered the same only regarding their data specification.<html></p></html><html><p></html>If the referred node is defined within an imported document D, the //refer// attribute value shall have the format "alias#id", where "alias" is the value of the //alias// attribute associated with the imported component D.<html></p></html> |
 +
 +
 +
  
Back to top