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

RE: hAudio RDFa implementation using Operator

From: Hausenblas, Michael <michael.hausenblas@joanneum.at>
Date: Wed, 8 Aug 2007 07:44:03 +0200
Message-ID: <768DACDC356ED04EA1F1130F97D2985201255D94@RZJC2EX.jr1.local>
To: "Manu Sporny" <msporny@digitalbazaar.com>
Cc: "Mike Kaply" <microformats@kaply.com>, "RDFa mailing list" <public-rdf-in-xhtml-tf@w3.org>


Manu,

>> Wouldn't it be fun to create some SPARQL queries on top of it
>> to demonstrate the 'real' power of RDF? ;)
>
>That would be awesome - unfortunately none of us at DB have any idea on
>how to do that, but are willing to learn :). I'll try reading up on it
>or handing it off to one of our engineers - any pointers on 
>where a good starting point would be for implementing/testing SPARQL
queries? Are
>there any tools for doing so right now?

To get started with SPARQL I'd suggest to look at the following
resources:

+ SPARQL, the REC http://www.w3.org/TR/rdf-sparql-query/

+ SPARQL, the FAQ http://thefigtrees.net/lee/sw/sparql-faq

+ A general purpose SPARQL processor - http://sparql.org/sparql.html

+ Danny had a wonderful SPARQL editor at
http://dannyayers.com/2006/09/27/javascript-sparql-editor
  but currently his site seems to be down; in case he reads this he
might be able 
  to say, when it will be available, again :)

HTH for the kick-off ...

I've now put your tests onto our server to be able to
demonstrate queries (hope this is ok with you :)

An example query would be: How much is "Cheatin' Side of Town"?

Now, a bit more technical:
________________________________________________________________________
______________

prefix xsd:  <http://www.w3.org/2001/XMLSchema#>
prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
prefix money: <http://www.microformats.org/2007/10/money/>
prefix hcommerce: <http://www.microformats.org/2007/12/hcommerce/>
prefix hmedia: <http://www.microformats.org/2007/11/hmedia/>
prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>
prefix dc: <http://purl.org/dc/elements/1.1/>


SELECT ?ha ?amount ?currency
FROM
<http://triplr.org/rdfa-rdf/http://sw.joanneum.at/rdfa/hAudio/haudio_rdf
a_test.html>
WHERE {
	?ha rdf:type hmedia:Audio ;
          dc:title "Cheatin' Side of Town"^^rdf:XMLLiteral ;
          dc:creator ?creator ;
          money:price ?price .
      ?price money:amount ?amount ;
             money:currency ?currency .        
}
________________________________________________________________________
______________

You can directly view the result at:
http://sparql.org/sparql?query=prefix+xsd%3A++%3Chttp%3A%2F%2Fwww.w3.org
%2F2001%2FXMLSchema%23%3E%0D%0Aprefix+rdf%3A++%3Chttp%3A%2F%2Fwww.w3.org
%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0Aprefix+rdfs%3A+%3Chttp%3A%2F%
2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E+%0D%0Aprefix+money%3A+%3Chtt
p%3A%2F%2Fwww.microformats.org%2F2007%2F10%2Fmoney%2F%3E%0D%0Aprefix+hco
mmerce%3A+%3Chttp%3A%2F%2Fwww.microformats.org%2F2007%2F12%2Fhcommerce%2
F%3E%0D%0Aprefix+hmedia%3A+%3Chttp%3A%2F%2Fwww.microformats.org%2F2007%2
F11%2Fhmedia%2F%3E%0D%0Aprefix+vcard%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F200
1%2Fvcard-rdf%2F3.0%23%3E%0D%0Aprefix+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fd
c%2Felements%2F1.1%2F%3E%0D%0A%0D%0A%0D%0ASELECT+%3Fha+%3Famount+%3Fcurr
ency%0D%0AFROM+%3Chttp%3A%2F%2Ftriplr.org%2Frdfa-rdf%2Fhttp%3A%2F%2Fsw.j
oanneum.at%2Frdfa%2FhAudio%2Fhaudio_rdfa_test.html%3E%0D%0AWHERE+%7B%0D%
0A%09%3Fha+rdf%3Atype+hmedia%3AAudio+%3B%0D%0A++++++++++dc%3Atitle+%22Ch
eatin%27+Side+of+Town%22%5E%5Erdf%3AXMLLiteral+%3B%0D%0A++++++++++dc%3Ac
reator+%3Fcreator+%3B%0D%0A++++++++++money%3Aprice+%3Fprice+.%0D%0A+++++
+%3Fprice+money%3Aamount+%3Famount+%3B%0D%0A+++++++++++++money%3Acurrenc
y+%3Fcurrency+.++++++++%0D%0A%7D&default-graph-uri=&stylesheet=%2Fxml-to
-html.xsl


Cheers,
	Michael

----------------------------------------------------------
 Michael Hausenblas, MSc.
 Institute of Information Systems & Information Management
 JOANNEUM RESEARCH Forschungsgesellschaft mbH
  
 http://www.joanneum.at/iis/
----------------------------------------------------------
 
Received on Wednesday, 8 August 2007 05:42:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:15:09 GMT