W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2001

L2 Document::createElement behaviour

From: Tobias Peters <t-peters@gmx.de>
Date: Sun, 28 Oct 2001 09:42:04 +0100 (CET)
To: <www-dom@w3.org>
Message-ID: <Pine.LNX.4.33.0110280930160.306-100000@futsch>
Hi,

the mothod description for DOM Level 2 Core Document::createElement
contains:

"In addition, if there are known attributes with default values, Attr
[p.51] nodes representing them are automatically created and attached to
the element."

The method description for Document::createElementNS however does not
contain a similar statement. Are these methods really supposed to behave
differently with regard to default attributes?

And finally, what does "there are known attributes with default values"
mean exactly. I think this is a requirement to create such Attributes in a
document that has been validated by the parser. However, a DOM
implementation might also have access to <!ATTLIST ...> declarations in
the internal subset, even if the document has only been parsed for
wellformedness. Should it also create the default attributes in this case?

Bye,

Tobias Peters
Received on Sunday, 28 October 2001 03:43:09 GMT

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