When querying a negative xsd:double
literal value via SPARQL an error occurs.
-
initial data (
data.nt
):<https://example.org/double> <https://example.org/value> "-0.03129"^^<http://www.w3.org/2001/XMLSchema#double> .
-
querying via CLI produces an error:
$ stardog query db "CONSTRUCT {?s ?p ?o} WHERE {?s ?p ?o}" Object for statement missing [line 1]
-
querying via Query Panel (
http://localhost:5820/db#!/query
+CONSTRUCT {?s ?p ?o} WHERE {?s ?p ?o}
) and export as Turtle results in corrupt data:@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . <https://example.org/double> <https://example.org/value> ..03129E-1 .
-
querying via Query Panel (
http://localhost:5820/db#!/query
+CONSTRUCT {?s ?p ?o} WHERE {?s ?p ?o}
) and export as TriG results in corrupt data:@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . { <https://example.org/double> <https://example.org/value> ..03129E-1 . }
Steps to reproduce
-
start Stardog
$ stardog-admin server start
-
create database
$ stardog-admin db create -n db data.nt
Other export methods
Other export methods work as expected:
-
export using SPARQL Graph Store Protocol:
$ curl "http://localhost:5820/db?default" -H "Accept: text/turtle" -u admin:admin @prefix : <http://api.stardog.com/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix stardog: <tag:stardog:api:> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <https://example.org/double> <https://example.org/value> -3.129E-2 .
-
export using CLI (Turtle):
$ stardog data export --format TURTLE db export.ttl; cat export.ttl Exported data as Turtle to file 'export.ttl' in 39.92 ms. @prefix : <http://api.stardog.com/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix stardog: <tag:stardog:api:> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <https://example.org/double> <https://example.org/value> -3.129E-2 .
-
export using CLI (TriG):
$ stardog data export --format TRIG db export.trig; cat export.trig Exported data as TriG to file 'export.trig' in 39.05 ms. @prefix : <http://api.stardog.com/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix stardog: <tag:stardog:api:> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . { <https://example.org/double> <https://example.org/value> -3.129E-2 . }
Additional information
Stardog version: 5.0-RC1