W3C home > Mailing lists > Public > www-rdf-logic@w3.org > August 2001

Re: Summary of the QName to URI Mapping Problem

From: Drew McDermott <drew.mcdermott@yale.edu>
Date: Wed, 15 Aug 2001 12:13:59 -0400 (EDT)
Message-Id: <200108151613.f7FGDx928699@pantheon-po04.its.yale.edu>
To: www-rdf-logic@w3.org

Thank you, Mr. Stickler, for a very clear discussion of the QName/URI
problem.  I always blamed myself for not understanding how this was
supposed to work, and it's nice to realize that no one else
understands it either.

The designers of XML clearly intended QNames to be the "skeleton" of a
domain.  That is, if you were making up a notation for describing,
say, luggage, you might want a predicate 'manufacturer', and it would
end up as an element tag somewhere, in a context like 

The names aren't defined in any sense except that there is an API
description somewhere that tells programmers how a compliant
luggage-notation reader/writer is supposed to behave when it sees
'manufacturer' in the International Luggage Language namespace.

Then RDF introduced conventions such as that

<rdf:Description ...>
    <rdf:type resource="{some URI}">

may be abbreviated

<{some QName} ...>
</{some QName}>

where {some QName} and {some URI} must expand to the same resource.

Example: We declare the namespace
and then we can abbreviate

<rdf:Description ...>
   <rdf:type resource="http://www.foo.org/names#wow">


<foo:wow ...>

Obviously, QNames are playing a very different role here than in XML.
No RDF processor is expected to know what 'foo:wow' means in the same
sense that a program compliant with the International Luggage Language
is expected to know what 'lugg:manufacturer' means.  Instead, QNames
are being used as a URI abbreviation device.

Does that mean I could write:

<rdf:Description ...>
   <rdf:type resource="foo:wow">


<"http://www.foo.org/names#wow" ...>

The answer is a loud No! for the second, and, I believe, a somewhat
softer No for the first.  So whoever generates the RDF has to make
sure there are two distinct ways of referring to the resource in
question.  Assuming the URI is given, it may not be obvious what the
proper QName is for referring to it.  The only rule is that the URI be
broken into a prefix and suffix, where the suffix is alphanumeric and
the prefix is defined as a namespace.  But there's no rule for where
to break it, and, as Patrick pointed out, if you do it the wrong way
you get ambiguities.

This really is a glaring hole in RDF that needs to be filled.
Adopting an offical QName <-> URI mapping convention seems to be the
obvious solution.  Not all QNames would have to be mappable, but it
should be obvious from a namespace declaration whether it was defining
mappable names or not.  Then one could use a mappable QName in any
context where a URI was expected (but not vice versa, to avoid
violating XML rules).

                                             -- Drew McDermott
Received on Wednesday, 15 August 2001 12:14:01 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 2 March 2016 11:10:36 UTC