<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    On 4/13/12 6:09 PM, Brent Putman wrote:
    <blockquote cite="mid:4F88A426.2080105@georgetown.edu" type="cite"><br>
      <pre wrap="">
I just did a simple test using the DOM API.  Turns out, attribute
ID-ness does not persist across adopting the Element into a new
Document. Or at least, Document getElementById does not work on the new
Document after adoption.  That's a bit surprising to me, I don't know if
that is a bug in Xerces or the intended behavior.
</pre>
    </blockquote>
    <br>
    <br>
    Looks like it's not a bug:<br>
    <br>
    <a class="moz-txt-link-freetext" href="https://issues.apache.org/jira/browse/XERCESJ-1022">https://issues.apache.org/jira/browse/XERCESJ-1022</a><br>
    <br>
    See in particular the email thread at the end.<br>
    <br>
    Quoting one poster from the thread:<br>
    <br>
    <blockquote type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <pre>(Speaking as one of the folks on the DOM WG at the time import and adopt
were being debated: Yes, we explicitly decided that retaining ID-ness was
not desirable, for essentially the same reasons that have been discussed
here.)
</pre>
    </blockquote>
    <br>
    <br>
    That's from Jan 2007, but I can't find anything newer, so this
    sounds like it was the last word.<br>
    <br>
    Apparently the workaround and intended way of usage is:&nbsp; associate a
    schema with the document and then use Document#normalizeDocument(),
    which will reestablish ID-ness.&nbsp; So that doesn't really help much
    unless you do schema validation.<br>
    <br>
    --Brent<br>
    <br>
  </body>
</html>