Re: R2RML implementation in XSPARQL

Hi David, 

yes, the program in the link I sent [1] is written in the XSPARQL language (very similar to XQuery though).  The input of the program is an R2RML mapping (plus the RDB connection parameters) and the output will be an RDF graph with the result of the mapping.  The program available at [1] is also incorporated in the jar file and you can run it this way:

java -jar xsparql-rdb-0.3-SNAPSHOT.jar [connection details] -r2rml "mapping_file"

A bit more info on the language itself:
For those familiar with XQuery, we extended it by adding two new "for" clauses (for accessing RDF and RDB) that allow to execute a SPARQL (resp, SQL) query, iterate over the results and make the values of variables available to subsequent expressions. Let me show a simple example, the XSPARQL query: 

for id as $id from Student
return $id

is translated into the SQL query:

Select id from Student

The "for" loop iterates over each SQL result (in this case) and the value of the attribute "id" from each result row is assigned to the variable $id.  

DISCLAIMER: This is a prototype for research purposes (both the XSPARQL and the R2RML implementation) and I have not done any tests to determine if how it scales.  There are still improvements that can be done to the algorithm but so far I am more concerned with implementing the full language.

hope I have not confused people further :)
best regards,
Nuno Lopes


On 20 Jul 2011, at 18:22, David McNeil wrote:

> On Wed, Jul 20, 2011 at 12:12 PM, Nuno Lopes <> wrote:
>> Using XSPARQL I have implemented the R2RML mapping language
> Nuno - I am trying to understand exactly what this means. Can you elaborate
> on this? The program is implemented in XSPARQL? What is the input and output
> of the program.
> Thanks.
> -David

Received on Wednesday, 20 July 2011 17:50:34 UTC