mnot’s blog

Design depends largely on constraints.” — Charles Eames

Friday, 1 April 2005

Can Somebody Explain to Me...

Filed under: Semantic Web XML

RDF has a simple, usable, universal model; everything’s nodes and arcs, so it avoids the problems of the Infoset, which IMO are brought by its complexity and special cases. Years of disquiet about attributes by portions of the XML cognoscenti support this view unintentionally, I think.

So, WHY DOES RDF HAVE A SPECIAL CASE, THEREBY LOSING ITS SIMPLICITY?

I’m talking about RDF datatypes, of course. As far as I can see, they’re a special case to the data model; although the datatype itself is identified with a URI, the property “RDF datatype” isn’t, and as a result you can’t meaningfully talk about (as in, reason with CWM, or access with most RDF APIs) them using that oh-so-delicious subject, predicate, object triple.

Granted, Literals themselves are a bit of a special case, because they’re not URIs, and therefore when they’re the object, you can’t talk about them directly either. However, there are a few easy tricks here, such as interposing a bNode (e.g., :foo :size [:amount “5”; :unit “inch”; :type xs:int;] .), or by inferring it from the property’s class, or a restriction upon it (works for cardinality, doesn’t it)?

I’ve talked to a few knowledgeable people about this in the past, and have been told that this is the current state of things; you have to put an RDF datatype directly on all of your data if you want typed data. If it’s true, that sucks, but I can’t believe it’s the whole story. What am I missing?


4 Comments

Dan Connolly said:

Yeah, TimBL wrote a design note on Interpretation Properties[1] 1998-2001 but some folks in the WG didn’t want to do inference on bnodes when loading integers into a database.

Also, there was precedent for this goofiness by the time we got to datatypes… language tags:

“Ugh! we can use RDF properties for all sorts of things, except language tags.” – yours truley, 28 Jun 2002[2].

Also… your little units sketch is close but problematic; see InterpretationProperties in the esw wiki[3].

[1] http://www.w3.org/DesignIssues/InterpretationProperties [2] http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Jun/0294 [3] http://esw.w3.org/topic/InterpretationProperties

ugh… why do you make me use http://esw.w3.org/topic/PoorMansHypertext ? You have to manually approve comments anyway, don’t you? Can’t you allow real links?

Friday, April 1 2005 at 9:36 AM

Jimmy Cerra said:

IMHO. RDF datatypes are like MIME types for literals. They allow you to selectively process them depending on their type. For instance:

#Johnny #wrote _:x . _:x rdf:type rdf:alt . _:x _:1 “hello, world”^^xsd:string . _:x _:2 “<p>hello, world</p>”^^rdf:XMLLiteral .

So if your program can’t handle XML, you can use the string version. Like adding an xml:lang attribute for different languages. Personally, I think the RDF WG should have used xsi:type instead of their own type property.

Friday, April 1 2005 at 9:55 AM

Danny said:

I agree datatypes seem very inelegant, and if I understand correctly the Description Logics folks just treat the stuff as it were in a whole parallel universe.

But on the other hand literals can seem overly opaque, knowing that a piece of data is, say, an integer is pretty useful (I like Jimmy’s mime type analogy). But having to keep the type with the instance data is sucky. Perhaps if it had been possible for literals to (somehow) appear as the subjects of statements from the start we would have something less clunky here. If you fancy trawling the WG archives to figure out how things got the way they did - you’re a braver man than I.

Could you also please add syntax highlighting for N3 ;-)

Saturday, April 2 2005 at 12:26 PM

Cecelia Hickel said:

In researching this, this link with Dan Connolly’s name appears… http://www.daml.org/listarchive/joint-committee/0692.html I think it is a good discussion on this matter as well.IMHO This link offers some technical input to the discussion, http://www.ninebynine.org/RDFNotes/RDFDatatypes/UsingRDFDatatypes.pdf

As for me, I am simply trying to digest….

Tuesday, August 16 2005 at 2:59 AM

Creative Commons