Please forgive the trivial nature of this question. I've been doing some background reading but not quite sure exactly where to begin.
I have a currently functioning Drupal 6 site. It works great with Views, CCK, and a few other modules. I want to add RDFa tags so content on my site can be found (and linked) from semantic web search engines. It seems like I would need to add three modules:
RDF
RDF CCK
RDF External Vocabulary Importer
Is that it? Is there anything else I should consider? Do I need to worry about user permissions or input formats? How difficult or time consuming is it to add RDFa?
My site contains many pages that represent publications, datasets, staff profiles, each with dates, authors, GPS coords, etc... implemented through CCK. It also contains many informational pages without an author/data and generally just a large text body with images and/or attached docs. I thought this would be a good source for adding RDFa.
Thanks for any help you can provide.
John

Comments
I too would love to start
I too would love to start outputting RDFa from several existing D6 sites and I too would appreciate some advice on achieving two broad aims:
1) outputting RDFa from an existing D6 site
2) configuring the D6 site's RDF functionality so that the upgrade from D6 to D7 goes as smoothly as possible
Many thanks,
Jack
i'm getting there slowly!
Inspired by Copenhagen, I've been trying to put together a simple RDF demonstration site and have been wrestling a bit with it all, but I'm getting there. I don't know if an account of what I've done will help, but maybe...
I installed Drupal 6, along with the following: CCK & Views (of course!), RDF, RDF CCK, SPARQL and evoc. (I'm not sure I needed all of them and I can't even remember what evoc is now! :-))
I also installed ARC2 for the RDF module - unpack the tarball from http://arc.semsol.org/download into /vendor/ (you have to create that directory) in the sites/modules/rdf/ directory.
The next thing to do (on Drupal6), if you're after inline RDFa is to patch CCK - as per this discussion - note that you want patch 2 (near the end of that page), not the one at the start of the discussion. (Remember to reapply the patch if you update/reinstall CCK).
All that done, I enabled all of those modules via the Drupal admin interface.
I then created two node types using CCK:
Person - fields: name (title), description (body), knows and created
Resource - fields: title (title), description (body), creator
This is a proof of concept rather than a production site! :-)
When creating the fields I assigned appropriate RDF mappings to these fields - so title -> dc:title, description -> dc:description, knows -> foaf:knows, etc. The RDF Mapping is part of the standard content creation form if the modules are enabled.
Then I added some content using the pile of "Pocket Reference" books that sit on my desk - saved leaning over to look at the shelf all the time! :-)
And I think that was about it!
If you view the source of one of the nodes - for example: http://pxuxp.com/rprdf/node/10
you'll see the inline dc:creator. I'm not quite sure why dc:title isn't there, but I'll check - I suspect I missed something.
You can also see the RDF. I configured it via RDF Settings from the admin pages to output RDF/XML.
Course, if none of that makes sense or works for you, let me know and I'll see if I can fill in the steps I've forgotten to outline here! :-)
Clarifications...
First, the name of the directory for arc2 is vendor? Why?
What about that mapping there, the RDF mappings? What are you mapping from and to? I'm just jumping into all this and I feel a bit lost.
Thanks,
Bruce
Thanks for making this clear
Hi. This is helpful. I couldn't tell though, the names that you used are not people that you know, correct? And not people that know each other? In terms of this big connected data graph the idea is that these connections between people, using the FOAF, will be made by software applications.
In your application, created relates to the books, the pocket references created, correct?
We just need a way to start connecting all this data among ourselves so that the concept will flourish.
Bruce
Hi, what
Hi, what xmlns:site="http://pxuxp.com/rprdf/ns#" in the /rprdf/node/*/rdf and why it gives error 404?
Thanks for including your
Thanks for including your experience pxuxp.
You mentioned "if you're after inline RDFa". What else is there? I guess I just assumed that RDFa meant inline. Is it also that maybe these RDF-based modules can create some kind of accessible database/triple store (say on a nightly or weekly basis) that can be searched/indexed by semantic web search engines?
Also, once everything is setup and working, inline or else, would the site need to be registered with the semantic search engines? OR do they have crawlers that specifically look for RDFa tags?
Thanks.
Thanks
@pxuxp
Thanks for taking the time to detail your steps, that's very useful :)
D7 is best
I recall recently watching a Q & A from a recent conference where Stéphane Corlosquet, who is spearheading a lot of the RDF and Semantic Web for Drupal 7 (as well as being responsible for many of the D6 modules like evoc), answered a question about implementing RDF in Drupal 6. His response was that Drupal 7 was the way to go if at all possible. Just thought that I would throw that in as something to be considered.
My experience with the Semantic Web pieces (SPARQL, etc.) on D6 was that some things work well, but if you want to customize it much, it is difficult. For example, I was never able to import an external vocabulary successfully. So personally, I am going to use D7 for any serious implementations of RDFa, SPARQL, etc.
Thanks for the info. It
Thanks for the info. It definitely seems to be true that D7 is the way to go for semantic implementations. However, obviously, the need for semantic interoperability is rarely the driving factor. Something basic that works for D6, without the customizations or bells and whistles being built for D7, would be beneficial to many people. I bet there are hundreds or maybe thousands of data/content-packed D6 sites willing to add the simplest RDFa implementation without the need for much more.
I hope that someone picks up the D6 modules and finishes them off. Maybe the current D6 modules do work well at a basic level (I need to try them out.) Or maybe the primary RDF developers/committers once D7 is out the door, or maybe someone new who has some money and a strong need, can clean them up and release stable versions. So much work has already been done.
Inline & D7
@diodata
"You mentioned "if you're after inline RDFa". What else is there? I guess I just assumed that RDFa meant inline."
I don't think I was clear... Yes - the RDFa is inline (with xhtml) RDF. The "other RDF" I was referring to is the explicit RDF record for the resource which, by convention it seems, can usually be found at Resource URI + /rdf - as in http://pxuxp.com/rprdf/node/10/rdf. (The format of this configurable - very nice!). This gives crawlers, and your own indexers, the freedom to parse the RDFa or grab the full RDF record. Which is better, I've no idea and suspect it depends on the application...
As for your second question: "Is it also that maybe these RDF-based modules can create some kind of accessible database/triple store (say on a nightly or weekly basis) that can be searched/indexed by semantic web search engines?", the short answer is I dunno! The longer one is that the SPARQL module offers a SPARQL API that can be used internally - very useful when constructing an interface and possibly what I'll be using next iteration as our data model is suited to RDF - but I'm not sure if the endpoint is part of the module, or needs installing separately. (To be honest it is probably best to keep the triple store separate from the Drupal instance - triple stores are pretty hardware intensive with large datasets! ;-))
@bkudrie
I agree! Drupal 7 seems the way to go if you want RDF support. I used v6 because I wanted to get a prototype up very quickly (a couple of hours). I'm more familiar with v6 and the modules seemed (understandably, and hopefully something to help with) better documented than the Drupal 7 RDF core.
Looking to the future, I'd opt for Drupal 7! :-)
Non CCK fields?
Hi pxuxp,
Thanks for your guide, that was really useful to get started.
I've got to the same point as you, and I'm now trying to think about how to move it forward. The method you describe allows us to add RDF to any CCK fields, but do you know of a way to do the same for the non-CCK fields which form the core of all content types? I'm thinking of the standard "author" fields etc? How did you get these values into your RDF output at http://pxuxp.com/rprdf/node/10/rdf/?
I can see in /admin/settings/rdf/mappings that the fields are mapped to, for example Authored by = dc:creator, but its not appearing in my RDF... did I miss a step somewhere?
Thanks
Tom
Non CCK fields 2
Hi Tom,
Glad it helped!
Have you checked the mappings in the content type definition?
[D6ROOT]/admin/content/node-type/[YOURTYPE]/rdf
I just tried adding "foaf:name" here on the Person type I created and foaf:name now appears...
Does that make sense?
Pete
Hi Pete, Yes, I've tried
Hi Pete,
Yes, I've tried that, unfortunately the only fields I can apply a mapping to are either my custom CCK fields, or "Title" and "Body" from node. None of the authoring information or taxonomy information fields are available to assign a mapping.
Is that expected?
Thanks
Tom
Ah, I see. Yes. I think that
Ah, I see. Yes. I think that probably is expected - or at least it is what I'm getting too! I'm no expert in this stuff! :-) It may be you've hit a limit of the modules. Dunno if that limit still applies in D7.
This blog post (iskra.net) talks about adding taxonomy fields - might help I guess and it is possible you can do what you want with further mappings from a module or something...
Good luck! :-)
Pete
Adding RDFa / Microformats automatically
Hello diodata,
we have developed the Ontos Feeder Drupal plug-in that tags the content with RDFa and Microformats fully automatically. It is currently being approved by the CVS maintainers and should become available very soon for the Drupal community.
In the meanwhile you can play around with the Wordpress version of the plug-in, that is already available for download.
For both plug-in versions please have a look at the Ontos Feeder webpage:
http://www.ontos.com/o_eng/index.php?cs=2-2#feeder
Hope that helps! If you have questions, please don't hesitate to ask :)
Sincerely,
Alex Klebeck
Ontos AG
www.ontos.com