- From: Toby Inkster <tai@g5n.co.uk>
- Date: Thu, 14 May 2009 10:50:08 +0100
- To: Manu Sporny <msporny@digitalbazaar.com>
- Cc: RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
On Wed, 2009-05-13 at 00:37 -0400, Manu Sporny wrote: > http://rdfa.info/wiki/rdfa-profiles I think I've stated on this list before that I'm an RDFa Profile sceptic. Having URI-based extensibility without the pain of constantly looking up URIs is certainly appealing. (And I want to know who thought it would be a good idea to give the main RDF namespace such a long and impossible to remember URL!) However, I don't know if this is the best way of achieving it. By relying on prefix definitions outside the document itself, you introduce an extra level of fragility. What happens if the profile document disappears? This would make RDFa a less suitable format for archival. Some might say, that RDF is doomed already, because when I say that I'm a <http://xmlns.com/foaf/0.1/Person> I'm relying on danbri's definition of a Person, and if he goes crazy and changes it, then I'll be in trouble. But that's not quite true. Sure, danbri keeps a definition of <http://xmlns.com/foaf/0.1/Person> at the URL itself. But I can also keep a definition of what a <http://xmlns.com/foaf/0.1/Person> is somewhere else. While my definition might not be as easy to find, under the RDF model it's treated just the same as danbri's. In 50 years' time, once I've loaded by definition of <http://xmlns.com/foaf/0.1/Person> and all the other FOAF terms, and my archive document into a reasoning engine, I can start to use it. Even if nobody has a definition of exactly what a <http://xmlns.com/foaf/0.1/Person> is anymore, it's still possible to reason that all the resources on the web with that type are the same general sort of thing in some way. With RDFa Profiles, it's not as clear that this will work. If the profile document disappears, I won't know whether typeof="Person" refers to <http://xmlns.com/foaf/0.1/Person> or some other definition of a Person (Google's?). Two documents could be using typeof="Person" to refer to different classes and if the profile documents were gone, then we'd never know. Separating prefix definitions from the document also introduces other shorter-term practical problems: it requires RDFa implementations to have network access. Nowadays, most programming languages provide HTTP stuff out of the box, but there are still some scripting languages which are limited in this area. Javascript in particular is an area of concern - there are various same-origin limitations on XmlHttpRequest - as is XSLT. There is also a speed penalty incurred by fetching another document - especially another document on another server as that means that HTTP pipe-lining can't be employed. Now, let's make this message one of *constructive* criticism instead of just criticism. One of the main benefits of RDFa profiles is the ability to be able to use terms without prefixes. Another way to be able to do this would be setting a default prefix - the CURIE draft already allows for a default prefix, so it's just a matter of providing authors with a mechanism to specify it. This could involve a tiny tweak to existing syntax: <div xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/terms/"> ... <div rel="dc:creator"> <p typeof="+foaf:Person"> <a rel="homepage" href="http://tobyinkster.co.uk/" property="name">Toby Inkster</a> </p> </div> </div> Note the special @typeof syntax which would be defined to not just set the blank node's type, but also define the default prefix for all descendant elements. In my imagination, this syntax is only allowed on @typeof (not other RDFa attributes) because when you specify the type that something has, then you create expectations of the vocabulary you're going to use to describe it. This is roughly compatible with the current version of RDFa, in that the triples generated by an existing parser would be a subset of the triples generated by a plus-sign-aware parser. i.e. # Standard: <> dc:creator _:x1 . # Plus-sign-aware: <> dc:creator _:x1 . _:x1 a foaf:Person . _:x1 foaf:homepage <http://tobyinkster.co.uk/> . _:x1 foaf:name "Toby Inkster" . Another alternative way of setting the default prefix would be to use @profile more directly. The @profile attribute is allowed on all elements and provides a list of URIs. The first URI in the list is taken to be the default prefix. (Other URIs may be present and can be used for other purposes - e.g. GRDDL.) If the URI ends in an alpha-numeric character, then a '#' sign is appended automatically. If there is a head@profile attribute, but no html@profile, then head@profile is automatically applied to the <html> element. This interpretation is compatible with the current RDFa-recommended profile of <http://www.w3.org/1999/xhtml/vocab>. -- Toby Inkster <mail@tobyinkster.co.uk>
Received on Thursday, 14 May 2009 09:51:03 UTC