RDF CKK Error : Help needed

Events happening in the community are now at Drupal community events on www.drupal.org.
ramya-jadda's picture

Hi,

I'm trying to build a website similar to ( http://www.lin-clark.com/rdf-faculty-db/).

I installed all the modules and created a new content type using RDF CCK content fields called Person(class foaf:person).

But, when I inspected the elements on any person node, it does not have any RDF/RDFa tags. The node/*/rdf gives a " XML Parsing Error: junk after document element" error.

I'm unable to figure where I might have gone wrong.

I'm pretty new to Drupal and RDF, I'm sorry if this is a very direct question. But, I'm stuck and any help will be greatly appreciated.

Thank you.

-Ramya

Comments

RDFa support is not on by

linclark.research's picture

RDFa support is not on by default in Drupal 6. You will probably want to develop with Drupal 7, the development is focused on D7.

RDFa

datorres's picture

I'm doing a similar site. I made the content types like these http://www.lin-clark.com/rdf-faculty-db/ but I do not know how to have the properties such as:

about="/rdf-faculty-db/john-bernard-smith#me" typeof="foaf:Person"
property="dc:contributor">John

Which module I have to install or I need to do?

Please indicate whether you

linclark.research's picture

Please indicate whether you are using Drupal 6 or Drupal 7. If you are using Drupal 6, you should most likely switch to Drupal 7.

Switching from D6 to D7

fereira's picture

Switching a robust D6 site to D7 is just not feasible in many cases.

I'm working with a well known United Nations agency that is very committed to the use of RDF and Open Linked Data. They run numerous Drupal 6 sites and I've been helping with the integration of RDF into a couple of them. I just recently did an analysis of those sites in terms of the modules currently in use and the availability of D7 versions (or identifying replacement functionality). Both of them had numerous modules which currently are not available in D7, nor is the functionality provided by those modules available in the D7 core or other contrib modules. There are at least a couple of them I'd consider show stoppers that would prohibit migration to D7 at this point. Even if the technology was available in D7, the resources to perform the migration are just not available, and I suspect that many institutions currently running D6 are in the same boat.

Switching from D6 to D7 is just not a viable answer right now.

While I appreciate all the work that has gone into RDF support for D7, for the most part much of the RDF/Sparql, etc support in D6 appears to have been mostly abandoned. I'm pretty impressed with D7 so far, especially for an initial GA release, but I also recognize that there are huge number of sites that are going to remain on D6 for quite awhile.

I'm glad to hear that your

linclark.research's picture

I'm glad to hear that your organization is committed to using RDF and Open Linked Data, we could definitely use a few more hands!

If anyone on your team wants to take up development on RDF in Drupal 6, I'm sure that Arto would be glad to give them access. I've never met him, but I have been posting in his issue queues and he is more than happy to get co-maintainers, as he is no longer active in the Drupal project.

Since I have limited time and have a lot of things that I want to do as far as modules and documentation, my contributions are solely focused on Drupal 7.

Drupal 7

datorres's picture

I am using Drupal 7, I created type content student.

@Lin Thank you for your

ramya-jadda's picture

@Lin

Thank you for your response.

I'm using Drupal 6 with RDF CCK module. I have mapped all the content type "Person" fields with Foaf Vocabulary which was imported using evoc. I checked the database tables to verify that all the classes and properties have been imported.

Now, does Drupal automatically adds these tags like "typeOf=foaf:Person" or "property=foaf:firstname" inside my divs.

I would like to know how this could be in Drupal 6 for now.

Any help further will be greatly appreciated.

Thank you.

RDFa in Drupal 6 is pretty much dead...

scor's picture

... unless you are ready to patch modules and write your own tpl files. There is a patch for RDFa support in CCK but I'm not sure whether it still works. You can also check http://openpublishapp.com/doc/creating-semantically-rich-openpublish-themes

Can anyone please direct me

ramya-jadda's picture

Can anyone please direct me to resources that will help do the same in Drupal 7?

Again, I very new(just a couple of weeks) to Drupal and RDF.

Thank you.

You can download RDFx at

linclark.research's picture

You can download RDFx at http://drupal.org/project/rdf. RDF UI has the same functionality as RDF CCK.

Query using SPARQL

ramya-jadda's picture

I used the RDFx module and it works fine. I created Person content with 3 fields that have RDF mappings.

Now, is there a way I could query these nodes using SPARQL?

http://drupal.org/project/spa

scor's picture

http://drupal.org/project/sparql_ep is still experimental for Drupal 7 (you need to checkout from CVS/git).

Hi scor, I installed the

ramya-jadda's picture

Hi scor,

I installed the above module. But, I was looking to build queries like:

PREFIX foaf: http://xmlns.com/foaf/0.1/
SELECT ?firstname ?interest
WHERE
{
?x foaf:firstname ?firstname .
?x foaf:interest ?interest
}

on all the Person nodes.

I'm for my lack of understanding, but I just could not build such queries using RDF SPARQL endpoint.

I was also wondering if you direct to me some resources that will help understand these RDF modules, so I could start
developing in Drupal.

Thank you.

create support request

scor's picture

At this point it's best to create a support request at http://drupal.org/node/add/project-issue/sparql_ep so we can debug further.

I created a support request

ramya-jadda's picture

I created a support request like you have suggested but no one seemed to have responded.

Thank you for your help thus

ramya-jadda's picture

Thank you for your help thus far. I did try out RDFx module.

I created the same Person Content Type. But, node/*/rdf returns the following error:

XML Parsing Error: not well-formed
Location: http://localhost/drupal-rdf/node/3/rdf
Line Number 12, Column 10:

and also, Warning: Illegal offset type in ARC2_RDFSerializer->__init() (line 27 of D:\wamp\www\drupal-rdf\sites\all\modules\rdf\vendor\arc\serializers\ARC2_RDFSerializer.php). error.

I found the same issue here http://drupal.org/node/1002076.

I tried the old version found here: https://github.com/scor/rdf

Can anyone help me fix this please?

I have

datorres's picture

I have the same problem. How you solve it.

SimpleRDF module for D6

pyxio's picture

ramya, you should checkout a new RDF module for D6 that looks very promising (http://drupal.org/project/simplerdf). This module intends to fully support D6 while others like RDF core and RDF CCK do not. I have just installed the module and only had a brief look but I was very impressed with what I saw. I can't attest to if it is buggy or not at this point but in general it looks very good and will let you easily custom your cck fields etc. I'm not sure if it has RDFa support however. Does anybody else have any experience with simpleRDF?

SimpleRDF

fereira's picture

I've also had some success with SimpleRDF. It, like the the sparql_ep module creates a triple store in the database but I ran into issues with sparql_ep when trying to index a "large" site (in fact, sparql_ep has a hard coded limit of 1000 nodes). SimpleRDF also adds an RDF tab when viewing a node and for the most part seems to integrate well with other RDF modules. The only real glitch I encountered was that the SimpleRDF module expects the the ARC2 library to be in sites/default/libraries whereas the RDF module expects (or is at least documented that way) it to be in the vendor/arc directory under the RDF module. Installing "Libraries" module allowed me to put the ARC2 library in the libraries directory and both module could find it. SimpleRDF does have it's limitations but they're fairly well documented.

One other issue that I encountered, but is actually with the ARC2 library is that it hard codes the database store properties such that it uses localhost. On one of the sites that I'm working with they set up their Drupal configuation to use a database on an external host.

Semantic Web

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: