Used SPARQL validation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Used SPARQL validation

Jiří Tomeš
Hello,
I used openRDF version 2.7.0-beta1

I would ask you by what standard are validated SPARQL queries - is it SPARQL 1.1, or something else

I note, that validation of SPARQL queries is callled in methods like prepareTupleQuery, preperareGraphQuery, etc....

For example SPARQL query:
SELECT count(*) WHERE { ?s ?p ?o }

Don´t passed, but it should - its correct.

I tried to use SPARQL validator on page:
http://sparql.org/query-validator.html

If I used SPARQL syntax - query don´t  passed
If I used SPARQL extended syntax - query passed

1) Where is the different between SPARQL/SPARQL extended ? 
2) And what of this is supported in openRDF ? 
3) Is here some way how to set SPARQL extended syntax direct in code ? 
4) Is it subset/superset of SPARQL 1.1 ?

Thank you for your answer.

Mr. Tomes

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Sesame-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sesame-general
Reply | Threaded
Open this post in threaded view
|

Re: Used SPARQL validation

Jeen Broekstra
On 4/11/13 1:35 am, Jiří Tomeš wrote:
> Hello,
> I used *openRDF version 2.7.0-beta1*.

...which is a bit behind the times, you might want to upgrade to a
non-beta release, like 2.7.7.

> I would ask you by*what standard are validated SPARQL queries* - is it
> *SPARQL 1.1*, *or something else *?

Sesame 2.7.7 (current stable release) implements SPARQL 1.1, current W3C
Recommendation. Sesame does not implement any syntactical extensions to
the standard (with one minor exception, which is the FROM DEFAULT clause).

> I note, that validation of SPARQL queries is callled in methods like
> *prepareTupleQuery*, *preperareGraphQuery*, etc....
 >
> For example SPARQL query:
> *SELECT count(*) WHERE { ?s ?p ?o }*
>
> Don´t passed, but it should - its correct.

Actually, it's not correct.

  SELECT (count(*) as ?c) WHERE {?s ?p ?o }

would be correct. But you can't have an aggregate in the SELECT clause
without assigning it an alias.

> I tried to use SPARQL validator on page:
> http://sparql.org/query-validator.html
>
> If I used *SPARQL syntax* -* query don´t  passed*,
> If I used *SPARQL extended syntax *- *query passed*.
>
> *1) Where is the different between SPARQL/SPARQL extended ? *
> *2) And what of this is supported in openRDF ? *
> *3) Is here some way how to set SPARQL extended syntax direct in code ? *
> *4) **Is it subset/superset of SPARQL 1.1 ?*

I don't know what sparql.org's validator means with "SPARQL extended
syntax", but if it's not part of the standard it's probably not
supported by Sesame.

However, you can still use Sesame to do non-standard (extended) SPARQL
queries on remote endpoints: when querying remote endpoints it's the
actual endpoint parsing/validating the query, Seame only sends the
request and processes the result.

Jeen


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Sesame-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sesame-general