- From: Peter Mika <pmika@yahoo-inc.com>
- Date: Mon, 28 May 2007 18:02:14 +0200
- To: public-rdf-in-xhtml-tf@w3.org
Hi All, I have some comments on RDFa based on my experiences in trying to use it for the openacademia project. Basically, the idea is to use RDFa to mark up publication metadata in HTML publication lists generated by openacademia. These typically are embedded in personal homepages as in [2]. We are using the SWRC ontology for publication metadata and FOAF for personal metadata. My knowledge of RDFa is based on the Primer and I havent' followed the mailing list so far, so please forgive me if I point out something obvious or something that is already noted. Comment #1 ------------- RDFa seems to interfere with existing markup. On the pages we generate we would like to have both our own markup, hCard as well as RDFa. My first attempt to mix hCard and RDFa would be: <span class="vcard"> <span class="fn foaf:Person" property="foaf:name" about="http://www.cs.vu.nl/~pmika/publications.bib#peter_mika">Peter Mika</span> </span> This doesn't work: when I unleash the RDFa bookmarklet on this I get the nonsensical triple which says that #peter_mika is both type foaf:Person and type fn. So the solution seems to be: <span class="vcard"> <span class="fn"> <span class="foaf:Person" property="foaf:name" about="http://www.cs.vu.nl/~pmika/publications.bib#peter_mika">Peter Mika</span> </span> </span> Still, the bookmarklet generates four triples: <http://www.cs.vu.nl/~pmika/publications.bib#peter_mika> foaf:name "Peter Mika" . <http://www.cs.vu.nl/~pmika/publications.bib#peter_mika> rdf:type foaf:Person . <> rdf:type fn . <> rdf:type vcard . (The last two seem to be a bug?) The fact that I cannot mix RDFa class names and other class names in a single span element makes things even more complex when I want to say that there is a publication and this person is the author of it. My current minimal solution requires six levels of nesting (!): <li class="swrc:Article" about="http://www.cs.vu.nl/~pmika/publications.bib#mika06jws"> <span class="hbib article"> <span class="vcard"> <span class="author fn"> <span rel="swrc:author" href="http://www.cs.vu.nl/~pmika/publications.bib#peter_mika"> <span class="foaf:Person" property="foaf:name" about="http://www.cs.vu.nl/~pmika/publications.bib#peter_mika"> Peter Mika </span> </span> </span> <!-- Next author would come here --> </span> </li> Since this seems to defeat the purpose of human-writable markup, I suggest minimally documenting this issue... Stronger, I would have expected this to work based on the experiences with microformats, which happily mix together in the same class attribute. Note that from this code the bookmarklet still produces a number of nonsensical triples involving the non-RDFa classnames. Comment #2 ~~~~~~~~~ It seems unnatural to put the foaf:Person class attribute on the element that gives the name of the person. However, when I try the seemingly logical solution: ..... <span class="foaf:Person" rel="swrc:author" href="http://www.cs.vu.nl/~pmika/publications.bib#peter_mika"> <span property="foaf:name"> Peter Mika </span> </span> .... What happens is that the publication becomes type foaf:Person, instead of #peter_mika. Again, this is unnatural to me, so I suggest to change it, or if this is the best possible compromise, then it would be helpful to document it to alert users. Hope these comments are helpful... please let me know if I'm doing something wrong or have been misinterpreting how things should work. Thanks, Peter Mika (Yahoo! Research Barcelona) [1] http://www.openacademia.org [2] http://www.cs.vu.nl/~pmika/research.html
Received on Monday, 28 May 2007 16:04:11 UTC