RE: Summary of the QName to URI Mapping Problem

James Tauber said (in reply to me):
> > I said it only supports namespaces using *schemes* that are 
> '#'-friendly.
> 
> This isn't true, though. You can use RDF without ever seeing 
> a single # if
> all your serializations use "about" rather than "ID".

Once again, this does not contradict what I wrote.
Yes, you can use "about" and that means that your resources
aren't identified as fragments within the document in which
they are defined.  This is a good thing as it allows the
RDF document to be replicated on different servers without
changing resource URIs being changed.  However this has
nothing to do with my statement that the current RDF/XML
syntax does not allow QNames to have URI schemes that are
not '#'-friendly.

It might seem that the use of rdf:about makes my complaint
irrelevant as its value is a URI not a QName - so you don't
get the option of using the more convenient QName notation.
However, RDF isn't only used for defining schemas.  Once you
have defined a class you then presumably want to create
RDF documents describing instances of those classes.

I'm going to steal Patrick Stickler's example URI
urn:partax:(foo(bar)) to show the problem here (it's more
concise than the urn:publicid: example I used before).

Here's how I might define the above resource as a class in the
namespace urn:partax:(foo)

<rdfs:Class rdf:about="urn:partax:(foo(bar))">
 ...
</rdfs:Class>

Now suppose I want to declare a new resource to be an instance
of that class (let's make it an anonymous resource to keep things
simple).  I might be tempted to write the following:

<rdf:RDF xmlns:foo="urn:partax:(foo)">
  <foo:bar>
    ...
  </foo:bar>
</rdf:RDF>

but as the QName to URI mapping is broken for this type of
namespace URI, the above statement defines a resource having the
type urn:partax:(foo)bar which is not what I had in mind at all,
and does not even have valid syntax for the urn:partax: scheme.
I can still describe my instance using rdf:Description with an
rdf:about attribute and explicit use of the rdf:type property,
but I think it's unfortunate that the RDF spec. does not allow
the convenience of QNames to be used with any kind of URI scheme.

Actually my original statement was a little too strong: there
could be URI schemes for which the "ending a namespace in a '#'"
convention doesn't make sense, but the QName to URI mapping
via concatenation does make sense - and I didn't mean to say
that these wouldn't work with the current syntax.  I will
therefore weaken my claim to say that the current XML syntax for
RDF doesn't support the use of QName namespaces having a URI
scheme for which concatenation doesn't work.  This is not a
particularly profound statement - it just means that RDF M&S does
not explicitly constrain the type of URI that can be used for
the namespace of a QName, but then goes on to define a QName to
URI mapping that only works with a subset of URI schemes.

Of course, fixing this problem will require some new RDF syntax
to be defined such as Patrick's proposed Map element, but it would
be a start if this would be recognised as a problem.  It certainly
is for me: I don't want to give abstract things (namespaces) names
that refer to a totally irrelevant network protocol (HTTP).
However, unless I use a URL scheme like http: I can't use the
convenience of the QName notation.  There is nothing in the RDF
specification that warns of this (nor do I think the right
solution would be just to document it and forget it).

- Stephen

Received on Monday, 20 August 2001 01:43:18 UTC