DOM3 Core: removing unspecified attributes

Hi,

  I think DOM Level 3 Core is not entirely clear about how attribute
changes affect the DOM if there are default values. The main text is

  If the attribute was not explicitly given a value in the instance
  document but has a default value provided by the schema associated
  with the document, an attribute node will be created with specified
  set to false. Removing attribute nodes for which a default value is
  defined in the schema generates a new attribute node with the default
  value and specified set to false.

Consider a case like

  <!DOCTYPE foo [
    <!ELEMENT foo EMPTY>
    <!ATTLIST foo bar CDATA 'baz'>
  ]><foo/>

Now

  foo.removeAttributeNS(null, 'bar');

I am not sure whether the new Attr node will be created in this case,
or whether the text applies only when .specified is true. I think this
should be considered a no-op but it should be clarified either way.

regards,
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Saturday, 25 March 2006 19:50:27 UTC