[UP] The UI language |
The elements ui:alist-value and ui:alist-item The element ui:alist-value represents a literal for associative lists that can be used to set the initial value of a ui:variable. The element ui:alist-item represents one association pair. Declaration Level: Dialog structure <!ELEMENT ui:alist-value (ui:alist-item)* > <!ELEMENT ui:alist-item %value-literal; > <!ATTLIST ui:alist-item index CDATA #REQUIRED>For the definition of %value-literal; see ui:variable. Restriction: All items must contain literals of the same type. Furthermore, it is (currently) not allowed that an item contains another alist-value. Attributes
Sub elements The ui:alist-item contains the literal that corresponds to the index Example <ui:enumeration name="fruit"> <ui:enum internal="apple" external="I like apples"/> <ui:enum internal="orange" external="I like oranges"/> <ui:enum internal="banana" external="I like bananas"/> </ui:enumeration> <ui:variable name="preference" type="fruit" associative="yes"> <ui:alist-value> <ui:alist-item index="John"> <!-- John's preferred fruit: --> <ui:enum-value> <ui:enum-item internal="orange"/> <ui:enum-item internal="banana"/> </ui:enum-value> </ui:alist-item> <ui:alist-item index="Mary"> <!-- Mary's preferred fruit: --> <ui:enum-value> <ui:enum-item internal="apple"/> <ui:enum-item internal="banana"/> </ui:enum-value> </ui:alist-item> </ui:alist-value> </ui:variable> |