elements without namespace names

Section 2.2 of http://www.w3.org/TR/2004/REC-xml-infoset-20040204/
reads in part:

     [namespace name] The namespace name, if any, of the element type.
                      If the element does not belong to a namespace,
                      this property has no value.

I think the notion of "belonging to a namespace" is used once or
twice informally in the Namespaces rec, but it is not defined.  I
think the Infoset spec would do better to recast the second sentence
above to say "If the element has no namespace name ..."  As it is,
I think the sentence makes a false assumption about the Namespaces
recommendation which renders the condition meaningless; at the very
least the sentence deviates unnecessarily from what the Namespaces
rec says.

[Rationale, for those who find it useful.  If a name has an
explicit namespace name, we know that the local name belongs to
that namespace.  We do not know that that local name does not
belong to any other namespace, nor that that local name has
different semantics in any other namespace that defines a meaning
for it.  No (namespace, local name) pair provides any information
about the relation of that local name to any other namespace.

It follows that specifying a QName whose expanded name has no
namespace name provides no information about the relation of
that particular local name to any namespace.  It does not tell
us that the local name is in any such namespace; it also does not
tell us that that local name is not in any namespace.  That's
a common way of speaking, but misleading and false.

At the practical level, if a processor is designed to understand
and process a particular set of names in a particular namespace,
it can also be defined to process those names when they are
provided by expanded names without namespaces, without failing to
conform to the Namespaces rec.  (I.e. I can write a stylesheet
that processes both tei:x, tei:y, and tei:z, on the one hand,
and x, y, z [with no default namespace] on the other.)  This was
an important consideration for some of those involved in the
initial development of the namespaces rec, and it helps understand
why the empty string is explicitly excluded from use as a namespace
name.

At the theoretical level, the ns/localname bindings of expanded
names provide positive information only, no negation, and ditto
for expanded names which have no namespace name.]

--C. M. Sperberg-McQueen

Received on Tuesday, 26 February 2008 17:08:31 UTC