<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#006600" bgcolor="#ffffff">
Martin,<br>
<br>
Sparql queries are pretty easy to construct with standard text
manipulation. Should be easy in Ruby without using any particular rdf
library. Check out the spec for details:<br>
<a href="http://www.w3.org/TR/rdf-sparql-query/">http://www.w3.org/TR/rdf-sparql-query/</a>
Just create the string and send it to the Sparql endpoint.<br>
<br>
As for working with Sparql XML Results, I've never done that, but it
should be a simple matter of parsing the XML, for which Hpricot looks
pretty good:<br>
<a
 href="http://www.rubyinside.com/ruby-xml-performance-benchmarks-1641.html">http://www.rubyinside.com/ruby-xml-performance-benchmarks-1641.html</a><br>
<br>
I'm open to being corrected here, but I think as long as you aren't
working with or storing the RDF directly, you probably don't have much
need for librdf when using the web service as a Sparql endpoint.&nbsp; The
one exception might be if you are using the data from the service to
create a local graph for further queries &amp; manipulation, but that
didn't seem to be the point of your question.<br>
<br>
-j<br>
<br>
<br>
<pre class="moz-signature" cols="72">Joe Andrieu
<a class="moz-txt-link-abbreviated" href="mailto:joe@switchbook.com">joe@switchbook.com</a>
+1 (805) 705-8651
<a class="moz-txt-link-freetext" href="http://www.switchbook.com">http://www.switchbook.com</a>
</pre>
<br>
On 7/29/2010 1:17 AM, Martin Guetlein wrote:
<blockquote
 cite="mid:AANLkTi=N-0pwOa4Psvx-HhMG8gb5ZKETxh--C13LJQWy@mail.gmail.com"
 type="cite">
  <pre wrap="">Hello All,

I am using the librdf via ruby bindings, to create and parse rdf
resources, which works quite well.
I now want to access a web service that accepts sparql queries and
gives me results in sparql xml result format.
How can I create sqarql queries? How to work with the results?

I came across the librasqal api, but I dont know if there ruby
bindings for it? I further found there is a ruby class for
librdf_query, but this seems to be for executing query over existing
models?

Many thanks in advance, best regards,
Martin
_______________________________________________
redland-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:redland-dev@lists.librdf.org">redland-dev@lists.librdf.org</a>
<a class="moz-txt-link-freetext" href="http://lists.librdf.org/mailman/listinfo/redland-dev">http://lists.librdf.org/mailman/listinfo/redland-dev</a>
  </pre>
</blockquote>
</body>
</html>