Comments on DOM level 2

1) DOM level 2 should provide better support for ID attributes.

This could be done by
    * creating a new constant for the whatToShow attribute of the
    nodeIterator interface called  SHOW_ELEMENT_WITH_ID, or
    * adding a required iterator+filter to the document and 
    documentFragment interfaces.
It may be that some method must be provided which declares that
a particular attribute is an ID attribute. It would be prudent to
allow as parameters: the namespace URI, the attribute name,
a possible null list of elements in the same namespace that the
attribute belongs to.

    * Also, some method such as "getElementByID()" should be
    provided on the document and documentFragment nodes.
    * Also, some method such as "setElementID()" should be
    provided on element nodes.

ID attributes are the major and minimum requirement for link-integrity.
Without an efficient and standardized mechanism for IDs, software
which relies on IDs will not use DOM. I would expect many XLink-
based languages to fall in this category. This is a very important
use-case which deserves special treatment.

IDs represent a fundamentally different class of information than
that provided by other DTD declarations. The ID encodes
"structural" information which must be efficiently implemented.
Note that this request does not require IDREF methods be 
implemented; it may well be that IDREFs are subsumed by XLINK.
However, IDs will remain, and indeed can be considered a cornerstone
of XML-related technology.

2) DOM level 2 should not require lexical-checking for URIs,
system and public identifiers, and XML names, except at some
user-supplied option. 


Rick Jelliffe
Computing Centre
Academia Sinica (W3C Member)
Taipei, Taiwan

Received on Friday, 8 October 1999 08:12:21 UTC