W3C home > Mailing lists > Public > public-html@w3.org > December 2009

RE: ISSUE-76: If we fixed namespaces, does RDFa still have problems?

From: Ennals, Robert <robert.ennals@intel.com>
Date: Mon, 14 Dec 2009 19:30:56 +0000
To: Manu Sporny <msporny@digitalbazaar.com>, "public-html@w3.org" <public-html@w3.org>
Message-ID: <EB332302649177439359CE520D92A0AFA284B3C1@irsmsx503.ger.corp.intel.com>
> I've always found that slamming my forehead repeatedly into my monitor
> can numb the pain of learning RDFa. :) <--- joking

Can we put that in the RDFa primer?  <--- joking :-)
 
> Here's something that might help:
> -----------------------------------------------------------------------
> Almost everything in RDFa happens in this order -
> 
>   subject - predicate - object

[snip]

I'm comfortable with that. The difficulties all seem to arise when one tries to map the simple triple-based model that RDFa tries to follow onto the tree-based model that HTML follows. 

If every RDF triple is expressed in a single node then everything is easy. You just write your subject, verb, and object. The problem is that, if the data you are describing is represented as a tree of HTML nodes the you want to put all the bits in different places, following the hierarchical structure of HTML. E.g. If I have nodes representing me, my name, and the company I work for, then I want to put @typeof on me, @property on my name, and both @property and @itemtype on the company I work for.

The rules for mapping RDF onto tree structured data (chaining, blank nodes, automatically created nodes, etc) seem arcane and deeply-confusing. I don't feel I understand them, and I worry that end users won't understand them either.

In Microdata, fitting semantic data to the tree structure of HTML is really really easy. In RDFa it just isn't.

> That's the basics of RDFa in roughly two paragraphs of text. So, let's
> apply this to your markup. The reason that you're probably expecting
> _:bnode to link with foaf:knows to _:bnode (typeof: Person) is because
> you think that the @rel applies before the @typeof.
> 
> > <div about="_:bnode" vocab="whatever">
> >   <span property="name">Rob</span>
> >   <div rel="knows" typeof="Person">

I don't think that's the problem. The problem is that, when I think about adding semantic markup to a page, I think about following a two step process:

1.) Build a system that can create working HTML, as it is now
2.) Work out what extra properties I need to add to my nodes in order to correctly describe the semantics of my nodes. 

RDFa doesn't let me do this, because it requires that I add extra nodes to represent the relationships between things, unless I chose to not give things types.

In Microdata, each node corresponds directly to either an object, or a property of an object. This makes sense since 'objects' and 'properties of objects' are things that are likely to be represented visually on a page, and so it is really easy to know what things I need to annotate and how. I have a node representing a person, so I set the @itemtype to say that. I have a node containing their name, so I set the @itemprop to say that. It's easy and it makes sense.

In RDFa I need to have nodes that represent "the fact that this node is a property of that node". This isn't something that one normally represents visually on a web page. 

Moreover, I only need to have such a node if inner object doesn't have a type. If I don't give a type, then in some circumstances (which I don't understand) a new item scope may be created, but it doesn't correspond to a node in the DOM tree.


[snip]

-Rob
Received on Monday, 14 December 2009 19:31:58 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:55 UTC