Hi, Dan --

On Dec 30, 2009, at 11:47 AM, Daniel Alexander Smith wrote:

Apologies if I've not read the manual correctly. I'm trying to add
some RDF/XML from the web to my VOS store via ODBC.

I've previously using local files fine. Now I want to add a file, such
as:
http://purl.org/net/das301.xrdf

Well...  That URI apparently identifies a resource, but it's not
a file -- as the 302 tells you.


I'm trying this command:

helix:dataprocessor das05r$ /usr/local/virtuoso-opensource/bin/isql
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
SQL> CALL DB.DBA.RDF_LOAD_RDFXML_MT(http_get('http://purl.org/net/das301.xrdf')
, '', 'dataproc_foo');
Connected to OpenLink Virtuoso
Driver: 05.11.3039 OpenLink Virtuoso ODBC Driver

*** Error 22007: [Virtuoso Driver][Virtuoso Server]XM033: XML parser
detected an error:
        FATAL  : Non-whitespace character found instead of XML element
at line 4 column 27 of source text
       <TITLE>302 Found</TITLE>
------------------------^
at line 1 of Top-Level:
CALL DB.DBA.RDF_LOAD_RDFXML_MT(http_get('http://purl.org/net/das301.xrdf')
, '', 'dataproc_foo')


Is http_get the right thing to use? It's not following the 302, it
seems to be trying to parse it as a source?

http_get() is fine, as far as it goes -- but RDF_LOAD_RDFXML_MT
wasn't built with crawling in mind, which is what you're doing
once you go beyond URIs that return `200 OK` to the GET.

For now, your best bet is to let the Sponger handle the crawling,
easily done with curl or wget calls to URIs like --

<http://your-instance.example.com:4321/sparql?default-graph-uri=http%3A%2F%2F purl.org%2Fnet%2Fdas301.xrdf&should-sponge=soft&query=select+*+where+{%3Fs+%3Fp+%3Fo}&format=text%2Fhtml&debug=on >

You can use other Virtuoso pragma options to tailor your query
as required. Further details on IRI de-referencing and use of
pragmas can be obtained from:

   <http://docs.openlinksw.com/virtuoso/rdfiridereferencing.html>

Hope that helps!

Ted


Many thanks,

Dan




--
Daniel Alexander Smith

IAM Group
School of Electronics and Computer Science
University of Southampton
[email protected]




--
A: Yes.                      http://www.guckes.net/faq/attribution.html
| Q: Are you sure?
| | A: Because it reverses the logical flow of conversation.
| | | Q: Why is top posting frowned upon?

Ted Thibodeau, Jr.           //               voice +1-781-273-0900 x32
Evangelism & Support         //        mailto:[email protected]
OpenLink Software, Inc.      //              http://www.openlinksw.com/
                       http://twitter.com/TallTed
                                 http://www.openlinksw.com/weblogs/uda/
OpenLink Blogs              http://www.openlinksw.com/weblogs/virtuoso/
                               http://www.openlinksw.com/blog/~kidehen/
    Universal Data Access and Virtual Database Technology Providers


Reply via email to