Re: Determining attribute uniqueness seems to require namespace prefix in Infoset

From:  "John Boyer" <>
To:  "Donald E. Eastlake 3rd" <>
Cc:  <>, <>,
            "XML DSig" <>
Date:  Fri, 11 Aug 2000 13:01:46 -0700
Message-ID:  <>
In-Reply-To:  <>

>Hi Don,
>I did not mean to misquote you.  However, I haven't seen any W3C documents,
>nor implementations based on them, that use the term 'qualify' as you are
>using it.  It is not possible to 'qualify' an attribute with anything but a
>namespace URI.

It is syntactically not possible to attach any type of qulifying text
string to an attribute other than a prefix which corresonds to a URI.
However all non-prefixed attributes are automatically 'qualified' by
their element.

>In other words, in the example
><x xmlns:n1="" xmlns="" >
>  <good a="1"     n1:a="2" />
>There does not seem to be any basis in W3C work for the interpretation
>1) that 'a' is qualified as (n1:good):a,
>2) that 'a' is not qualified by a URI, and
>3) that 'a' is qualified by elements, including any URI which may qualify
>that element

See <> section A.2.  I
had to read this section and related material many times to make sense
out of them.

The unprefixed "a" above is in the Per-Element-Type Partition
associated with the element "good" in the namespace
Whether you consider "a" to be "qualified" by n1:good or "local" to it
or part of it's Per-Element-Type Partition is all the same.  And it is
different from n1:a which is in the Global Attribute Partition.

>Therefore, when you said that the attributes "are qualified by their
>element", I assumed you meant 'qualify' in the sense defined by XML Names
>[1, see the abstract], which associates elements and attributes with a
>namespace identified by URI.  With this version of 'qualify', what you said
>is equal to what I said you said.

Unprefixed attributes are not associated with just a namespace.  They
are associated with an element which is in turn associated with a

>Finally, ending most of our debate about this issue, Tim Bray states, "An
>attribute whose name contains no prefix is not in any namespace".  This
>means that in the first example of Section 5.2 of XML Names, the href in <a>
>is not in the HTML namespace.

Well, it's not "directly" in any namespace.  It's in the
Per-Element-Type Partition of the element "a" in the HTML namespace.

No doubt debate is ended by a correct understanding of what Tim Bray
has said just as it is ended by a correct understanding of or a correct
understanding of the "Namespace Myths Exploded" material at
The question is, what is "correct" understanding?

>This means if I put an HTML island in the middle of some XML by adding
>xmlns="" to the html tag, then when I want
>the href of some anchor, I cannot simply say
>'get("", href)'.  I must instead say
>1) get("", href)
>2) if that fails, then get("", href)
>Once again... Yikes!

I'm not sure I understand this part of what you are saying but if your
understanding is that the treatment of unprefixed attributes is
fundamentally broken perhaps your understanding is incorrect.

Note that the Myths Exploded text keeps saying fuzzy handwaving things
like it doesn't really make much difference (which is why Appendix A
to the Namespaces document is not normative) because real applications
only handle non-prefixed attributes within the conext of the element
where they appear anyway.  In my mind it is just a difference in point
of view whether you consider such attributes to have no "qualifying
stuff" but to be used/operated on by their element, or you try to
induce a universal uniqueness by consdering them qualified by their
element name local part and their element's namespace if any.

>John Boyer
>Development Team Leader,
>Distributed Processing and XML
>PureEdge Solutions Inc.
>Creating Binding E-Commerce
>v: 250-479-8334, ext. 143  f: 250-479-3772
>1-888-517-2675 <>


>-----Original Message-----
>[]On Behalf Of Donald E. Eastlake
>Sent: Friday, August 11, 2000 11:39 AM
>To: John Boyer
>Cc:;; XML DSig
>Subject: Re: Determining attribute uniqueness seems to require namespace
>prefix in Infoset
>From:  "John Boyer" <>
>To:  <>
>Cc:  <>, "XML DSig" <>
>Date:  Fri, 11 Aug 2000 10:15:32 -0700
>Message-ID:  <>
>>Dear Editors,
>>Please see the first example of Section 5.2 and the sentence immediately
>>above it, which says "Note that default namespaces do not apply directly to
>>attributes" [1].  One chairman of the XML DSig group recently commented
>>the word 'directly' may be intended to indicate that unqualified attributes
>>inherit their namespace setting from the parent element.  This seems
>>sensible to me as the href attribute should be in the same namespace as the
>>parent element <a>.
>No, I did not say that attributes "inherit their namespace setting
>from the parent element".  I said that they are qualified by their
>element.  That is, in
><b:a xmlns:b="foo:bar" c="xyz">
>it is "as if" c were actually b:a:c except, of course, that this
>syntax is illegal.
>>However, now look at the last example of Section 5.3.  The second occurence
>>of <good> has attributes a and n1:a.  This is declared as legal, but if 'a'
>>inherits its namespace setting from good, then a and n1:a appear to be
>But n1:a and n1:good:a would be different.
>>Could you please advise us on the correct interpretation (and fix the error
>>if indeed there is one)?
>>     John Boyer
>>      Development Team Leader,
>>      Distributed Processing and XML
>>      PureEdge Solutions Inc.
>>      Creating Binding E-Commerce
>>      v: 250-479-8334, ext. 143  f: 250-479-3772
>>      1-888-517-2675

Received on Friday, 11 August 2000 16:56:34 UTC