Commentary by Mark Wahl, CISA
Organizing principles for identity systems:
Embedding SIOC in XHTML with RDFa (20070725)
I have been experimenting with adding in the (X)HTML blog summary page http://www.ldap.com/1/commentary/wahl/ XML attributes defined by RDFa with values that express SIOC relationships of posts to the blog.
Quoting from the home page of the Semantically-interlinked online communities (SIOC) project,
"SIOC provides methods for interconnecting discussion methods such as blogs, forums and mailing lists to each other. It consists of the SIOC ontology, an open-standard machine readable format for expressing the information contained both explicitly and implicitly in internet discussion methods, of SIOC metadata producers for a number of popular blogging platforms and content management systems, and of storage and browsing / searching systems for leveraging this SIOC data."
While a SIOC description of a blog, a post or other resources can be represented today in a separate RDF-encoded XML file, the emerging RDFa allows SIOC (and indeed any RDF) to be placed inside a XHTML document.
"RDFa is a syntax for expressing this structured data in XHTML. The rendered, hypertext data of XHTML is reused by the RDFa markup, so that publishers don't repeat themselves. The underlying abstract representation is RDF, which lets publishers build their own vocabulary, extend others, and evolve their vocabulary with maximal interoperability over time. The expressed structure is closely tied to the data, so that rendered data can be copied and pasted along with its relevant structure."
Unlike a microformat, RDFa does not require a separate design process to decide on how SIOC should be re-encoded to fit into XHTML: RDFa gives a pattern for the translation of the properties defined by an ontology, in this case the SIOC ontology, to values of XML attributes which can be placed on XHTML elements.
In the XHTML examples below, additions to the HTML for RDFa are in bold, and for SIOC in particular are in italics.
Namespaces are added to the top of the XHTML file for RDF, RDF Schema, Dublin Core and SIOC ontologies:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
xmlns:sioc="http://rdfs.org/sioc/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:this="http://www.ldap.com/1/commentary/wahl/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/">
The description of the blog itself is added to an XML element which contains other elements (in this file, a ul happened to be handy). This declares http://www.ldap.com/1/commentary/wahl to be a Container in the SIOC ontology, with a property of date (in the Dublin Core ontology) with value 2007-07-25.
<ul class="sioc:Container" about="http://www.ldap.com/1/commentary/wahl/">
<li>Last updated <span property="dc:date" content="2007-07-25">2007 July 25</span>
A description of a specific post. This declares http://www.ldap.com/1/commentary/wahl/20070724_01.shtml to be a Post in the SIOC ontology, with title and created properties, and a link back to the container which holds it.
<p class="sioc:Post" id="post_20070724_01" about="http://www.ldap.com/1/commentary/wahl/20070724_01.shtml">
<a href="http://www.ldap.com/1/commentary/wahl/20070724_01.shtml">
<span property="dc:title">OpenID and 20 years of distributed systems</span>,
<span property="dcterms:created" content="2007-07-24T00:00:01Z">2007/7/24</span>
</a>
<a href="http://www.ldap.com/1/commentary/wahl/" rel="sioc:has_container"></a>
</p>