W3C home > Mailing lists > Public > www-tag@w3.org > May 2002

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

From: Al Gilman <asgilman@iamdigex.net>
Date: Sun, 26 May 2002 10:37:57 -0400
Message-Id: <>
To: Brian McBride <bwm@hplb.hpl.hp.com>, "Jonathan Borden" <jonathan@openhealth.org>, "Tim Bray" <tbray@textuality.com>, <www-tag@w3.org>
Cc: <www-tag@w3.org>
At 09:43 AM 2002-05-26, Brian McBride wrote:
>At 10:34 10/05/2002 -0400, Jonathan Borden wrote:
>>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?

Are you reminding us that the same textual qName may be used to indicate an element type name and an attribute type name -- that there are actually two parallel namespaces indexed by the same set of qNames?

In an [element | attribute] type name designation by qName, the [element | attribute] distinction is resolved by the context -- by the syntactic role in which the qName appears.  So it takes the qName plus this one-bit choice to fully populate the query that the referend satisfies.  In a schema, for example, the different definitions for an element type definition and an attribute type definition using the same overloaded token will not be referenceable via a common URI-reference.

So one cannot generate the URI-reference from the qName alone.  An effective (sufficient) algorithm would be to observe the qName and the [element | attribute] distinction and query a resource with information about the namespace(s) indicated in the qName asking "give me a URI-reference to an [element | attribute] type name in namespace Y of simple name X, please."  The satisfaction of that query would return a valid URI-reference for _the qName as used in this context in the specialized role as the type name of either an attribute or an element, as determined in the specific instance of use_.  But not for the same qName used for the other kind of type name.

There are three components to the query defining the typeIndicationByReference accomplished by qNames under the provisions of Namespaces in XML:

underLocalName : local name -- same here:there
qualifiedToPlayRole : elementTypeName | attributeTypeName -- same here:there
fromDomainOfDiscourse : namespaceURI -- indicates where/what 'there' is

A URI-reference to accomplish such a type indication by URI-reference would have to capture the information from all three components of this reference query.

Using existing URI-reference-building patterns, this is easy to dowith a queryPart, but not with a #fragment. 

by the way, this rhythm of 

name: name -- key in precedent context (but not sufficient key without role info)
for: role -- current and precedent contexts both define the same
per: context -- isolates precedent

is just going to fit applications in general better; it's not a fluke that XML is this way.


>Hmm, not sure I follow what the problem is there; could you give a little more detail/example?
Received on Sunday, 26 May 2002 10:38:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:55:51 UTC