Half way through the RDF code sprint - Google Announces Support for RDFa
We're half way through the sprint and we just heard that Google has announced support for RDFa. What a coincidence, surely another sign proving Drupal's heading in the right direction! Now is time for some update on the sprint.
During day 1, we decided to split the group into two in order to enable some parallel developement and to make use of the 2 main skills we had at hand: RDF semantics and Drupal coding.
One group worked on choosing the best mappings and created a mockup for an RDFa enabled Drupal page with the Stark theme, it's an article page with threaded comments from registered users and anonymous users. You can view the static HTML in the attached document. It is not perfect and there is a bit of optimization to be done, but it's a good starting point and it provides some RDFa mark-up for the second group. Mark Birbeck, who designed RDFa, gave us some good help on day 1. Thanks to the Ubiquity RDFa parser it's really easy to check the RDF contained in any RDFa page. You simply need to drag and drop the RDFa checker bookmarklet into your browser and you're ready to go! Open the attached HTML document and click on the RDFa checker bookmarklet to see the RDF.
The second group focused on how to tackle the core implementation of what was discussed at the second RDF BoF in DrupalCon DC (see slides). Yesterday we posted a fairly generic initial approach with some CRUD functions to manage the RDF mappings of a Drupal site. However we decided that core does not need such a complex mechanism, which should go in contrib to allow mapping editing, in the same fashion as the Fields UI which allows the user to create/edit Fields. For core we decided to limit the mappings to what is defined programmatically by the modules via a set of 3 basic functions:
hook_rdf_mapping()
- Allow modules to define their own RDF mappingshook_rdf_mapping_alter(&$mapping)
- Allow modules to override existing mappingsrdf_get_mapping($bundle)
- Returns the mapping for the attributes of the given bundle as an associative array
We've started to document these and there is a test implemented for hook_rdf_mapping().
You can already view the code as it gets committed to our copy of Drupal core. All the instructions can be found on Florian's post, which boils down to running
bzr branch bzr://vcs.happypixels.net/drupal-rdf/ my-drupal-rdf-working-copy
on your local machine. Join on on IRC #drupal-rdf
if you want to give some feedback and help out.
AttachmentSize article_rdfa.html11.9 KB Tags: