RDFa Complexities
So I briefly read over the new draft of the RDFa Primer. It’s good overall, but Section 5 introduces unnecessary interpretation complexities.
I say BLEAH to the Section 5. I want “Keep It Simple, Stupid.” parsing. The nested layers make it harder for the parser to parse; it makes it harder for the lay person to understand RDFa (and to adopt, and to use).
I also REALLY don’t like the idea of intermixing the id and about attributes for use in defining the subjects & objects. Although the primer makes a case for it, I counter with this example:
<body about=”http://example.com/mydoc#section”>
<div id=”popup”>
The document was written by <span rel=”dc:author”>Tim</span>
</div>
<a onClick=”…”>Show PopUp</a>
</body>
The ‘popup’ id is overloaded. It’s the identifier for which the Javascript code looks up, and it’s also become the subject of the dc:author statement. The above fragment is also non-intuitive. I would expect <http://example.com/mydoc#section> dc:author ‘Tim’. Instead, I get <#popup> dc:author ‘Tim’.
![[del.icio.us]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/digg.png)
![[Google]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/google.png)
![[StumbleUpon]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Windows Live]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://badpopcorn.com/blog/wp-content/plugins/bookmarkify/email.png)
Hi Ben,
Some quick points.
First, the nested layers are actually very easy to parse. But most importantly, they have a simple generic structure, which means RDFa doesn’t suffer from the problems you’ll see in microformats, when ‘layers’ are needed (for example, when a number of people share the same address by working for the same company).
Note that this is what you might call an ‘advanced’ feature, since simply adding your own FOAF details to a document, or marking up some event, will not need this kind of technique. But even so, I believe this is about the simplest way it could be done in XHTML.
Second, you don’t get the triples you describe, i.e., ‘Tim’ is the author of
<http://example.com/mydoc#section>, exactly as you expected. This is because therelattribute is on a separate element to theidattribute, so follows the normal rules, and these are that the subject is the main document, or the nearestaboutattribute.Having said all of this, the fact that the primer can be misunderstood in this way leads me to ask if you could post some comments to the RDF in XHTML Taskforce mailing-list, pointing out where the ambiguities are. That would be greatly appreciated.
Regards,
Mark
Comment by Mark Birbeck — March 18, 2007 @ 2:56 pm
Mark,
I guess I was confused by the primer. I wait expectantly for the next draft of the syntax document for the exact rules that describe the Primer’s Section 5. Hopefully, that’ll clarify the questions I have… and if I still have any confusion, I’ll definitely post comments on the taskforce mailing list.
Thanks,
Ben
Comment by Ben — March 18, 2007 @ 5:55 pm