Using RDFa to make a web page editable
As part of the IKS project we're working on semantic web editing. One area there is using RDFa to actually make pages editable. RDFa is a way to embed semantic information to regular html pages, and is already supported by some search engines, making this also a way of doing SEO.
But in addition to telling search engines what the content on our pages means, we can also use it to communicate between templates and the content management UI. In this example I'm using jQuery, Aloha Editor and a Midgard saving plugin for Aloha to manage content.
- Explaining the content shown on a web page via RDFa and making it Aloha-editable
- Storing edited content back to the CMS
- Adding new items to containers (for example, adding a new article to a news listing)
The RDFa used is actually pretty simple. Here is how an article looks like:typeof="http://rdfs.org/sioc/ns#Post" about="urn:uuid:d1eeb24ae38c11df92307f77dcafaed7aed7"
property="dcterms:title" Application Quality Assurance in Linux distributionsproperty="sioc:content"
We had a session about application QA in last weekend's GSoC Mentor Summit. I explained how the Maemo Downloads approval process works in a completely open, crowdsourced way. This differs from many distributions where approval of new packages involves obscure decisions and secret handshakes....
When user wants to save things, there is a Save button provided in the toolbar. Saving reads the contents of modified Aloha instances, and sends them together with RDF type and identifier information back to the server:
When receiving the POST Midgard runs a controller that maps the provided RDF information to a object in the content repository, validates the content and saves. The RDF mappings in a Midgard2 MgdSchema look like the following:http://rdfs.org/sioc/ns#Post sioc:http://rdfs.org/sioc/ns#,dcterms:http://purl.org/dc/terms/ Title of the article true dcterms:title ...