Posted by brucewhealtonjr on September 11, 2010 at 5:27am
Whenever I try to import and external RDF library, I get this error:
* warning: Invalid argument supplied for foreach() in /home2/future/public_html/drupal/sites/all/modules/evoc/evoc.module on line 199.
* warning: Invalid argument supplied for foreach() in /home2/future/public_html/drupal/sites/all/modules/evoc/evoc.module on line 199.
Then it tells me the namespace has been created.
Should I worry about this? What does it mean?
Bruce
Comments
evoc errors
I took a look at the code and the error essentially means that the results of the sparql query to the endpoint using a query with the namespace you specified did not return any results. The code checks to see if the results returned is an array, but the foreach loop doesn't have anything to iterate on. It should probably check to see if the results are empty as well. There is a problem in that even when the results is not an array (or is one, but is empty) the code attempts to iterate through the results and while an error message may be displayed it never flags that an error occurs and eventually will display a message that the namespace has been created even if it didn't add any properties or classes.
Which namespace are you trying to import?
One of the other problems, that I have logged as an issue, with the evoc module is that it doesn't provide any sort of user interface for displaying what namespaces have been imported and what classes/properties have been stored in the database tables. To do that you have to manually query the database tables (rdf_namespaces, evoc_rdf_classes, evoc_rdf_properties) to see what namespaces/classes/properties have been imported.
Please file bug reports in
Please file bug reports in the RDF module issue at http://drupal.org/project/issues/rdf - they have more chances to be resolved there, they will get lost here in the Semantic Web group, which is rather for higher level discussion on RDF in Drupal.
I wasn't sure it was a bug report or something I did wrong...
How can one get up to speed with RDF in Drupal? Where should I start my reading?
Thanks,
Bruce
@brucewhealtonjr, I think you
@brucewhealtonjr,
I think you probably need to be more specific... :-)
You probably already know this (and forgive me if you do), but in a nutshell, Drupal is about publishing content on the Web, RDF is one way to augment that content with machine readable metadata, and together, Web content and machine readable metadata are called (rightly or wrongly) "The Semantic Web".
I'm not sure which part of the whole you're after information on, or if it is something specific you're trying to achieve with Drupal and RDF that is currently not working out? The funny thing about metadata is there is usually no "big bang". Very few people get excited at the engine of a car but without it, no matter how smooth and shiny the bodywork, the function of the car will be pretty limited. Metadata, to me at least, seems a bit like that.
If you're after information on the Semantic Web - one possible outcome of Drupal+RDF - there are lots of introductions around, but I'd recommend this book (also on Google books).
I'm pretty sure (or you'd not be here!) that you're not after information on Drupal and possibly not RDF either, which leaves the other interpretation to your question which is about using the RDF components of Drupal 7?
I'm less good at answering you there, 'cos it is something I've also struggled to find. I suspect this is because this is all very new (D7 is still in alpha) and documentation is, in any software project, usually the last thing to arrive! :-) From your previous posts, it looks to me (IMHO) that you're doing the right thing by driving into the system and trying it out!
Anyways, I've no idea if those ramblings have been of any help whatsoever, but I'm trying to find my way in this community and this group, and one way is to ramble (I mean contribute)... :-)
Thanks appreciate it - really wanting Semantic Web on Drupal
So, thanks for the book feedback. Ok, I was referred to this group when I posted a question about FOAF vocabulary on the regular forum. Then I get here and get the feeling that this is more for higher level discussions. So, my interests, to be very specific. Hopefully this thread will be read. Since I don't know when Drupal 7 will be out, I am interested in doing RDF and Semantic related things in Drupal 6.
I downloaded the RDF module and read the links that are recommended on that page... two nice ones are comprehensive but don't tell me anything about how to use what I now have with RDF module installed in Drupal. I have a number of texts but none specifically deal with using RDF in Drupal now. I don't even know where to ask my questions - very frustrating. I like to consider myself smart but I'm just missing a piece of the puzzle here.
It seems that when I did evoc I still get those errors. I don't know if I should try to do that again with a vocabulary that I already installed or if there is a way to check to see if a vocabulary is indeed installed. Oh, I forgot to say, but the errors appear but it says the namespace was imported successfully. But if you look at my first post in this thread, I'm getting that same error and this is a different install.
So, getting back to the RDF module. I now have a field for RDF mapping. I'm trying to get an idea as to what I could put there and in what format should the content be?
Should I somehow when I am editing my profile content type and get down there, somehow link to my foaf.rdf file that I have now on my server? Or is that even what it is seeking?
What of that error? But my vocabulary is loaded... so how can I verify that?
Yes, indeed, I need a specific set of instructions for using specific modules with drupal and how that helps my site. I've watched videos online, read articles, and articles, and I'm going through a few books. Now, I want to use this in specific ways.
I did get Programming the Semantic Web would promised to be practical and specific. Unfortunately they start in chapter 2 writing code in Python, which I didn't know. Good time to try to learn python. Can't believe it could be that complex. After some reading up on Python and following some training videos, I'm still a bit confused with what they are doing in that text "Progamming the Semantic Web" using python. I wish they had chosen php.
That being said, it wouldn't teach me how to use rdf and drupal or any semantic web modules in Drupal 6.x.y
That's my desire... to start with some practical things... seeing what happens... how the semantic data is being used on my site... then more complex things like queries that I can make... the whole big idea of linking my data with the web overall.
Thanks so much,
Bruce
It's not exciting or magical yet
@brucewhealtonjr
I just want to reinforce pxuxp's reply because I think it's an excellent response to some of the mystery around Drupal + RDF.
To use pxuxp's words, there really is no 'big bang' at this point. You're not going to see spectacular things happen when you install all these RDF-related modules.
I like to think of the current situation with RDF as being similar to XML maybe 8 years ago. At that point people really needed to start exchanging data over the Web and XML became a go-to format. Now look at where we are today and how many tools rely on XML -- basically everything considered "Web 2.0". It is the X in AJAX after all.
Now we need machines to start exchanging and understanding data better. Enter RDF. Once RDF data becomes available, the tools to do interesting things will come.
Because of significant effort by people like scor and others, Drupal is able to publish its content as RDF/RDFa, and that's a huge step toward making the Semantic Web possible. If you want to start publishing RDF/RDFa with Drupal 6, I'd refer you to a recent post where pxuxp added a nice outline for setting things up. I see you've already commented there, but it may be worth revisiting: http://groups.drupal.org/node/91089#comment-286784