W3C home > Mailing lists > Public > www-tag@w3.org > June 2006

Re: CURIEs: A proposal

From: <noah_mendelsohn@us.ibm.com>
Date: Wed, 28 Jun 2006 19:15:20 -0400
To: Harry Halpin <hhalpin@ibiblio.org>
Cc: mark.birbeck@x-port.net, www-tag@w3.org
Message-ID: <OF8AD911AD.FC1C70F5-ON8525719B.007EDD93-8525719B.007FBFC3@lotus.com>

Harry Halpin writes:

> This could be done by using a different character other than 
> ':', or *by saying that element and attribute names that use 
> ':' * are QNames, but CURIEs work for *attribute values that 
> use ':'*. Again, this might break something, not sure.

Well, I think this might have been a better option some years ago than it 
is today.  XML Schema was among the first widely deployed Recommendations 
to use QNames in attribute values, and indeed to define the type that 
allows users to put QNames in attributes or elements of their own.   You 
might look back and say "mistake", but it's important to realize that in 
XML Schema in particular there's a non-trivial connection between the 
names of elements and the contents of some attributes.  When you say in 
XML schema:

        <xsd:sequence>
                <xsd:element ref="pref:local"/>
        </xsd:sequence>

the content of that ref attribute is naming an element!  So, using QNames 
to do it wasn't some completely arbitrary choice, it was making references 
to elements symmetric with the naming of those elements.   Schema then 
chose to use the same mechanism for all of it references, using QNames to 
refer not just to elements, but also to types, named model groups and the 
like.  While your proposal above makes architectural sense in isolation, 
it's also true that there were some good reasons for the choice made in 
the XML schema language.  Once you name things like elements with QNames, 
it's reasonable to expect that people will want to refer to them with 
QNames.  IMO, if we really wanted prefix:local to mean 
concat(uriOf(prefix),local)), then that convention should have been 
enforced for element names as well as for references to them.  For better 
or worse, I think the cat left the bag when Namespaces 1.0 was published.

(Yes, it's also true that for each entity named by a QName there should be 
a corresponding URI, but that's a requirement for element names as much as 
for attribute content.)

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------
Received on Wednesday, 28 June 2006 23:15:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:41 GMT