Lists Home |
Date Index |
- From: Mark Birbeck <Mark.Birbeck@iedigital.net>
- To: XML Dev <firstname.lastname@example.org>
- Date: Tue, 2 Feb 1999 21:20:45 -0000
John Cowan wrote:
> Mark Birbeck wrote:
> > OK then, some have argued, at least shouldn't 'isbn'
> automatically be
> > part of the 'bk' namespace? Still no, I'm afraid. Every member of a
> > namespace is meant to be unique.
> Well, not quite.
How not quite? A namespace is a set of unique entries *by definition*.
That's what they are - a set of unique entries. You can't have a 'set of
unique entries' that contains a duplicate.
> An element can have the same name as a global
> attribute without problem.
True. But they are not in the same namespace. According to A.2 the
element would be in the 'all element types' partition, and the global
attribute would be in the 'global attribute' partition.
> There is a contradiction, AFAI can see,
> between clause 5.3 and Appendix A, and obviously 5.3 is normative.
Well why not spell it out then, since I can't see one? I can only guess
what you are driving at, so I'll go through 5.3 (anyone interested in
this might want to open http://www.w3.org/TR/REC-xml-names/ whilst
<from spec>In XML documents conforming to this specification, no tag may
contain two attributes which:
1. have identical names, or
2. have qualified names with the same local part and with prefixes which
have been bound to namespace names that are identical.</from spec>
Well, number 1 is already given by XML 1.0. You cannot have:
<person name="Mark" name="Birbeck" />
so I assume that is not where your contradiction lies. To look at the
second point; the following *would* be OK in XML 1.0 (colons are fine,
as per http://www.w3.org/TR/PR-xml-971208#NT-Nmtoken):
<person first:name="Mark" sur:name="Birbeck" />
However, the spec is saying that it becomes illegal - if you want your
XML document to conform to the namespace spec - to use the above
attribute names if you have bound the prefixes to namespaces as follows:
<xml xmlns:first="uri:mycodes" xmlns:sur="uri:mycodes">
<person first:name="Mark" sur:name="Birbeck" />
because first:name and sur:name would end up being the same thing
(uri:mycodes:name). (Note that it still does NOT break the XML 1.0
spec.) A.4 suggests how this might be implemented using 'expanded
attribute names', saying that every EAN must be unique. (EANs include
the URI that a namespace prefix points to as an attribute, not the
Of course, this might not be the source of your contradiction either.
Given there's only one bit of 5.3 that I haven't discussed here (it's
not that big), I guess you think the contradiction is in the 'good'
However, each of the following is legal, the second because the default
namespace does not apply to attribute names:
<!-- http://www.w3.org is bound to n1 and is the default -->
<good a="1" b="2" />
<good a="1" n1:a="2" />
I can only assume that you mean that this breaks the uniqueness rule,
but it doesn't. If we look at the attributes both from the perspective
of partitions or of expanded attribute names we will see that they are
'a' and 'n1:a' are in different namespace partitions, as described
above. 'n1:a' is actually a global attribute and so appears in the
'global attribute' partition, whilst 'a' would be in the
'per-element-type' partition for the element 'good'. If we use '^' to
break partitions, namespaces and local names, your have two completely
different attributes. 'n1:a' becomes:
where 'n1' has been mapped to its full URI, and 'a' becomes:
i.e., 'a' is in the 'good' namespace within the 'per-element-type'
partition (because it is unqualified).
EXPANDED ATTRIBUTE NAMES
'a' and 'n1:a' also have very different expanded attribute names. 'a'
<ExpAName name='a' eltype="good" elns="http://www.w3.org" />
whilst 'n1:a' has:
<ExpAName name='a' ns="http://www.w3.org" />
As you can see - completely different. One actually has a namespace
attribute the other doesn't, and instead gets attributes of the type and
namespace of the element that owns it.
So where is the contradiction?
I don't know why these standards guys are getting such a hard time -
particularly with all these poorly worked through criticisms. IMHO if
you want to be at the leading edge of technology then you have to put
the work in - read, read, and re-read. It is not the job of standards
developers to make sure we understand everything they write, although
there is no problem with asking for clarification. But if instead of the
phrase 'I don't understand' you choose 'there is a contradiction' then
at least show some respect for their work and take the trouble to spell
out what you think it is - and don't be surprised if a rant comes back
Rant over ...
Intra Extra Digital Ltd.
39 Whitfield Street
t: 0171 681 4135
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)