This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 383 - getElementByID01 expected to find by ID for non-validating parsers
Summary: getElementByID01 expected to find by ID for non-validating parsers
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: DOM Level 2 (show other bugs)
Version: unspecified
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Curt Arnold
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-19 00:26 UTC by Curt Arnold
Modified: 2003-11-19 05:44 UTC (History)
0 users

See Also:


Attachments
Adds validation requirement to getElementByID01 (4.04 KB, patch)
2003-11-19 00:41 UTC, Curt Arnold
Details

Description Curt Arnold 2003-11-19 00:26:35 UTC
getElementByID01 expects find the specified node regardless of whether the
parser in validating or non-validating. 

From http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-getElBId

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.

This would definitely appear to allow non-validating parsers to return null. 
However, the wording may allow a non-validating parser to either return null or
a matching element since it might have read the DTD.

An additional test could be added where the attribute is named "id" and/or ID
but no DTD is specified.

Originally reported as part of bug 238
Comment 1 Curt Arnold 2003-11-19 00:41:15 UTC
Created attachment 55 [details]
Adds validation requirement to getElementByID01