W3C home > Mailing lists > Public > public-owl-dev@w3.org > July to September 2009

Re: OWL/RDF Ref/Def and Namespace Reference?

From: Bijan Parsia <bparsia@cs.man.ac.uk>
Date: Mon, 13 Jul 2009 10:31:04 +0100
Message-Id: <B7DC4EE9-274B-4E98-BAAF-7B6E5DF2E3FC@cs.man.ac.uk>
Cc: public-owl-dev@w3.org, Brad Cox <brad.cox@rividium.com>
To: Brad Cox <bradjcox@gmail.com>
On 12 Jul 2009, at 22:19, Brad Cox wrote:

> Could someone please recommend a concise reference for when (and  
> why) to use the various reference/dereferencing options
> (rdf:ID, rdf:about, rdf:resource, others?). Also namespaces (when  
> to use foo:bar vs foo#bar vs &foo;bar and so forth). I've searched  
> high and low and am constantly confused by the proliferation of  
> twisty passages.
> I've worked some of these out experimentally but that broke down  
> when I divided a large ontology into separate files. I'm really  
> hoping for something like a best practices but will take whatevers  
> available.

I don't know of anything extant except what's in my head, so I hereby  
transcribe that into this email :)

Underlying principle: Avoid distinctions in syntax that don't show up  
in the model, unless the syntax forces you (or it's convenient).

 From this, the Golden Rule: Don't ever use rdf:ID.

(rdf:ID is confusing -- even deceptive -- and not very robust)

Other underlying principle: Be consistent.

The simplest thing to do is use rdf:about everywhere. That leads to  
slightly more verbose RDF/XML, e.g.,

A:	<rdf:Description rdf:about="#sheevah">
			<rdf:Description rdf:about="#bijan"/>

instead of:
B:	<rdf:Description rdf:about="#sheevah">
		<foaf:imaginaryFriend rdf:resource="#bijan"/>

But A is robust (e.g., it's straightforward to add more nesting) and  
simple. It can be cleaner if you have a one off rdf:type, e.g.,

A'	<foaf:Person rdf:about="#sheevah">
			<foaf:Person rdf:about="#bijan"/>


B'    <foaf:Person rdf:about="#sheevah">
		<foaf:imaginaryFriend rdf:resource="#bijan"/>
	<foaf:Person rdf:about="#bijan"/>

I personally use the rule: rdf:about everywhere except in a terminal  
object node where I use rdf:resource. Basically, "rdf:resource  
everywhere I can, rdf:about otherwise".

# vs. /, well, basically "be consistent". Either is fine  
semantically, # is rather more common, so # is simpler. # *can* cause  
problems if you are in a rare situtation where people are  
dereferencing a term (ewww...don't do that) and not caching...they  
can hammer your server. From the client perspective, it can force  
them to download far more than they needed. Contrariwise, you end up  
in the wordnet situation with a slew of microontologies. Bleah.

&foo;bar is a pure syntax issue and I would use it only when forced.  
You are forced when you have to put uris in attribute content and  
they are not from your base (thus can't be relative). It's *much*  
better to use entities than to try to scatter bases throughout your  
document. The most common in owl is &xsd; since you need that for the  
brute syntax.

You might also consider the forthcoming OWL/XML with has a somewhat  
simpler story wrt all this. Sorta. Mostly. :) Basically, you can use  
a curie variant throughout.


Received on Monday, 13 July 2009 09:26:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:18 UTC