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:07:44 -0400
To: www-dom@w3.org
Message-ID: <OF8B84DF0A.D4BC789B-ON85256A46.005D8C8A@pok.ibm.com>

>On top of that, I would also like to ask a
>question about how fixed and defaulted attributes should be handled in a
>importNode() operation.

That's spelled out explicitly in the description of importNode.  To recap:

Default attributes, including defaults obtained from the "fixed" value,
show up as Attr objects which have their "specified" flag set to False.
These are _not_ copied when you import an Element node. However, when the
Element is created in the importing document it should automagically have
that document's defaults applied to it. If the attribute value was
explicitly specified, it _will_ be imported along with the Element, even if
the value agreed with the Fixed value in the source document or conflicts
with a Fixed value in the target document. (The DOM doesn't currently
understand "fixed"; it's just treated as a default value. DOM Level 3's
DTD/Schema support will provide a way to validate an element and thus
detect conflicts.)

If you explicitly import an Attr node, it is always imported as a specified
Attr.

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

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