Re: [rdfmsQnameUriMapping-6] Algorithm for creating a URI from a QName in RDF Model?

>
> I have an action item to get some www-tag discourse going on this one.
>
> Per the Namespaces REC, a qname can be seen as a two-tuple: namespace
> name, local name.  The namespace name is a URI reference.
>
> In RDF, there is an explicit mechanism for turning these into URIs:
> concatenate the namespace name and the local name.  For this reason,
> namespaces for RDF applications often end in '#' or '/'.
>
> Qnames work effectively as universally-unique labels in markup
> applications.  Given that the Web has as one of its bases the notion of
> the universal flat URI namespace, it would seem desirable to express a
> qname as a URI, as is done in RDF.  That is to say, given any element
> type (in the XML 1.0 sense) that was a qname, it would have its own URI
> that you could use to talk about it and potentially retrieve information
> about it.

There are two related issues:

1. How to convert a QName into a URIreference  in the general case.
2. A QName may be either an element type name or an attribute type name,
what/which should the URI reference identify?

>
> It wouldn't be that hard to write a simple rule for mapping qnames to
> URIs.  A little thought shows that it the mapping would have to be
> reversible, which adds to the difficulty, but is certainly not
> insuperable.  It might not be possible to be entirely compatible with
> the way RDF 1.0 has done this, but perhaps it's not too late to fix RDF.

As you note, RDF tends to use "/" or "#" to terminate namespace URIs for the
reason that RDF's algorithm is to concat the namespace URI and local name to
form a URI reference.

The problem exists for namespace URIs that end in an alphanumeric character.
I propose that when a namespace URI ends in an alphanumeric, a "#" be
inserted between the namespace URI and local name to form a URI reference.

The issue of roundtripping would still exist, i.e. given a URI reference
would this be split into a namespace URI including or excluding the "#", but
nonetheless, this algorithm is probably the best for namespace names that
either do, or do not end in an alphanumeric.

>
> So the first-level questions to address are:
>
> - is this a good thing to do?
> - how important is it, relative to all the other things the W3C needs to
> worry about?

Shucks. Some specs e.g. XSDL and XMLNS/XML use QNames as type names, others
such as RDF use URI refs as type names. I'd say its important to have a
consistent.way to convert a QName into a URI ref (which is easy to do) and I
would like a consistent way to convert a URI ref into a QName, (but that is
a bit harder)

>
> There's a meta-question that goes along with these.  If every qname
> becomes a URI, the question arises of what the URI addresses.  These
> would be useful, just as namespaces are useful, even in the absence of a
> resource representation to be obtained by dereferencing.  On the other
> hand history shows that people expect URIs to be dereferencable and are
> confused when they're not.  RDDL (http://www.rddl.org) is an example
> that shows the kind of thing you might want to get by dereferencing this
> kind of namespace URI).  Assuming that it's a good idea to map qnames to
> URIs, is it necessary at the same time to solve the issue of what they
> should point at (which BTW is TAG issue #8).  -Tim
>
Concur.

Jonathan

Received on Thursday, 9 May 2002 23:24:14 UTC