|
|
![]() |
|
|||||
|
|||||||
|
|
|||||||
|
Proposal to replace "name" attribute with "name" and "id" Send comments to
Tom Kuo (tom@harmonia.com) Abstract The attribute "name" in UIML tags can be ambiguous and may be misleading in its meaning. A more appropriate label for identifying a UIML element within a document is required, in order to provide a way to distinguish between a unique identifier and a reference to an element. Motivation The
attribute "name" in UIML2 serves 2 purposes: to define a unique
identifier and to reference a unique identifier. We propose to use "id"
for the first definition, and "name" for the second.
Proposed Change to UIML DTD to include ID attribute The proposed modification to the UIML DTD is the following according to the table below:
A sample of the modifications is shown below (Yellow highlighted text denotes changes from UIML2_Of.dtd.) * <!ELEMENT part (style?, content?, behavior?, part*)>
<!ATTList part
class NMTOKEN #IMPLIED
id CDATA #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">
Comments: * It is legal to have 2 of the same type of elements with no id attribute. An example of this is below <part class="A">
<part class="B">
* The places where the use of name still remains are the cases when elements are referencing an id of some other element. Example of some element where the name attribute is retained. (Consult table above for a complete listing of which elements use the name and id attributes) <property part-name="Part1" .../>
<call name="function1"/>
<event name="event1"/>
Examples of Using ID In order to refer to a unique element in the structure, the id of that element would be specified thereby giving that element a unique identifier throughout the UIML document.
Notice the name attribute takes on an entire new definition as it no longer serves as the reference to the UIML element in the document. The new definition of name depends on the element it is associated with.
© 1999-2001 UIML.org (all rights reserved) |