W3C home > Mailing lists > Public > public-owl-wg@w3.org > November 2007

A brief primer on Qnames and URIs

From: Bijan Parsia <bparsia@cs.man.ac.uk>
Date: Thu, 15 Nov 2007 02:21:34 +0000
Message-Id: <F6E3299D-CC25-4277-9845-9CF291ADD0B9@cs.man.ac.uk>
To: "Web Ontology Language (OWL) Working Group WG" <public-owl-wg@w3.org>

This is relevant to the Datatype issues.

Qnames are defined in the XML Namespaces recommendation:
	http://www.w3.org/TR/REC-xml-names/

James Clark has a good (if old) primer:
	http://www.jclark.com/xml/xmlns.htm

QNames are, in combination with namespace declarations, ways of  
writing down what Clark calls universal names. A universal name is a  
pair consisting of a namespace URI and a local name.

Since the characters of a local name are legal URI characters (and  
obviously the same for the namespace URIs) you can concat them to  
form a URI. This is what the RDF/XML syntax does with *some* but *not  
all* qnames appearing in RDF/XML documents. That is, many, if not  
most, qnames appearing as element or attribute tags exist to  
abbreviate URIs. This is not true for such qnames as rdf:RDF or  
rdf:about (given the standard namespace mapping). This is easily seen  
if you consider that rdff:DF cannot map to the same universal name as  
rdf:RDF.

QNames are *not merely abbreviation mechanism for URIs). This use is  
comparatively rare.

(Hard to believe when coming from the RDF world. I know I was a bit  
shocked.)

It is generally regarded as uncouth to do any of the following things:
	Create elements or attributes with universal names from a namespace  
not under your control.
	Coin URIs from URI spaces not in your control.

While I generally don't really care about this uncouthness, it *is* a  
pretty standard point of coordination inside the W3C.

The namespace name commonly associated with the prefix "xsd"  
"belongs" to the XML schema working group. So we have to exercise a  
bit of care before mucking with it. (We also have to take some care  
before inventing a new syntax for defining XML Schema types since,  
intra-W3C, that's XML Schema WG's job!)

Currently, afaik, XML Schema does not provide URIs for datatype  
facets, although it does provide QNames. If we are going to make uris  
out of xsd:minInclusive, then we are *coining* those uris. They are  
easy to coin, but we're still doing something (and not merely reusing  
something XML Schema has done.)

(Ok, I'm not 100% sure that they haven't coined those uris...this  
needs to be checked.)

Similarly, if we use xsd:minInclusive *as an element or attribute*  
tag, and *don't* conform to the XML schema provided by the XML Schema  
working group, then, technically, we are redefining something in  
their namespace. So we need to check that they are cool with that.

We probably need to review the Schema 1.1 documents to see if they  
affect us in any way.

Cheers,
Bijan.

P.S. XML Schema 1.1 refers to the component designator WD:
	http://www.w3.org/TR/xmlschema11-1/#ref-scds
Received on Thursday, 15 November 2007 02:21:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:13:27 GMT