[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Another errata?

  • From: Mark Birbeck <Mark.Birbeck@i...>
  • To: XML Dev <xml-dev@i...>
  • Date: Tue, 2 Feb 1999 21:20:45 -0000

mycodes u.s.
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
reading):

<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" />
      </xml>

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
prefix itself.)

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'
example:

<from spec>
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 -->
<x xmlns:n1="http://www.w3.org" 
   xmlns="http://www.w3.org" >
  <good a="1"     b="2" />
  <good a="1"     n1:a="2" />
</x> 
</from spec>

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
completely unique.

PARTITIONS
'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:

	GA^http://www.w3.org^a

where 'n1' has been mapped to its full URI, and 'a' becomes:

	PET^good^a

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'
has:

	<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 ...

Regards,

Mark Birbeck
Managing Director
Intra Extra Digital Ltd.
39 Whitfield Street
London
W1P 5RE
w: http://www.iedigital.net/
t: 0171 681 4135
e: Mark.Birbeck@i...


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.