Friday, 1 April 2005
Can Somebody Explain to Me...
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?