L2 Document::createElement behaviour

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 UTC