Re: namespace name for default attributes of prefix "xml:"

createElement method on L2 says in short that attribute nodes are
automatically to be created if any. Does this rule also apply to the new
createElementNS method?

Default attribute values, if defined by the DTD or schema, should
automatically be available on the Element, whether it's a Namespaced or
non-Namespaced Element. L2 still does not provide any mechanism for setting
up the definitions of default attribute values, so this is handled "by
magic" -- that is, it's implementation-dependent.

The namespace name for these attributes is problematic. DTDs do not handle
namespaces at all well (or, more accurately, namespaces are not very
compatable with DTDs), and DTDs can only directly specify the prefix. The
prefix-to-URI binding is presumed to be resolved at the time that the
attribute node is created and assigned.

The URIs for the xml: and xmlns: prefixes will be hardcoded to always be
"the right thing", as defined in the Namespace spec. Attempts to override
these will not be accepted.

Better support of DTDs, and some form of Namespace lookup/checking, is
currently expected in DOM Level 3.

______________________________________
Joe Kesselman  / IBM Research

Received on Monday, 6 December 1999 17:25:16 UTC