W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > October 2008

Re: RDFa in Drupal core

From: Toby A Inkster <tai@g5n.co.uk>
Date: Thu, 2 Oct 2008 21:43:36 +0100
Message-Id: <7C9F6490-F155-4F04-BDFD-61B992C80CC2@g5n.co.uk>
To: RDFa <public-rdf-in-xhtml-tf@w3.org>, public-rdfa@w3.org

David Peterson wrote:

> Do you see any other useful, general purpose vocabs that would make
> sense to plug into such an open framework? One key strength of  
> Drupal is
> its sense of tagging content.

You should probably check out Richard Newman's Tag Ontology <http:// 
www.holygoat.co.uk/projects/tags/> which is a very complete and  
flexible system for tagging content. There are essentially two ways  
of using it - the easy way:

	<#someResource>
	  tags:taggedWithTag
	    [ a tags:Tag ; tags:tagName "this" ] ,
	    [ a tags:Tag ; tags:tagName "that" ] .

Which could be used a bit like this using RDFa:

	<p about="#someResource">
	    This resource is tagged with:
	    <a href="http://mysite.example.com/tag/this"
	    rel="tags:taggedWitgTag tag">
	        <span typeof="tags:Tag"
	        property="tags:tagName">this</span>
	    </a>
	    and
	    <a href="http://mysite.example.com/tag/that"
	    rel="tags:taggedWitgTag tag">
	        <span typeof="tags:Tag"
	        property="tags:tagName">that</span>
	    </a>
	</p>

There's also the re-ified way, where you have a "Tagging" which is an  
event by which tags are assigned to a resource. It works a bit like  
this:

	
	<#someResource>
	  tags:tag
	    [
	      a tags:Tagging ;
	      tags:taggedBy
	        [ a foaf:Person ; foaf:name "Toby Inkster" ] ;
	      tags:taggedOn
	        "2008-10-02"^^xsd:date ;
	      tags:associatedTag
	        [ a tags:Tag ; tags:tagName "this" ] ,
	        [ a tags:Tag ; tags:tagName "that" ]
	    ] .

This could be marked up with RDFa like:

	<div about="#someResource" rel="tags:tag" rev="tags:taggedResource">
	    <p typeof="tags:Tagging">
	        <span rel="tags:taggedBy">
	            <span typeof="foaf:name" property="foaf:name"
	            >Toby Inkster</span>
	        </span>
	        tagged this resource as
	        <a href="http://mysite.example.com/tag/this"
	        rel="tags:associatedTag">
	            <span typeof="tags:Tag"
	            property="tags:tagName">this</span>
	        </a>
	        and
	        <a href="http://mysite.example.com/tag/that"
	        rel="tags:associatedTag">
	            <span typeof="tags:Tag"
	            property="tags:tagName">that</span>
	        </a>
	    </p>
	</div>

(The indentation in those examples is quite horrible. Apple Mail has  
terrible line wrapping, so I had to keep lines short to avoid  
triggering it.)

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Thursday, 2 October 2008 20:44:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 2 October 2008 20:44:44 GMT