Re: RDFa and Microformats

On 13 Sep 2008, at 22:18, Martin McEvoy wrote:

> Ben Adida wrote:
>>  Are you a W3C member by any chance?
> No I am afraid not, too much of an expense for me, that's why I  
> tend to dedicate most of my time to voluntary communities, One day  
> when I can afford the expense :-)

Ditto. It would be nice if the W3C had an "associate membership" or  
somesuch, more suitable and affordable for individuals, as the  
current membership system is very much designed for organisations.  
Many working groups and task forces are quite open - the RDFa task  
force is a good example - but it would be good if individuals could  
participate on a more level playing field, independently of whatever  
organisation that happened to be affiliated with at the time.

> Yes and the goodness of GRDDL, In fact I am beginning to believe  
> that Microformats And RDFa are not well suited at all and the whole  
> idea was and Interesting but pointless discussion. This I think is  
> because Both Microformats and RDFa use GRDDL profiles, One or two  
> GRDDL applications Redland, ARC that I know of Parse hCards by  
> default without using a transformation link, just using the data- 
> view profile see: http://librdf.org/parse?language=grddl&uri=http:// 
> weborganics.co.uk/demo/hcard.xhtml,

Yep, under GRDDL it's allowed for the parser to have some  
transformations that it will run, even when they are not specified on  
the page. This is analogous to "user style sheets" in CSS.

> so what if I were to mix that with some RDFa, see: http:// 
> librdf.org/parse?language=grddl&uri=http://weborganics.co.uk/demo/ 
> hcard-RDFa.xhtml, Triples are repeating themselves but in different  
> contexts, thats not exactly a defining "meaning", It only brings  
> myself to ask Why use RDFa in my markup when Microformats are easier?

Firstly in RDF, repeated triples are not usually considered  
significant. e.g.

	_:toby foaf:name "Toby Inkster" ;
	       foaf:name "Toby Inkster" .

is fine. Superfluous maybe, but a decent RDF triple store will  
probably just compact them into one anyway.

Why use RDFa when microformats are easier? In many simple situations,  
yes, microformats are easier, and there is no need to use RDFa  
instead/as well. But while there are just a handful of microformats,  
representing contacts, places, events, etc, RDFa is able to represent  
far more. For example, hAudio may well allow you to represent a few  
albums. But with RDFa, you could not only mark up the albums, but  
also include triples to indicate that Martin McEvoy owns this album  
or that album, and another album is on Martin's wishlist, etc.

> Thank you for confirming That small issue up for me... I never did  
> get to the bottom of it, Do you not think RDFa could be used to  
> extract Atom, RSS2 or even XSPF, I do , its fairly easy with a  
> little xslt in fact I believe that Its actually easier to perform   
> XSL transformations on RDFa because of the "extra" properties and  
> their very precise meanings,

While RDFa is used to encode RDF in (X)(HT)ML, you have to remember  
that RDF is itself not a specific format, but rather a generic  
knowledge representation system. Theoretically, any information  
whatsoever can be represented that way. Once you've extracted the  
triples from RDFa, the information does not need to be output as RDF,  
but could be output as Atom, vCard, iCalendar, whatever. Indeed, this  
is what Cognition already does.

Basically, if Cognition saw this hCard:

	<div class="vcard">
	  <a href="http://tobyinkster.co.uk"
	  class="url fn">Toby Inkster</a>
	</div>

it would convert it to the following RDF:

	_:x a vcard:Vcard ;
		vcard:fn "Toby Inkster" ;
		vcard:url <http://tobyinkster.co.uk> .

Similarly if it saw this RDFa:

	<a typeof="foaf:Person"
	  rel="foaf:page" href="http://tobyinkster.co.uk"
	  property="foaf:name">Toby Inkster</a>

It would produce these RDF triples:

	_:x a foaf:Person ;
		foaf:name "Toby Inkster" ;
		foaf:page <http://tobyinkster.co.uk> .

When you ask Cognition to provide a vCard, it doesn't just convert  
straight from hCard - instead it goes through its triple store  
looking for anything which is a "foaf:Person" *or* a  
"vcard:Vcard" (or a pim:Male or a pim:Female, etc). And in both  
cases, identical vCards would be produced:

	BEGIN:VCARD
	FN:Toby Inkster
	URL:http://tobyinkster.co.uk
	END:VCARD

(Actually, there would probably be some minor differences in the  
vCards, but the key information as above would be there.) The key  
when converting RDFa to vCard is simply to convert RDFa to RDF and  
then RDF to vCard.

For another practical application of converting RDFa to an  
interesting format, see <http://buzzword.org.uk/2008/audio/> in which  
both the hAudio microformat, and RDFa are converted to the M3U  
playlist format.

> No I do see that, Using Microformats as an example was probably a  
> bad idea, which seems to have caused some confusion....lets just  
> drop it :-)
>
> I will say I dont believe the RDFa Syntax should be limited to RDF  
> when it can be so much more, it CAN be a Generic Syntax to Describe  
> Semantics, not Limited to RDF...

But RDF *is* a generic syntax to describe semantics. And because RDFa  
is an encoding of RDF in HTML, it also *is* a generic syntax to  
describe semantics.

What semantics do you think cannot be encoded in RDF (and thus RDFa)?

> That again is a rant, Mainly at the would be publishers of RDFa, Do  
> you really think that commercial publishers are not going to  
> exploit RDFa and not build walled gardens and be anti-social? This  
> suggested to me by an SEO I know,   The idea is that every website  
> that he builds for his clients ARE going to exist in its OWN  
> namespace He believes this will Increase the Page Rank of all his  
> sites because the underlying "Meaning" is unique to the site.. it  
> goes a bit further that it basically means instead of creating one  
> link to a page you can deliver a hundred different links in a  
> hundred different contexts because the namespace that he creates  
> for each site map to keywords like http://somesite.com/ns/wood  or   
> http://somesite.com/ns/mahogany

If he also includes some triples somewhere which define

	<http://somesite.com/ns/wood>
	  owl:sameAs
	    <http://dbpedia.org/resource/Wood> .

Then that is fine. He can happily use his own wood resource, and  
parsers are able to know that he means the same thing as dbpedia.org  
(a relatively well-known namespace) means by "Wood". If he doesn't  
define "wood" usefully, then that's not really a problem, but he'll  
probably have very little benefit, so you have to wonder why he'd use  
RDFa at all.

This can be considered analogous to POSH. An author could mark up  
people in their code using:

	<div class="person">
	  <span class="name">Toby Inkster</span>
	</div>

But they get more benefit by re-using well-known class names:

	<div class="vcard">
	  <span class="fn">Toby Inkster</span>
	</div>

They can do it either way and things are fine. But by using the well- 
known, the publisher gets additional benefit.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Sunday, 14 September 2008 09:15:52 UTC