W3C home > Mailing lists > Public > public-rdfa@w3.org > September 2008

Digg RDFa SIOC - Part 2 - Community and Forums

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Sun, 28 Sep 2008 12:45:34 -0400
Message-ID: <48DFB4AE.60005@digitalbazaar.com>
To: RDFa Community <public-rdfa@w3.org>

If you take a look at the XHTML+RDFa and triples generated for this URL:

http://rdfa.digitalbazaar.com/demos/digg/stemcells.html

You will notice two concepts that are marked up: Community and Forums

The community is, of course, the Digg community. Marked up like so:

<h1 about="http://digg.com/" typeof="sioc:Community"><a
href="http://digg.com/" property="dcterms:title sioc:name">Digg</a></h1>

This will produce the following triples:

<http://digg.com/>
   rdf:type
      sioc:Community .
<http://digg.com/>
   dcterms:title
      "Digg" .
<http://digg.com/>
   sioc:name
      "Digg" .

Each category of Digg is marked up as an sioc:Forum. The following
example marks up the top-level "Technology" category as a forum:

<li class="h-drop"><a typeof="sioc:Forum"
    href="http://digg.com/news/technology">
   <strong property="dcterms:title">Technology</strong>
      <em id="catdrop1001" class="catdrop"> more</em></a>
...

and then marks up each individual sub-category as a forum with the
Technology category as the parent:

<ul about="/news/technology" rel="sioc:parent_of"
    class="submenu-drop catdropm" id="catdropm1001"
    style="display: none;">
   <li>
      <a typeof="sioc:Forum" href="http://digg.com/news/apple">
         <span property="dcterms:title">Apple</span>
      </a>
   </li>
...

the above results in the following triples:

<http://digg.com/news/technology>
   rdf:type
      sioc:Forum .
<http://digg.com/news/technology>
   dcterms:title
      "Technology" .
<http://digg.com/news/apple>
   rdf:type
      sioc:Forum .
<http://digg.com/news/apple>
   dcterms:title
      "Apple" .
<http://digg.com/news/technology>
   sioc:parent_of
      <http://digg.com/news/apple> .

This markup not only identifies the community and the forums in Digg,
but the relationship of the various forums to each other. You could also
mark up RSS feeds via sioc:feed. The one thing I didn't do is relate the
forums back to the Digg community, which would be important to do in
production code.

-- manu

-- 
Manu Sporny
President/CEO - Digital Bazaar, Inc.
blog: Bitmunk 3.0 Website Launches
http://blog.digitalbazaar.com/2008/07/03/bitmunk-3-website-launches
Received on Sunday, 28 September 2008 16:46:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 28 September 2008 16:46:15 GMT