Re: Document.getElementById() in XML documents

David Flanagan wrote:
> "Note: The DOM implementation must have information that says which
> attributes are of type ID. Attributes with the name "ID" are not of type
> ID unless so defined. Implementations that do not know whether
> attributes are of type ID or not are expected to return null."
> 
> I'd be interested to hear from anyone who can comment on how this issue
> is actually being handled in practice.

How do you express the term 'ID' in non-english languages?  Obviously
the answer depends on that language, and we shouldn't make any
assumptions or enforce a language-specific identifier.  This is why DTDs
(or whatever) allow for an attribute to be defined as an identifying
attribute, rather than some special 'ID' named attribute.  Furthermore,
someone may define a document where they're using the name ID for
something other than a unique identifier, and the case may be that the
ID value is duplicated in the same document, this would break the
behavior of getElementById.

--Tom

-- 
Tom Bradford --- The dbXML Project --- http://www.dbxml.org/
We store your XML data a hell of a lot better than /dev/null

Received on Monday, 30 July 2001 03:07:13 UTC