Data
file:///Users/swh/Projects/4store/tests/dawg/data/algebra/data-1.ttl
Query
PREFIX : <http://example/>
SELECT ?v
{ :x :p ?v . FILTER(?v = 1) }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/algebra/data-2.ttl
Query
PREFIX : <http://example/>
SELECT ?v
{
?s :p ?v .
FILTER (?v = 2)
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/algebra/data-2.ttl
Query
PREFIX : <http://example/>
SELECT ?v
{
FILTER (?v = 2)
?s :p ?v .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/algebra/data-2.ttl
Query
PREFIX : <http://example/>
SELECT ?v ?w
{
FILTER (?v = 2)
FILTER (?w = 3)
?s :p ?v .
?s :q ?w .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/algebra/join-combo-graph-2.ttl
Query
PREFIX : <http://example/>
SELECT ?a ?y ?d ?z
{
?a :p ?c OPTIONAL { ?a :r ?d }.
?a ?p 1 { ?p a ?y } UNION { ?a ?z ?p }
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/algebra/two-nested-opt.ttl
Query
PREFIX : <http://example/>
## The nested optional example, rewritten to a form that is the same
## for the SPARQL algebra and the declarative semantics.
SELECT *
{
:x1 :p ?v .
OPTIONAL { :x3 :q ?w }
OPTIONAL { :x3 :q ?w . :x2 :p ?v }
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/ask/data.ttl
Query
PREFIX : <http://example/>
ASK { :x :p 1 }
Results
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean
.
Data
file:///Users/swh/Projects/4store/tests/dawg/data/ask/data.ttl
Query
PREFIX : <http://example/>
ASK { :x :p 99 }
Results
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean
.
Data
file:///Users/swh/Projects/4store/tests/dawg/data/ask/data.ttl
Query
PREFIX : <http://example/>
ASK { :x :p ?x }
Results
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean
.
Data
file:///Users/swh/Projects/4store/tests/dawg/data/ask/data.ttl
Query
PREFIX : <http://example/>
ASK { :x :p ?x . FILTER(?x = 99) }
Results
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean
.
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-1.ttl
Query
BASE <http://example.org/x/>
PREFIX : <>
SELECT * WHERE { :x ?p ?v }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-1.ttl
Query
BASE <http://example.org/x/>
PREFIX : <#>
SELECT * WHERE { :x ?p ?v }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-1.ttl
Query
PREFIX ns: <http://example.org/ns#>
PREFIX x: <http://example.org/x/>
SELECT * WHERE { x:x ns:p ?v }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-1.ttl
Query
BASE <http://example.org/x/>
SELECT * WHERE { <x> <p> ?v }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-1.ttl
Query
BASE <http://example.org/x/>
SELECT * WHERE { <#x> <#p> ?v }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-7.ttl
Query
PREFIX : <http://example.org/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?x
WHERE {
?x foaf:name "John Smith" ;
a foaf:Womble .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-2.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?p
{ :x ?p () . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-2.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?p
{ :x ?p (1) . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-2.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?p ?v
{ :x ?p (?v) . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-2.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?p ?v ?w
{ :x ?p (?v ?w) . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-6.ttl
Query
PREFIX ex: <http://example.org/ns#x>
SELECT ?p {
ex: ?p 1 .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-3.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?x
{ ?x ?p '''x''' }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-3.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?x
{ ?x ?p """x""" }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-3.ttl
Query
# This query uses UNIX line end conventions.
# It is in CVS in binary.
PREFIX : <http://example.org/ns#>
SELECT ?x
{ ?x ?p '''x
y'''
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-3.ttl
Query
# This query uses UNIX line end conventions.
# It is in CVS in binary.
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x
{ ?x ?p """x
y"""^^:someType
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-6.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?s WHERE {
?s :p1 1, 2 .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-4.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT * { :x ?p true . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-4.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT * { :x ?p false }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-4.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT * { :x a ?C . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-4.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT * { :x ?p 123.0 }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-4.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT * { :x ?p 123.0. }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-4.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
# DOT is part of the decimal.
SELECT * { :x ?p 456. }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-4.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
# DOT is part of the decimal.
SELECT * { :x ?p 456. . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-4.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
# DOT is part of the decimal.
SELECT * { :x ?p +5 }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-4.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
# DOT is part of the decimal.
SELECT * { :x ?p -18 }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-5.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT * { :x ?p $v }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-5.ttl
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT * { :x ?p $v . :x ?p ?v }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/bnode-coreference/data.ttl
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?x ?y
WHERE {
?x foaf:knows ?y .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/boolean-effective-value/data-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/ns#>
SELECT ?a
WHERE
{ ?a :p ?v .
FILTER (?v) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/boolean-effective-value/data-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/ns#>
SELECT ?a
WHERE
{ ?a :p ?v .
FILTER ( ! ?v ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/boolean-effective-value/data-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/ns#>
SELECT ?a
WHERE
{ ?a :p ?v .
FILTER ("true"^^xsd:boolean && ?v) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/boolean-effective-value/data-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/ns#>
SELECT ?a
WHERE
{ ?a :p ?v .
FILTER ("false"^^xsd:boolean || ?v) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/boolean-effective-value/data-2.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/ns#>
SELECT ?a
WHERE
{ ?a :p ?v .
OPTIONAL
{ ?a :q ?w } .
FILTER (?w) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/boolean-effective-value/data-2.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/ns#>
SELECT ?a ?w
WHERE
{ ?a :p ?v .
OPTIONAL
{ ?a :q ?w } .
FILTER ( ! ?w ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/boolean-effective-value/data-1.ttl
Query
prefix : <http://example.org/ns#>
select ?x where {
?x :p "foo" .
FILTER (true) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/bound/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?a ?c
WHERE
{ ?a :b ?c .
OPTIONAL
{ ?c :d ?e } .
FILTER (! bound(?e))
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/cast/data.ttl
Query
PREFIX : <http://example.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?s WHERE {
?s :p ?v .
FILTER(datatype(xsd:boolean(?v)) = xsd:boolean) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/cast/data.ttl
Query
PREFIX : <http://example.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?s WHERE {
?s :p ?v .
FILTER(datatype(xsd:dateTime(?v)) = xsd:dateTime) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/cast/data.ttl
Query
PREFIX : <http://example.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?s WHERE {
?s :p ?v .
FILTER(datatype(xsd:double(?v)) = xsd:double) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/cast/data.ttl
Query
PREFIX : <http://example.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?s WHERE {
?s :p ?v .
FILTER(datatype(xsd:decimal(?v)) = xsd:decimal) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/cast/data.ttl
Query
PREFIX : <http://example.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?s WHERE {
?s :p ?v .
FILTER(datatype(xsd:float(?v)) = xsd:float) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/cast/data.ttl
Query
PREFIX : <http://example.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?s WHERE {
?s :p ?v .
FILTER(datatype(xsd:integer(?v)) = xsd:integer) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/cast/data.ttl
Query
PREFIX : <http://example.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?s WHERE {
?s :p ?v .
FILTER(datatype(xsd:string(?v)) = xsd:string) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/construct/data-ident.ttl
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CONSTRUCT { ?s ?p ?o . }
WHERE {
?s ?p ?o .
}
Results
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
_:gff
rdf:type foaf:Person ;
foaf:name "Alice" ;
foaf:mbox <mailto:alice@work> ;
foaf:knows _:g2a ;
.
_:g2a
rdf:type foaf:Person ;
foaf:name "Bob" ;
foaf:knows _:gff ;
foaf:mbox <mailto:bob@work> ;
foaf:mbox <mailto:bob@home> ;
.
Data
file:///Users/swh/Projects/4store/tests/dawg/data/construct/data-ident.ttl
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CONSTRUCT { ?s foaf:name ?o . }
WHERE {
?s foaf:name ?o .
}
Results
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
_:gff foaf:name "Alice" .
_:g2a foaf:name "Bob" .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/construct/data-reif.ttl
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CONSTRUCT { [ rdf:subject ?s ;
rdf:predicate ?p ;
rdf:object ?o ] . }
WHERE {
?s ?p ?o .
}
Results
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
[] rdf:subject _:gff ;
rdf:predicate rdf:type ;
rdf:object foaf:Person .
[] rdf:subject _:gff ;
rdf:predicate foaf:name ;
rdf:object "Alice" .
[] rdf:subject _:gff ;
rdf:predicate foaf:mbox ;
rdf:object <mailto:alice@work> .
[] rdf:subject _:gff ;
rdf:predicate foaf:knows ;
rdf:object _:g2a .
[] rdf:subject _:g2a ;
rdf:predicate rdf:type ;
rdf:object foaf:Person .
[] rdf:subject _:g2a ;
rdf:predicate foaf:name ;
rdf:object "Bob" .
[] rdf:subject _:g2a ;
rdf:predicate foaf:knows ;
rdf:object _:gff .
[] rdf:subject _:g2a ;
rdf:predicate foaf:mbox ;
rdf:object <mailto:bob@home> .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/construct/data-reif.ttl
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CONSTRUCT { _:a rdf:subject ?s ;
rdf:predicate ?p ;
rdf:object ?o . }
WHERE {
?s ?p ?o .
}
Results
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
[] rdf:subject _:gff ;
rdf:predicate rdf:type ;
rdf:object foaf:Person .
[] rdf:subject _:gff ;
rdf:predicate foaf:name ;
rdf:object "Alice" .
[] rdf:subject _:gff ;
rdf:predicate foaf:mbox ;
rdf:object <mailto:alice@work> .
[] rdf:subject _:gff ;
rdf:predicate foaf:knows ;
rdf:object _:g2a .
[] rdf:subject _:g2a ;
rdf:predicate rdf:type ;
rdf:object foaf:Person .
[] rdf:subject _:g2a ;
rdf:predicate foaf:name ;
rdf:object "Bob" .
[] rdf:subject _:g2a ;
rdf:predicate foaf:knows ;
rdf:object _:gff .
[] rdf:subject _:g2a ;
rdf:predicate foaf:mbox ;
rdf:object <mailto:bob@home> .
Data
Query
PREFIX : <http://example/>
SELECT *
FROM NAMED <data-g1.ttl>
{ ?s ?p ?o }
Results
Data
Query
PREFIX : <http://example/>
SELECT *
FROM <data-g1.ttl>
{
GRAPH ?g { ?s ?p ?o }
}
Results
Data
Query
PREFIX : <http://example/>
SELECT *
FROM <data-g3-dup.ttl>
FROM NAMED <data-g3.ttl>{
?s ?p ?o
GRAPH ?g { ?s ?q ?v }
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-num.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?v
{
?x ?p ?v .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-str.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?v
{
?x ?p ?v .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-node.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?v
{
?x ?p ?v .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-opt.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?v
{
:x1 ?p ?o
OPTIONAL { ?o :q ?v }
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-all.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?v
{
?x ?p ?v .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-star.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT *
WHERE {
{ ?s :p ?o } UNION { ?s :q ?o }
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-num.ttl
Query
SELECT ?v
{
?x ?p ?v .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-str.ttl
Query
SELECT ?v
{
?x ?p ?v .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-node.ttl
Query
SELECT ?v
{
?x ?p ?v .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-opt.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?v
{
:x1 ?p ?o
OPTIONAL { ?o :q ?v }
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-all.ttl
Query
SELECT ?v
{
?x ?p ?v .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x ?v
WHERE
{ ?x :p ?v .
FILTER ( datatype(?v) = xsd:double ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-2.ttl
Query
# Which literals have a datatype and which are errors.
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x
{ ?x :p ?v .
FILTER( datatype(?v) != <http://example/NotADataTypeIRI> )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-2.ttl
Query
# Whichliterals have xsd:string as a datatype
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x
{ ?x :p ?v .
FILTER( datatype(?v) = xsd:string )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x ?v
WHERE
{ ?x :p ?v .
FILTER isBlank(?v) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x ?v
WHERE
{ ?x :p ?v .
FILTER isIRI(?v) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-2.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example/>
SELECT ?x
WHERE
{ ?x :p ?v .
FILTER isLiteral(?v) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x ?v
WHERE
{ ?x :p ?v .
FILTER isURI(?v) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-2.ttl
Query
# Test which things have a lang tag of some form.
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x
{ ?x :p ?v .
FILTER ( lang(?v) != '@NotALangTag@' )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-2.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x
{ ?x :p ?v .
FILTER ( lang(?v) = '' )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-2.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x
{ ?x :p "string"@EN
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-langMatches.ttl
Query
PREFIX : <http://example.org/#>
SELECT *
{ :x ?p ?v . FILTER langMatches(lang(?v), "en-GB") . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-langMatches.ttl
Query
PREFIX : <http://example.org/#>
SELECT *
{ :x ?p ?v . FILTER langMatches(lang(?v), "en") . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-langMatches.ttl
Query
PREFIX : <http://example.org/#>
SELECT *
{ :x ?p ?v . FILTER langMatches(lang(?v), "*") . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-langMatches.ttl
Query
PREFIX : <http://example.org/#>
SELECT *
{ :x ?p ?v . FILTER (! langMatches(lang(?v), "*")) . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-langMatches-de.ttl
Query
# q-langMatches-de-de.rq
# $Id: q-langMatches-de-de.rq,v 1.1 2007/08/11 18:32:04 eric Exp $
PREFIX : <http://example.org/#>
SELECT *
{ :x ?p ?v . FILTER langMatches(lang(?v), "de-de") . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x ?v
WHERE
{ ?x :p ?v .
FILTER ( str(?v) = "1" ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x ?v
WHERE
{ ?x :p ?v .
FILTER ( str(?v) = "01" ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x ?v
WHERE
{ ?x :p ?v .
FILTER ( str(?v) = "zzz" ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x ?v
WHERE
{ ?x :p ?v .
FILTER ( str(?v) = "" ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/lang-case-sensitivity.ttl
Query
# Test: 'xyz'@en = 'xyz'@EN
# $Id: lang-case-sensitivity-eq.rq,v 1.1 2007/06/24 23:15:38 lfeigenb Exp $
PREFIX : <http://example/>
SELECT *
{
?x1 :p ?v1 .
?x2 :p ?v2 .
FILTER ( ?v1 = ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/lang-case-sensitivity.ttl
Query
# Test: 'xyz'@en != 'xyz'@EN
# $Id: lang-case-sensitivity-ne.rq,v 1.1 2007/06/24 23:15:38 lfeigenb Exp $
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
{
?x1 :p ?v1 .
?x2 :p ?v2 .
FILTER ( ?v1 != ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
# Test: sameTerm and eq
# $Id: sameTerm-eq.rq,v 1.1 2007/08/31 14:01:57 eric Exp $
PREFIX : <http://example.org/things#>
SELECT *
{
?x1 :p ?v1 .
?x2 :p ?v2 .
FILTER ( sameTerm(?v1, ?v2) && ?v1 = ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
# Test: !sameTerm and eq
# $Id: sameTerm-not-eq.rq,v 1.1 2007/08/31 14:01:57 eric Exp $
PREFIX : <http://example.org/things#>
SELECT *
{
?x1 :p ?v1 .
?x2 :p ?v2 .
FILTER ( !sameTerm(?v1, ?v2) && ?v1 = ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-builtin/data-builtin-1.ttl
Query
# Test: sameTerm
# $Id: sameTerm.rq,v 1.1 2007/08/31 14:01:57 eric Exp $
PREFIX : <http://example.org/things#>
SELECT *
{
?x1 :p ?v1 .
?x2 :p ?v2 .
FILTER sameTerm(?v1, ?v2)
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x
WHERE
{ ?x :p ?v .
FILTER ( ?v = 1 ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?v1 ?v2
WHERE
{ ?x1 :p ?v1 .
?x2 :p ?v2 .
FILTER ( ?v1 = ?v2 ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?v1 ?v2
WHERE
{ ?x1 :p ?v1 .
?x2 :p ?v2 .
FILTER ( ?v1 = ?v2 ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x
WHERE
{ ?x :p ?v .
FILTER ( ?v = 1.0e0 ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x
WHERE
{ ?x :p ?v .
FILTER ( ?v = "1" ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x
WHERE
{ ?x :p ?v .
FILTER ( ?v = "zzz" ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x
WHERE
{ ?x :p ?v .
FILTER ( ?v = :z ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x
WHERE
{ ?x :p 1 .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x
WHERE
{ ?x :p "1"
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x
WHERE
{ ?x :p "zzz" .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-equals/data-eq.ttl
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.org/things#>
SELECT ?x
WHERE
{ ?x :p ?v .
FILTER ( ?v = :z ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-ops/data.ttl
Query
PREFIX : <http://example.org/>
SELECT ?s WHERE {
?s :p ?o .
FILTER(?o >= 3) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-ops/data.ttl
Query
PREFIX : <http://example.org/>
SELECT ?s WHERE {
?s :p ?o .
FILTER(?o <= 2) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-ops/data.ttl
Query
PREFIX : <http://example.org/>
SELECT ?s WHERE {
?s :p ?o .
?s2 :p ?o2 .
FILTER(?o - ?o2 = 3) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-ops/data.ttl
Query
PREFIX : <http://example.org/>
SELECT ?s WHERE {
?s :p ?o .
?s2 :p ?o2 .
FILTER(?o * ?o2 = 4) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-ops/data.ttl
Query
PREFIX : <http://example.org/>
SELECT ?s WHERE {
?s :p ?o .
?s2 :p ?o2 .
FILTER(?o + ?o2 = 3) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-ops/data.ttl
Query
PREFIX : <http://example.org/>
SELECT ?s WHERE {
?s :p ?o .
FILTER(-?o = -2) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/expr-ops/data.ttl
Query
PREFIX : <http://example.org/>
SELECT ?s WHERE {
?s :p ?o .
FILTER(?o = +3) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/graph/data-g1.ttl
Query
PREFIX : <http://example/>
SELECT * { ?s ?p ?o }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/graph/data-g1.ttl
Query
PREFIX : <http://example/>
SELECT * {
GRAPH ?g { ?s ?p ?o }
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/i18n/kanji.ttl
Query
# $Id: kanji-01.rq,v 1.3 2005/11/06 08:27:50 eric Exp $
# test kanji QNames
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX 食: <http://www.w3.org/2001/sw/DataAccess/tests/data/i18n/kanji.ttl#>
SELECT ?name ?food WHERE {
[ foaf:name ?name ;
食:食べる ?food ] . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/i18n/kanji.ttl
Query
# $Id: kanji-02.rq,v 1.4 2005/11/06 08:27:50 eric Exp $
# test wide spaces
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX 食: <http://www.w3.org/2001/sw/DataAccess/tests/data/i18n/kanji.ttl#>
SELECT ?name WHERE {
[ foaf:name ?name ;
食:食べる 食:海老 ] . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/i18n/normalization-01.ttl
Query
# Figure out what happens with normalization form C.
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX HR: <http://www.w3.org/2001/sw/DataAccess/tests/data/i18n/normalization.ttl#>
SELECT ?name
WHERE { [ foaf:name ?name;
HR:resumé ?resume ] . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/i18n/normalization-02.ttl
Query
# Example 1 from
# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096
# $Id: normalization-02.rq,v 1.1 2005/08/09 14:35:26 eric Exp $
PREFIX : <http://example/vocab#>
PREFIX p1: <eXAMPLE://a/./b/../b/%63/%7bfoo%7d#>
SELECT ?S WHERE { ?S :p p1:xyz }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/i18n/normalization-03.ttl
Query
# Example 2 from
# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096
# $Id: normalization-03.rq,v 1.1 2005/08/09 14:35:26 eric Exp $
PREFIX : <http://example/vocab#>
PREFIX p2: <http://example.com:80/#>
SELECT ?S WHERE { ?S :p p2:abc }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-3.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x ?date
{
?x :s ?date .
FILTER ( datatype(?date) = xsd:date )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-4.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x ?v1 ?v2
{
?x :p [ :v1 ?v1 ; :v2 ?v2 ] .
FILTER ( ?v1 < ?v2 || ?v1 > ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-4.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?x ?v1 ?v2
{
?x :p [ :v1 ?v1 ; :v2 ?v2 ] .
FILTER ( ?v1 < ?v2 || ?v1 = ?v2 || ?v1 > ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-1.ttl
Query
# SPARQL is defined over simple entailment so
# only syntactic matches show.
# (Some systems may match because they do
# value-based matching in the graph (D-entailment))
# Does not strictly match "1"^xsd:integer
PREFIX : <http://example/ns#>
PREFIX t: <http://example/t#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
{ ?x :p "001"^^xsd:integer }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-1.ttl
Query
# Test matching in a graph pattern
# Unknown type
PREFIX : <http://example/ns#>
PREFIX t: <http://example/t#>
SELECT *
{ ?x :p "a"^^t:type1 }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-1.ttl
Query
# SPARQL FILTER test by value.
# A processor knows about XSD integer
# so 1 and 01 pass the filter
PREFIX : <http://example/ns#>
PREFIX t: <http://example/t#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
{ ?x :p ?v
FILTER ( ?v = 1 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-1.ttl
Query
# SPARQL FILTER test by value.
# A processor knows about XSD integer
# so 1 and 01 are excluded by the filter
PREFIX : <http://example/ns#>
PREFIX t: <http://example/t#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
{ ?x :p ?v
FILTER ( ?v != 1 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-1.ttl
Query
# SPARQL FILTER test by value.
# Only one valus is known to be "a"^^t:type1
# (others maybe but the processor does not positively know this)
PREFIX : <http://example/ns#>
PREFIX t: <http://example/t#>
SELECT *
{ ?x :p ?v
FILTER ( ?v = "a"^^t:type1 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-1.ttl
Query
# SPARQL FILTER test by value for known types.
# Nothing is known to be not the same value as "a"^^t:type1
# "b"^^t:type1 might be a different lexical form for the same value
# "a"^^t:type2 might have overlapping value spaces for this lexicial form.
PREFIX : <http://example/ns#>
PREFIX t: <http://example/t#>
SELECT *
{ ?x :p ?v
FILTER ( ?v != "a"^^t:type1 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-2.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
{
?x1 :p ?v1 .
?x2 :p ?v2 .
FILTER ( ?v1 = ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-2.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
{
?x1 :p ?v1 .
?x2 :p ?v2 .
FILTER ( ?v1 != ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-2.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
{
?x :p ?v1 .
?y :q ?v2 .
FILTER ( ?v1 = ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-2.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
{
?x :p ?v1 .
?y :q ?v2 .
FILTER ( ?v1 != ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/open-world/data-2.ttl
Query
PREFIX : <http://example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
{
?x :p ?v1 .
?y :q ?v2 .
FILTER ( ?v1 != ?v2 || ?v1 = ?v2 )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional-filter/data-1.ttl
Query
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX x: <http://example.org/ns#>
SELECT ?title ?price
WHERE
{ ?book dc:title ?title .
OPTIONAL
{ ?book x:price ?price .
FILTER (?price < 15) .
} .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional-filter/data-1.ttl
Query
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX x: <http://example.org/ns#>
SELECT ?title ?price
WHERE
{ ?book dc:title ?title .
OPTIONAL
{ ?book x:price ?price } .
FILTER (?price < 15) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional-filter/data-1.ttl
Query
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX x: <http://example.org/ns#>
SELECT ?title ?price
WHERE
{ ?book dc:title ?title .
OPTIONAL
{ ?book x:price ?price } .
FILTER ( ( ! bound(?price) ) || ( ?price < 15 ) ) .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional-filter/data-1.ttl
Query
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX x: <http://example.org/ns#>
SELECT ?title ?price
WHERE
{ ?book dc:title ?title .
OPTIONAL
{ ?book x:price ?price .
FILTER (?price < 15 && ?title = "TITLE 2") .
} .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional/data.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?mbox ?name
{
?x foaf:mbox ?mbox .
OPTIONAL { ?x foaf:name ?name } .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional/data.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?mbox ?name ?nick
{
?x foaf:mbox ?mbox .
OPTIONAL { ?x foaf:name ?name } .
OPTIONAL { ?x foaf:nick ?nick } .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional/complex-data-1.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?person ?nick ?page ?img ?name ?firstN
{
?person foaf:nick ?nick
OPTIONAL { ?person foaf:isPrimaryTopicOf ?page }
OPTIONAL {
?person foaf:name ?name
{ ?person foaf:depiction ?img } UNION
{ ?person foaf:firstName ?firstN }
} FILTER ( bound(?page) || bound(?img) || bound(?firstN) )
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional/complex-data-1.ttl
file:///Users/swh/Projects/4store/tests/dawg/data/optional/complex-data-2.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/things#>
SELECT ?id ?ssn
WHERE
{
?person
a foaf:Person;
foaf:name ?name .
GRAPH ?x {
[] foaf:name ?name;
foaf:nick ?nick
}
OPTIONAL {
{ ?person ex:empId ?id } UNION { ?person ex:ssn ?ssn }
}
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional/complex-data-1.ttl
file:///Users/swh/Projects/4store/tests/dawg/data/optional/complex-data-2.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/things#>
SELECT ?name ?nick ?plan ?dept
WHERE
{
?person
a foaf:Person;
foaf:name ?name .
GRAPH ?x {
[] foaf:name ?name;
foaf:nick ?nick
}
OPTIONAL {
?person ex:healthplan ?plan
OPTIONAL { ?person ex:department ?dept }
}
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/optional/data.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?mbox ?name
{
{ ?x foaf:mbox ?mbox }
UNION
{ ?x foaf:mbox ?mbox . ?x foaf:name ?name }
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/regex/regex-data-01.ttl
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ex: <http://example.com/#>
SELECT ?val
WHERE {
ex:foo rdf:value ?val .
FILTER regex(?val, "GHI")
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/regex/regex-data-01.ttl
Query
PREFIX ex: <http://example.com/#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?val
WHERE {
ex:foo rdf:value ?val .
FILTER regex(?val, "DeFghI", "i")
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/regex/regex-data-01.ttl
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ex: <http://example.com/#>
SELECT ?val
WHERE {
ex:foo rdf:value ?val .
FILTER regex(?val, "example\\.com")
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/regex/regex-data-01.ttl
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ex: <http://example.com/#>
SELECT ?val
WHERE {
ex:foo rdf:value ?val .
FILTER regex(str(?val), "example\\.com")
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] :num ?v }
ORDER BY ?v
LIMIT 1
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] :num ?v }
ORDER BY ?v
LIMIT 100
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] :num ?v }
ORDER BY ?v
LIMIT 0
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT DISTINCT ?v
WHERE { [] :num ?v }
ORDER BY ?v
LIMIT 100
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] :num ?v }
ORDER BY ?v
OFFSET 1
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] :num ?v }
ORDER BY ?v
OFFSET 0
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] :num ?v }
ORDER BY ?v
OFFSET 100
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT DISTINCT ?v
WHERE { [] :num ?v }
ORDER BY ?v
OFFSET 2
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] :num ?v }
ORDER BY ?v
LIMIT 1
OFFSET 1
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] :num ?v }
ORDER BY ?v
limit 2 offset 1
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] ?p ?v }
ORDER BY ?v
limit 1 offset 100
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT ?v
WHERE { [] :num ?v }
ORDER BY ?v
limit 5 offset 2
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/solution-seq/data.ttl
Query
PREFIX : <http://example.org/ns#>
SELECT DISTINCT ?v
WHERE { [] :num ?v }
ORDER BY ?v
limit 5 offset 2
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-9.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE { ?x foaf:name ?name }
ORDER BY DESC(?name)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-1.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE { ?x foaf:name ?name }
ORDER BY ?name
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-1.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE { ?x foaf:name ?name }
ORDER BY DESC(?name)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-3.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?mbox
WHERE { ?x foaf:name ?name .
OPTIONAL { ?x foaf:mbox ?mbox }
}
ORDER BY ASC(?mbox)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-4.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/things#>
SELECT ?name ?emp
WHERE { ?x foaf:name ?name ;
ex:empId ?emp
}
ORDER BY ASC(?emp)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-4.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/things#>
SELECT ?name ?emp
WHERE { ?x foaf:name ?name ;
ex:empId ?emp
}
ORDER BY ?name DESC(?emp)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-6.ttl
Query
PREFIX ex: <http://example.org/things#>
SELECT ?address
WHERE { ?x ex:address ?address }
ORDER BY ASC(?address)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-7.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/things#>
SELECT ?name ?emp
WHERE { ?x foaf:name ?name ;
ex:empId ?emp
}
ORDER BY ASC(?emp)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-8.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/things#>
SELECT ?name ?emp
WHERE { ?x foaf:name ?name ;
ex:empId ?emp
}
ORDER BY ASC(?emp)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-9.ttl
Query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE { ?x foaf:name ?name }
ORDER BY ?name
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-builtin.ttl
Query
PREFIX : <http://example.org/>
SELECT ?s WHERE {
?s :p ?o .
} ORDER BY str(?o)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-function.ttl
Query
PREFIX : <http://example.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?s WHERE {
?s :p ?o .
} ORDER BY xsd:integer(?o)
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/sort/data-sort-numbers.ttl
Query
PREFIX : <http://example.org/>
SELECT ?s WHERE {
?s :p ?o1 ; :q ?o2 .
} ORDER BY (?o1 + ?o2)
Results
Data
Query
SELECT *
WHERE { }
Data
Query
SELECT * {}
Data
Query
# No trailing dot
PREFIX : <http://example.org/ns#>
SELECT *
WHERE { ?x ?y ?z }
Data
Query
# With trailing dot
SELECT *
WHERE { ?x ?y ?z . }
Data
Query
# Two triples : no trailing dot
SELECT *
WHERE { ?x ?y ?z . ?a ?b ?c }
Data
Query
# Two triples : with trailing dot
SELECT *
WHERE { ?x ?y ?z . ?a ?b ?c . }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT * WHERE { [:p :q ] }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT * WHERE { [] :p :q }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT * WHERE { [ ?x ?y ] :p [ ?pa ?b ] }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
WHERE { [ :p :q ; ] }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
WHERE { _:a :p1 :q1 .
_:a :p2 :q2 .
}
Data
Query
SELECT *
WHERE { ?s ?p ?o . FILTER (?o) }
Data
Query
SELECT *
WHERE { ?s ?p ?o . FILTER REGEX(?o, "foo") }
Data
Query
SELECT *
WHERE { ?s ?p ?o . FILTER REGEX(?o, "foo", "i") }
Data
Query
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
WHERE { ?s ?p ?o . FILTER xsd:integer(?o) }
Data
Query
PREFIX : <http://example.org/ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
WHERE { ?s ?p ?o . FILTER :myFunc(?s,?o) }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT * WHERE { ( [ ?x ?y ] ) :p ( [ ?pa ?b ] 57 ) }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT * WHERE { ( [] [] ) }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY ?o
LIMIT 5
Data
Query
# LIMIT and OFFSET can be in either order
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY ?o
LIMIT 5
OFFSET 3
Data
Query
# LIMIT and OFFSET can be in either order
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY ?o
limit 5 offset 3
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY ?o
OFFSET 3
Data
Query
PREFIX : <http://example.org/ns#>
SELECT * WHERE { ( ?x ) :p ?z }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT * WHERE { ?x :p ( ?z ) }
Data
Query
SELECT * WHERE { ( ?z ) }
Data
Query
SELECT * WHERE { ( ( ?z ) ) }
Data
Query
SELECT * WHERE { ( ( ) ) }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p "x" }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p 'x' }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p "x\"y'z" }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p 'x"y\'z' }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p "x\"" }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p 'x\'' }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p 123 }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p 123. . }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p """Long
""
Literal
""" }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p '''Long
'' """
Literal''' }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p """Long""\"Literal""" }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p '''Long''\'Literal''' }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p """Long\"""Literal""" }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p '''Long\'''Literal''' }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p '''Long '' Literal''' }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p '''Long ' Literal''' }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p '''Long''\\Literal with '\\ single quotes ''' }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p """Long "" Literal""" }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p """Long " Literal""" }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT * WHERE { :x :p """Long""\\Literal with "\\ single quotes""" }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY ?o
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY (?o+5)
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY ASC(?o)
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY DESC(?o)
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY DESC(:func(?s, ?o))
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY
DESC(?o+57) :func2(?o) ASC(?s)
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?s ?p ?o }
ORDER BY str(?o)
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ }
Data
Query
# No DOT after optional
PREFIX : <http://example.org/ns#>
SELECT *
{ ?a :b :c OPTIONAL{:x :y :z} :x ?y ?z }
Data
Query
# No DOT between non-triples patterns
PREFIX : <http://example.org/ns#>
SELECT *
{ ?a :b :c
OPTIONAL{:x :y :z}
{ :x1 :y1 :z1 } UNION { :x2 :y2 :z2 }
}
Data
Query
# No DOT between non-triples patterns
PREFIX : <http://example.org/ns#>
SELECT *
{
OPTIONAL{:x :y :z}
?a :b :c
{ :x1 :y1 :z1 } UNION { :x2 :y2 :z2 }
}
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{ ?x :p ?z }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
WHERE { :x :p :z . }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
WHERE { :_1 :p.rdf :z.z . }
Data
Query
PREFIX : <http://example.org/ns#>
PREFIX a: <http://example.org/ns2#>
SELECT *
WHERE { : a: :a . : : : . }
Data
Query
PREFIX : <>
SELECT *
WHERE { : : : . }
Data
Query
PREFIX : <#>
SELECT *
WHERE { : : : . }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
SELECT *
WHERE { : : : . }
Data
Query
BASE <http://example.org/>
PREFIX : <#>
PREFIX x.y: <x#>
SELECT *
WHERE { :a.b x.y: : . }
Data
Query
# Operator
PREFIX : <http://example.org/ns#>
SELECT *
{ OPTIONAL { } }
Data
Query
# Operator
PREFIX : <http://example.org/ns#>
SELECT *
{ OPTIONAL { :a :b :c } }
Data
Query
# Triple, no DOT, operator
PREFIX : <http://example.org/ns#>
SELECT *
{ :p :q :r OPTIONAL { :a :b :c } }
Data
Query
# Triple, DOT, operator
PREFIX : <http://example.org/ns#>
SELECT *
{ :p :q :r . OPTIONAL { :a :b :c } }
Data
Query
# Triple, DOT, operator, DOT
PREFIX : <http://example.org/ns#>
SELECT *
{ :p :q :r . OPTIONAL { :a :b :c } . }
Data
Query
# Operator, no DOT
PREFIX : <http://example.org/ns#>
SELECT *
{ OPTIONAL { :a :b :c } }
Data
Query
# Operator, DOT
PREFIX : <http://example.org/ns#>
SELECT *
{ OPTIONAL { :a :b :c } . }
Data
Query
# Operator, triple
PREFIX : <http://example.org/ns#>
SELECT *
{ OPTIONAL { :a :b :c } ?x ?y ?z }
Data
Query
# Operator, DOT triple
PREFIX : <http://example.org/ns#>
SELECT *
{ OPTIONAL { :a :b :c } . ?x ?y ?z }
Data
Query
# Triple, semi, operator
PREFIX : <http://example.org/ns#>
SELECT *
{ :p :q :r ; OPTIONAL { :a :b :c } }
Data
Query
# Triple, semi, DOT, operator
PREFIX : <http://example.org/ns#>
SELECT *
{ :p :q :r ; . OPTIONAL { :a :b :c } }
Data
Query
# Two elements in the group
PREFIX : <http://example.org/ns#>
SELECT *
{ :p :q :r . OPTIONAL { :a :b :c }
:p :q :r . OPTIONAL { :a :b :c }
}
Data
Query
# Two elements in the group
PREFIX : <http://example.org/ns#>
SELECT *
{ :p :q :r OPTIONAL { :a :b :c }
:p :q :r OPTIONAL { :a :b :c }
}
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{
{ ?s ?p ?o } UNION { ?a ?b ?c }
}
Data
Query
PREFIX : <http://example.org/ns#>
SELECT *
{
{ ?s ?p ?o } UNION { ?a ?b ?c } UNION { ?r ?s ?t }
}
Data
Query
PREFIX : <http://example.org/>
SELECT * WHERE { [] :p [] }
Data
Query
PREFIX : <http://example.org/>
# Tab
SELECT * WHERE { [ ] :p [
] }
Data
Query
PREFIX : <http://example.org/>
SELECT * WHERE { [ :p :q
] }
Data
Query
PREFIX : <http://example.org/>
SELECT ?x
FROM <http://example.org/graph>
WHERE {}
Data
Query
PREFIX : <http://example.org/>
SELECT ?x
FROM NAMED <http://example.org/graph1>
WHERE {}
Data
Query
PREFIX : <http://example.org/>
SELECT ?x
FROM NAMED :graph1
FROM NAMED :graph2
WHERE {}
Data
Query
PREFIX : <http://example.org/>
SELECT ?x
FROM :g1
FROM :g2
FROM NAMED :graph1
FROM NAMED :graph2
WHERE {}
Data
Query
SELECT *
WHERE { <x> <p> "\t" }
Data
Query
SELECT *
WHERE { <x> <p> "x\t" }
Data
Query
SELECT *
WHERE { <x> <p> "\tx" }
Data
Query
PREFIX : <http://example/>
SELECT *
WHERE { <\u0078> :\u0070 ?xx\u0078 }
Data
Query
PREFIX : <http://example/>
SELECT *
# Comments can contain \ u
# <\u0078> :\u0070 ?xx\u0078
WHERE { <\u0078> :\u0070 ?xx\u0078 }
Data
Query
ASK {}
Data
Query
CONSTRUCT { ?s <p1> <o> . ?s <p2> ?o } WHERE {?s ?p ?o}
Data
Query
CONSTRUCT { ?s <p1> <o> . ?s <p2> ?o .} WHERE {?s ?p ?o}
Data
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
CONSTRUCT { [] rdf:subject ?s ;
rdf:predicate ?p ;
rdf:object ?o }
WHERE {?s ?p ?o}
Data
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
CONSTRUCT { [] rdf:subject ?s ;
rdf:predicate ?p ;
rdf:object ?o . }
WHERE {?s ?p ?o}
Data
Query
CONSTRUCT {} WHERE {}
Data
Query
DESCRIBE <u>
Data
Query
DESCRIBE <u> ?u WHERE { <x> <q> ?u . }
Data
Query
SELECT * WHERE { }
Data
Query
SELECT * { }
Data
Query
PREFIX q: <http://example.org/>
SELECT * WHERE { FILTER (q:name()) }
Data
Query
PREFIX q: <http://example.org/>
SELECT * WHERE { FILTER (q:name( )) }
Data
Query
PREFIX q: <http://example.org/>
SELECT * WHERE { FILTER (q:name(
)) }
Data
Query
PREFIX q: <http://example.org/>
SELECT * WHERE { FILTER (q:name(1
)) . FILTER (q:name(1,2)) . FILTER (q:name(1
,2))}
Data
Query
SELECT * WHERE { <a><b><c> }
Data
Query
SELECT * WHERE { <a><b>_:x }
Data
Query
SELECT * WHERE { <a><b>1 }
Data
Query
SELECT * WHERE { <a><b>+11 }
Data
Query
SELECT * WHERE { <a><b>-1 }
Data
Query
SELECT * WHERE { <a><b>1.0 }
Data
Query
SELECT * WHERE { <a><b>+1.0 }
Data
Query
SELECT * WHERE { <a><b>-1.0 }
Data
Query
SELECT * WHERE { <a><b>1.0e0 }
Data
Query
SELECT * WHERE { <a><b>+1.0e+1 }
Data
Query
SELECT * WHERE { <a><b>-1.0e-1 }
Data
Query
# Legal, if unusual, IRIs
SELECT * WHERE { <a> <b> <?z> }
Data
Query
# Legal, if unusual, IRIs
BASE <http://example/page.html>
SELECT * WHERE { <a> <b> <#x> }
Data
Query
# Legal, if unusual, IRIs
BASE <http://example/page.html?query>
SELECT * WHERE { <a> <b> <¶m=value> }
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
GRAPH ?g { }
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
GRAPH :a { }
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
GRAPH ?g { :x :b ?a }
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
:x :p :z
GRAPH ?g { :x :b ?a }
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
:x :p :z
GRAPH ?g { :x :b ?a . GRAPH ?g2 { :x :p ?x } }
}
Data
Query
# use keyword FILTER as a namespace prefix
PREFIX FILTER: <http://example.org/ns#>
SELECT *
WHERE { ?x FILTER:foo ?z FILTER (?z) }
Data
Query
# use keyword FILTER as a local name
PREFIX : <http://example.org/ns#>
SELECT *
WHERE { ?x :FILTER ?z FILTER (?z) }
Data
Query
# use keyword UNION as a namespace prefix
PREFIX UNION: <http://example.org/ns#>
SELECT *
WHERE { ?x UNION:foo ?z }
Data
Query
PREFIX : <http://example.org/>
SELECT * WHERE { () :p 1 }
Data
Query
PREFIX : <http://example.org/>
SELECT * WHERE { ( ) :p 1 }
Data
Query
PREFIX : <http://example.org/>
SELECT * WHERE { (
) :p 1 }
Data
Query
PREFIX : <http://example.org/>
SELECT * WHERE { ( 1 2
) :p 1 }
Data
Query
PREFIX : <http://example.org/>
SELECT * WHERE { ( 1 2
) }
Data
Query
# $Id: syn-blabel-cross-filter.rq,v 1.2 2007/04/09 21:40:22 eric Exp $
# BNode label used across a FILTER.
PREFIX : <http://xmlns.com/foaf/0.1/>
ASK { _:who :homepage ?homepage
FILTER REGEX(?homepage, "^http://example.org/")
_:who :schoolHomepage ?schoolPage }
Data
Query
# $Id: syn-blabel-cross-graph-bad.rq,v 1.2 2007/04/18 23:11:57 eric Exp $
# BNode label used across a GRAPH.
PREFIX : <http://xmlns.com/foaf/0.1/>
ASK { _:who :homepage ?homepage
GRAPH ?g { ?someone :made ?homepage }
_:who :schoolHomepage ?schoolPage }
Data
Query
# $Id: syn-blabel-cross-optional-bad.rq,v 1.5 2007/09/04 15:04:22 eric Exp $
# BNode label used across an OPTIONAL.
# This isn't necessarily a *syntax* test, but references to bnode labels
# may not span basic graph patterns.
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
ASK { _:who foaf:homepage ?homepage
OPTIONAL { ?someone foaf:made ?homepage }
_:who foaf:schoolHomepage ?schoolPage }
Data
Query
# $Id: syn-blabel-cross-union-bad.rq,v 1.4 2007/09/04 15:04:09 eric Exp $
# BNode label used across a UNION.
# This isn't necessarily a *syntax* test, but references to bnode labels
# may not span basic graph patterns.
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
ASK { _:who foaf:homepage ?homepage
{ ?someone foaf:made ?homepage }
UNION
{ ?homepage foaf:maker ?someone }
_:who foaf:schoolHomepage ?schoolPage }
Data
Query
# NegativeSyntax/bnode-dot.rq
SELECT * WHERE {[] . }
Data
Query
# NegativeSyntax/bnodes-missing-pvalues.rq
PREFIX : <http://example/ns#>
SELECT * WHERE { [,] :p [;] . }
Data
Query
# NegativeSyntax/bnodes-missing-pvalues-02.rq
SELECT * WHERE {() . [,] . [,;] }
Data
Query
# NegativeSyntax/empty-optional.rq
SELECT * { OPTIONAL FILTER (?x) }
Data
Query
# NegativeSyntax/empty-optional-02.rq
SELECT * { OPTIONAL GRAPH ?v OPTIONAL FILTER (?x) }
Data
Query
# NegativeSyntax/filter-missing-parens.rq
SELECT * { ?s ?p ?o FILTER ?x }
Data
Query
# NegativeSyntax/lone-list.rq
SELECT * WHERE { () }
Data
Query
# NegativeSyntax/lone-node.rq
SELECT * WHERE {<a>}
Data
Query
# Dot after triple
SELECT * WHERE
{ ?s ?p ?o . }
Data
Query
# No dot after triple
SELECT * WHERE
{ ?s ?p ?o }
Data
Query
SELECT * WHERE
{ ?s ?p ?o . ?s ?p ?o . }
Data
Query
# No dot
SELECT * WHERE
{ ?s ?p ?o . ?s ?p ?o }
Data
Query
# DOT after non-triples
SELECT * WHERE
{ FILTER (?o>5) . }
Data
Query
# DOT after non-triples
SELECT * WHERE
{ FILTER (?o>5) . ?s ?p ?o }
Data
Query
# Trailing ;
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s :p :o ; FILTER(?x) }
Data
Query
# Broken ;
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s :p :o ; . }
Data
Query
# More a test that bad syntax tests work!
PREFIX ex: <http://example/ns#>
SELECT *
Data
Query
# Missing DOT, 2 triples
PREFIX : <http://example/ns#>
SELECT *
{ :s1 :p1 :o1 :s2 :p2 :o2 . }
Data
Query
# Missing DOT between triples
PREFIX : <http://example/ns#>
SELECT *
{ :s1 :p1 :o1 :s2 :p2 :o2 . }
Data
Query
# Missing DOT after ; between triples
PREFIX : <http://example/ns#>
SELECT *
{ :s1 :p1 :o1 ; :s2 :p2 :o2 . }
Data
Query
# DOT, no triples
SELECT * WHERE
{ . }
Data
Query
# DOT, no triples
SELECT * WHERE
{ . . }
Data
Query
# DOT, then triples
SELECT * WHERE
{ . ?s ?p ?o }
Data
Query
# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o . . }
Data
Query
# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o .. }
Data
Query
# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o . . ?s1 ?p1 ?o1 }
Data
Query
# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o .. ?s1 ?p1 ?o1 }
Data
Query
# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o . . ?s1 ?p1 ?o1 }
Data
Query
# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o . ?s1 ?p1 ?o1 .. }
Data
Query
# DOT, no triples
SELECT * WHERE
{ . FILTER(?x) }
Data
Query
# Broken ;
SELECT * WHERE
{ ; FILTER(?x) }
Data
Query
# Broken ;
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s ; :p :o }
Data
Query
# Broken ;
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s :p ; }
Data
Query
# Broken ;
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s :p ; FILTER(?x) }
Data
Query
# Broken ;
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s :p :o . ; }
Data
Query
# Broken ,
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s , :p :o }
Data
Query
# Broken ,
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s :p , :o }
Data
Query
# Broken ,
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s :p , }
Data
Query
# Broken , can't trail
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s :p :o , }
Data
Query
# Broken , (should be ;)
PREFIX : <http://example/ns#>
SELECT * WHERE
{ :s :p1 :o1 , :p2 :o2}
Data
Query
CONSTRUCT
Data
Query
# Tokenizing matters.
# "longest token rule" means this isn't a "<" and "&&"
PREFIX : <http://example/ns#>
SELECT * WHERE
{ FILTER (?x<?a&&?b>?y) }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT * WHERE { :x [] :q }
Data
Query
PREFIX : <http://example.org/ns#>
SELECT * WHERE { :x _:a :q }
Data
Query
# Syntactic blank node in a filter.
SELECT * WHERE { <a><b>_:x FILTER(_:x) }
Data
Query
# Syntactic blank node in a filter.
SELECT * WHERE { <a><b>_:x FILTER(_:x < 3) }
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
GRAPH [] { }
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
_:a ?p ?v . _:a ?q 1
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
{ _:a ?p ?v . _:a ?q _:a } UNION { _:b ?q _:c }
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
_:a ?p ?v . FILTER(true) . [] ?q _:a
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
_:a ?p ?v . { _:a ?q 1 }
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
{ _:a ?p ?v . } _:a ?q 1
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
{ _:a ?p ?v . } UNION { _:a ?q 1 }
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
{ _:a ?p ?v . } _:a ?q 1
}
Data
Query
PREFIX : <http://example.org/>
SELECT *
WHERE
{
_:a ?p ?v . OPTIONAL {_:a ?q 1 }
}
Data
Query
# bad: re-used BNode label after GRAPH
# $Id: syn-bad-GRAPH-breaks-BGP.rq,v 1.1 2007/02/15 15:14:31 eric Exp $
PREFIX : <http://example.org/>
SELECT *
WHERE
{
_:a ?p ?v . GRAPH ?g { ?s ?p ?v } _:a ?q 1
}
Data
Query
# bad: re-used BNode label after OPTIONAL
# $Id: syn-bad-OPT-breaks-BGP.rq,v 1.1 2007/02/15 15:14:31 eric Exp $
PREFIX : <http://example.org/>
SELECT *
WHERE
{
_:a ?p ?v . OPTIONAL { ?s ?p ?v } _:a ?q 1
}
Data
Query
# bad: re-used BNode label after UNION
# $Id: syn-bad-UNION-breaks-BGP.rq,v 1.3 2007/09/04 15:03:54 eric Exp $
# This isn't necessarily a *syntax* test, but references to bnode labels
# may not span basic graph patterns.
PREFIX : <http://example.org/>
SELECT *
WHERE
{
_:a ?p ?v1 { ?s <p1> ?o } UNION { ?s <p2> ?o } _:a ?p ?v2
}
Data
Query
PREFIX dob: <http://placetime.com/interval/gregorian/1977-01-18T04:00:00Z/P>
PREFIX time: <http://www.ai.sri.com/daml/ontologies/time/Time.daml#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT ?desc
WHERE {
dob:1D a time:ProperInterval;
dc:description ?desc.
}
Data
file:///Users/swh/Projects/4store/tests/dawg/data/triple-match/data-01.ttl
Query
PREFIX : <http://example.org/data/>
SELECT *
WHERE { :x ?p ?q . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/triple-match/data-01.ttl
Query
PREFIX : <http://example.org/data/>
SELECT *
WHERE { ?x :p ?q . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/triple-match/data-02.ttl
Query
SELECT *
WHERE { ?a ?a ?b . }
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/triple-match/dawg-data-01.ttl
Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE {
?x rdf:type foaf:Person .
?x foaf:name ?name .
}
Results
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-double-double.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:double1 rdf:value ?l .
t:double1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:double ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-double-float.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:double1 rdf:value ?l .
t:float1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:double ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-double-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:double1 rdf:value ?l .
t:decimal1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:double ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-float-float.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:float1 rdf:value ?l .
t:float1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:float ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-float-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:float1 rdf:value ?l .
t:decimal1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:float ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-decimal-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:decimal1 rdf:value ?l .
t:decimal1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:decimal ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-integer-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:integer1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-nonPositiveInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:nonPositiveIntegerN1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-negativeInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:negativeIntegerN1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-long-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:long1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-int-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:int1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-short-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:short1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-byte-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:byte1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-nonNegativeInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:nonNegativeInteger1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-unsignedLong-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:unsignedLong1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-unsignedInt-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:unsignedInt1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-unsignedShort-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:unsignedShort1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-unsignedByte-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:unsignedByte1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-positiveInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:positiveInteger1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:integer ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-short-double.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:short1 rdf:value ?l .
t:double1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:double ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-short-float.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:short1 rdf:value ?l .
t:float1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:float ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-short-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:short1 rdf:value ?l .
t:decimal1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:decimal ) }
Results
# Simple true result to an ASK query.
# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "true"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-short-short-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:short1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:short ) }
Results
# Simple false result to an ASK query.
# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-byte-short-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:byte1 rdf:value ?l .
t:short1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:short ) }
Results
# Simple false result to an ASK query.
# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-short-long-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:short1 rdf:value ?l .
t:long1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:decimal ) }
Results
# Simple false result to an ASK query.
# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-short-int-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:short1 rdf:value ?l .
t:int1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:float ) }
Results
# Simple false result to an ASK query.
# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-short-byte-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:short1 rdf:value ?l .
t:byte1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:double ) }
Results
# Simple false result to an ASK query.
# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-double-float-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:double1 rdf:value ?l .
t:float1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:float ) }
Results
# Simple false result to an ASK query.
# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-double-decimal-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:double1 rdf:value ?l .
t:decimal1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:decimal ) }
Results
# Simple false result to an ASK query.
# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean .
Data
file:///Users/swh/Projects/4store/tests/dawg/data/type-promotion/tP.ttl
Query
# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: tP-float-decimal-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ASK
WHERE { t:float1 rdf:value ?l .
t:decimal1 rdf:value ?r .
FILTER ( datatype(?l + ?r) = xsd:decimal ) }
Results
# Simple false result to an ASK query.
# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type rs:ResultSet ;
rs:boolean "false"^^xsd:boolean .