This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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
Created attachment 55 [details] Adds validation requirement to getElementByID01