WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
16505
getElementById fails to find xml:id identified elements (xml:id support)
https://bugs.webkit.org/show_bug.cgi?id=16505
Summary
getElementById fails to find xml:id identified elements (xml:id support)
Eric Seidel (no email)
Reported
2007-12-18 12:04:26 PST
getElementById fails to find xml:id identified elements
http://www.w3.org/2004/CDF/TestSuite/WICD_CDR_WP1/test-DOM-L3-core-subset-ext-getAttr.xhtml
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2007-12-25 23:38:25 PST
It looks like WebKit currently has no support for xml:id. It looks pretty simple to add:
http://www.w3.org/TR/xml-id/
We'll need to build a few test cases with errors and checking for id normalization, etc.
Eric Seidel (no email)
Comment 2
2007-12-25 23:45:56 PST
Test cases I can think of that we would need: 1. Test null:id vs. xml:id, which wins when both are defined? 2. Test multiple xml:id's (the parser will throw an error, i'm pretty sure) 3. Test xml:id in HTML (we should probably ignore it) 4. Text xml:id attribute normalization a. get the value via js (getAttribute, getAttributeNS, other ways?), which are normalized? b. set the value via js, see that it's properly normalized c. use getElementById to find normalized names. should getElementById normalize its args? 5. Possibly test lookup across documents. an HTML document embedding an XML document, calling objectElement.contentDocument.getElementById() how is normalization handled, etc. I think that's all we need to start with. Writing those test cases will probably take longer than adding the support into Element.cpp, and adding the attribute name into xmlnames.in. :) It's possible that Hixie or others have already made some of the tests we might need. Heck, the W3c might even have a test suite for xml:id (I kinda doubt it).
Eric Seidel (no email)
Comment 3
2007-12-25 23:47:17 PST
There is actually a test suite!
http://www.w3.org/XML/2005/01/xml-id/
We'd need to import that with any implementation patch.
Eric Seidel (no email)
Comment 4
2007-12-26 00:02:54 PST
important to note that the W3C tests link to these other tests from Opera:
http://annevankesteren.nl/test/xml/xml-id/
Eric Seidel (no email)
Comment 5
2007-12-26 00:03:46 PST
And there are these from Hixie:
http://www.hixie.ch/tests/adhoc/xml/id/
Sam Weinig
Comment 6
2007-12-26 00:51:48 PST
http://annevankesteren.nl/test/xml/xml-id/
and these are form Anne!
Sam Weinig
Comment 7
2007-12-26 00:52:30 PST
I didn't see that Eric had already noted the link to Anne's tests. Oops.
Alexey Proskuryakov
Comment 8
2007-12-26 07:25:05 PST
Please note that HTML5 doesn't even mention xml:id (unlike xml:lang). Firefox 2.0 and 3.0 nightly don't pass these tests either. It doesn't look entirely obvious that we should implement xml:id support. And if we do, we need to analyze all the controversy around it! See also:
bug 12971
.
Eric Seidel (no email)
Comment 9
2007-12-27 22:37:13 PST
The official consensus between Maciej, Alexey and I is that we're not interested in implementing xml:id in WebKit at this time. It is unfortunate that SVG 1.2 has recommended xml:id (then again, SVG 1.2 has done lots of other unfortunate things as well).
http://www.w3.org/TR/SVGMobile12/struct.html#xmlIDAttribute
I'll communicate our disinterest to my WICD connections.
Lucas Forschler
Comment 10
2019-02-06 09:02:57 PST
Mass moving XML DOM bugs to the "DOM" Component.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug