[XML-SIG] Default namespaces, attributes, 4DOM and the W3C recommendation

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri, 28 Sep 2001 07:29:49 +0200


> I can see the occasional need for "annotating" elements with
> attributes which are not associated with the namespace of the
> elements in question.

Attributes without a namespace are the rule in a namespace
application, not the exception. As explained in A.2, attribute names
are either global, or in a per-element partition. The per-element
partition is by far more typical as the global one; most attributes
make sense only in the context of their element. For an example,
notice how XHTML *only* has attributes in the per-element partitions,
and no global attributes.

> My confusion arose when considering the behaviour or meaning of
> default namespaces - since the default namespace applies to all
> unprefixed elements, and as a result an element cannot (or should
> not) occur without being associated with a particular namespace, it
> seems bizarre to the casual observer that a loophole exists which
> permits attributes to escape such constraints.

That is on purpose. Eg. what use would be an xhtml:border attribute?
It is meaningful for tables, but not, say, for anchors.

Regards,
Martin