W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2001

Re: importNode and handling of ID attributes

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Tue, 8 May 2001 13:13:07 -0400
To: www-dom@w3.org
Message-ID: <OF80ECC74E.59431D82-ON85256A46.005E2422@pok.ibm.com>

>is it the responsibility of the 'importNode' function to take care of ID
>attributes?

Yes, _IF_ the importing DOM understands IDs and has the information
available to determine whether an attribute is or isn't an ID. As you point
out, this currently relies on some undocumented and unexposed magic within
the DOM implementation, so the right answer is to check your DOM
implementation's documentation to find out what it does. (Not all DOMs have
or use ID information, as we mentioned in the description of
getElementByID.)

Note that the question of which attributes are and aren't IDs would be
determined by the importing document, _not_ by the source document.

Again, DOM Level 3's DTD/Schema support will provide a more rigorous
definition of this behavior, for those DOMs which choose to implement that
module.

______________________________________
Joe Kesselman  / IBM Research
Received on Tuesday, 8 May 2001 13:13:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT