Indeed it moved
, forward I hope. Anyway my new typo blog resides there (http://blog.cedricmesnage.org/). Go check it out and update your feed readers (feed) as I won’t publish here no more.
See you on the other side!
Indeed it moved
, forward I hope. Anyway my new typo blog resides there (http://blog.cedricmesnage.org/). Go check it out and update your feed readers (feed) as I won’t publish here no more.
See you on the other side!
Leave a Comment » |
blogging |
Permalink
Posted by cedricmesnage
Version 0.0.7 of RDFa On Rails is now out. It contains many significant improvements. First of all the code has been refactored into modules to get things clearer. Then we have support for the full vocabularies of rdfs, dc, sioc, foaf and scot. What does it mean? For each class defined in rdfs for instance you get a method such as rdfa_rdfs_resource which takes as input a uri and a block. For each property define in the previously mentioned vocabularies, you get methods such as rdfa_rdfs_label which takes a value(might be a uri), an optional subject uri and an optional block. And another goodie, for each property you also get a link_to helper such as rdfa_link_to_dc_creator. So you can implement:
<% rdfa_rdfs_resource do %>
<%= rdfa_dc_title "a resource in RDFa on rails" %>
<% rdfa_dc_date "2007-06-03" do %> June the third in the holy 2007 <%end%>
<%= rdfa_link_to_dc_creator "Cédric Mesnage", "http://www.inf.unisi.ch/phd/mesnage/" %>
<%end%>
Notice that in the previous example we didn’t give a uri to the resource, in this case a blank node will be generated. To summarize, we have:
So basically you already have most of the things you need to represent your data in RDFa. But what if you want to use a specific vocabulary that we don’t support? well just do the same as we do:
Rdfa.register_namespace(name, namespace)Rdfa.register_rdfa_classes(namespace short name, list of classes)Rdfa.register_rdfa_properties(namespaceshort name , list of properties)Simple enough? That’s what we use to support the vocabularies, as in this example for some of the foaf vocabulary:
Rdfa.register_rdfa_namespace :foaf , 'http://xmlns.com/foaf/0.1/'
Rdfa.register_rdfa_classes :foaf, ['Person','Project']
Rdfa.register_rdfa_properties :foaf, ["mbox","name","knows"]
Next things to be done, complete and refine the documentation, improve the rdfa-typo theme, add unit testing.
Leave a Comment » |
RDFa, RDFa On Rails, Ruby, Ruby On Rails, Semantic Web, Web, Web2.0, socialtagging |
Permalink
Posted by cedricmesnage
You are currently browsing the my understanding blog archives for June, 2007.
Theme Contempt by Vault9.
Blog at WordPress.com.