Bug 12971

Summary: An ID attribute declared in a DTD internal subset is not treated as such
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ahmad.saleem792, bedney, bfulgham, cdumez, cshu, jasneet, jchaffraix, rniwa, sam, webdev
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 18605    
Attachments:
Description Flags
test case none

Description Alexey Proskuryakov 2007-03-05 11:42:27 PST
In a plain XML document with the following DTD, CODE should work as an ID attribute, but it doesn't.

<!DOCTYPE ROOT [
  <!ELEMENT CHILD2 (#PCDATA|GCHILD)*>
  <!ATTLIST CHILD2 attr1 CDATA #IMPLIED
                   CODE ID #REQUIRED>
]>
Comment 1 Alexey Proskuryakov 2007-03-05 11:43:01 PST
Created attachment 13480 [details]
test case
Comment 2 Sam Weinig 2007-03-05 15:12:24 PST
I am not sure if we have a bug for dbaron's tests, but this issue is also illustrated in http://dbaron.org/css/test/xmlid from his test suite.
Comment 3 Alexey Proskuryakov 2010-09-22 13:36:36 PDT
*** Bug 18605 has been marked as a duplicate of this bug. ***
Comment 4 William J. Edney 2010-10-28 15:28:08 PDT
I can also confirm this.

Major pain when trying to use getElementById() with arbitrary XML.

Cheers,

- Bill
Comment 5 Lucas Forschler 2019-02-06 09:04:13 PST
Mass moving XML DOM bugs to the "DOM" Component.
Comment 6 Ahmad Saleem 2022-08-02 04:14:22 PDT
I am not sure on web-spec direction but in attached test case, all browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6) are showing 'FAILURE', while similarly in test case from Comment 02, there is no color grading on the test case and all browsers are matching with each other.

Can someone mark this bug accordingly? Whether it would be "RESOLVED WONTFIX" due to web-spec change or it would be RESOLVED LATER or RESOLVED CONFIGURATION CHANGED. Thanks!