<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16505</bug_id>
          
          <creation_ts>2007-12-18 12:04:26 -0800</creation_ts>
          <short_desc>getElementById fails to find xml:id identified elements (xml:id support)</short_desc>
          <delta_ts>2019-02-06 09:02:57 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.w3.org/2004/CDF/TestSuite/WICD_CDR_WP1/test-DOM-L3-core-subset-ext-getAttr.xhtml</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>15836</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>cdumez</cc>
    
    <cc>gavin.sharp</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>kai</cc>
    
    <cc>sam</cc>
    
    <cc>timur.mehrvarz</cc>
    
    <cc>webdev</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64655</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-12-18 12:04:26 -0800</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65272</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-12-25 23:38:25 -0800</bug_when>
    <thetext>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&apos;ll need to build a few test cases with errors and checking for id normalization, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65273</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-12-25 23:45:56 -0800</bug_when>
    <thetext>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&apos;s (the parser will throw an error, i&apos;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&apos;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&apos;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&apos;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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65274</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-12-25 23:47:17 -0800</bug_when>
    <thetext>There is actually a test suite!

http://www.w3.org/XML/2005/01/xml-id/

We&apos;d need to import that with any implementation patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65275</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-12-26 00:02:54 -0800</bug_when>
    <thetext>important to note that the W3C tests link to these other tests from Opera:
http://annevankesteren.nl/test/xml/xml-id/
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65276</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-12-26 00:03:46 -0800</bug_when>
    <thetext>And there are these from Hixie:
http://www.hixie.ch/tests/adhoc/xml/id/
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65278</commentid>
    <comment_count>6</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2007-12-26 00:51:48 -0800</bug_when>
    <thetext>http://annevankesteren.nl/test/xml/xml-id/ and these are form Anne!
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65279</commentid>
    <comment_count>7</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2007-12-26 00:52:30 -0800</bug_when>
    <thetext>I didn&apos;t see that Eric had already noted the link to Anne&apos;s tests.  Oops.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65292</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-12-26 07:25:05 -0800</bug_when>
    <thetext>Please note that HTML5 doesn&apos;t even mention xml:id (unlike xml:lang). Firefox 2.0 and 3.0 nightly don&apos;t pass these tests either.

It doesn&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65429</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-12-27 22:37:13 -0800</bug_when>
    <thetext>The official consensus between Maciej, Alexey and I is that we&apos;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&apos;ll communicate our disinterest to my WICD connections.


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502876</commentid>
    <comment_count>10</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:02:57 -0800</bug_when>
    <thetext>Mass moving XML DOM bugs to the &quot;DOM&quot; Component.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>