- From: Drew McDermott <drew.mcdermott@yale.edu>
- Date: Wed, 15 Aug 2001 12:13:59 -0400 (EDT)
- 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 <lugg:manufacturer>...</lugg:manufacturer> 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}"> ... </rdf:Description> may be abbreviated <{some QName} ...> ... </{some QName}> where {some QName} and {some URI} must expand to the same resource. Example: We declare the namespace xmlns:foo="http://www.foo.org/names#", and then we can abbreviate <rdf:Description ...> <rdf:type resource="http://www.foo.org/names#wow"> ... </rdf:Description> as <foo: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"> ... </rdf:Description> or <"http://www.foo.org/names#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