filter-nested-1

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

rowvarval

filter-placement-1

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

rowvarval

filter-placement-2

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

rowvarval

filter-placement-3

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

rowvarval

join-operator-with-opts-bgps-and-unions

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

rowvarval

nested-optionals-2

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

rowvarval

ask-1-sparql-xml-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
    
.

ask-4-sparql-xml-results-

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
    
.

ask-7-sparql-xml-results-

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
    
.

ask-8-sparql-xml-results-

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
    
.

basic-prefix-base-1

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

rowvarval

basic-prefix-base-2

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

rowvarval

basic-prefix-base-3

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

rowvarval

basic-prefix-base-4

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

rowvarval

basic-prefix-base-5

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

rowvarval

non-matching-triple-pattern

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

rowvarval

basic-list-1

Data

file:///Users/swh/Projects/4store/tests/dawg/data/basic/data-2.ttl

Query

PREFIX : <http://example.org/ns#>

SELECT ?p
{ :x ?p () . }

Results

rowvarval

basic-list-2

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

rowvarval

basic-list-3

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

rowvarval

basic-list-4

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

rowvarval

prefix-name-1

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

rowvarval

basic-quotes-1

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

rowvarval

basic-quotes-2

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

rowvarval

basic-quotes-3

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

rowvarval

basic-quotes-4

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

rowvarval

basic-graph-pattern-spoo

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

rowvarval

basic-term-1

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

rowvarval

basic-term-2

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

rowvarval

basic-term-3

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

rowvarval

basic-term-4

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

rowvarval

basic-term-5

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

rowvarval

basic-term-6

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

rowvarval

basic-term-7

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

rowvarval

basic-term-8

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

rowvarval

basic-term-9

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

rowvarval

basic-var-1

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

rowvarval

basic-var-2

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

rowvarval

dawg-bnode-coreference

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

rowvarval

test-boolean-effective-value-true

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

rowvarval

test-boolean-effective-value-false

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

rowvarval

test-boolean-effective-value-

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

rowvarval

test-boolean-effective-value-

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

rowvarval

test-boolean-effective-value-optional

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

rowvarval

test-boolean-effective-value-unknown-types

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

rowvarval

test-literal-true-

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

rowvarval

dawg-bound-query-001

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

rowvarval

cast-to-xsd-boolean

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

rowvarval

cast-to-xsd-datetime

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

rowvarval

cast-to-xsd-double

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

rowvarval

cast-to-xsd-decimal

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

rowvarval

cast-to-xsd-float

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

rowvarval

cast-to-xsd-integer

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

rowvarval

cast-to-xsd-string

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

rowvarval

dawg-construct-identity

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> ;
    .

dawg-construct-subgraph

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" .

dawg-construct-reification-1

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> .

dawg-construct-reification-2

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> .

dataset-02

Data

Query

PREFIX : <http://example/> 

SELECT *
FROM NAMED <data-g1.ttl>
{ ?s ?p ?o }

Results

rowvarval

dataset-04

Data

Query

PREFIX : <http://example/> 

SELECT * 
FROM <data-g1.ttl>
{ 
    GRAPH ?g { ?s ?p ?o }
}

Results

rowvarval

dataset-09b

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

rowvarval

numbers-distinct

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

rowvarval

strings-distinct

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

rowvarval

nodes-distinct

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

rowvarval

opt-distinct

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

rowvarval

all-distinct

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

rowvarval

select-distinct-

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

rowvarval

numbers-no-distinct

Data

file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-num.ttl

Query

SELECT ?v
{
    ?x ?p ?v .
}

Results

rowvarval

strings-no-distinct

Data

file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-str.ttl

Query

SELECT ?v
{
    ?x ?p ?v .
}

Results

rowvarval

nodes-no-distinct

Data

file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-node.ttl

Query

SELECT ?v
{
    ?x ?p ?v .
}

Results

rowvarval

opt-no-distinct

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

rowvarval

all-no-distinct

Data

file:///Users/swh/Projects/4store/tests/dawg/data/distinct/data-all.ttl

Query

SELECT ?v
{
    ?x ?p ?v .
}

Results

rowvarval

datatype-1

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

rowvarval

datatype-2-literals-with-a-datatype

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

rowvarval

datatype-3-literals-with-a-datatype-of-xsd-string

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

rowvarval

isblank-1

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

rowvarval

isiri-1

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

rowvarval

isliteral

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

rowvarval

isuri-1

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

rowvarval

lang-1-literals-with-a-lang-tag-of-some-kind

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

rowvarval

lang-2-literals-with-a-lang-tag-of-

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

rowvarval

lang-3-graph-matching-with-lang-tag-being-a-different-case

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

rowvarval

langmatches-1

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

rowvarval

langmatches-2

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

rowvarval

langmatches-3

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

rowvarval

langmatches-4

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

rowvarval

langmatches-basic

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

rowvarval

str-1

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

rowvarval

str-2

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

rowvarval

str-3

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

rowvarval

str-4

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

rowvarval

lang-case-insensitive-eq

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

rowvarval

lang-case-insensitive-ne

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

rowvarval

sameterm-eq

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

rowvarval

sameterm-not-eq

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

rowvarval

sameterm-simple

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

rowvarval

equality-1-1

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

rowvarval

equality-2-var-test-equals

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

rowvarval

equality-2-var-test-not-equals-

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

rowvarval

equality-1-2

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

rowvarval

equality-1-3

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

rowvarval

equality-1-4

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

rowvarval

equality-1-5

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

rowvarval

equality-1-1-graph

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

rowvarval

equality-1-3-graph

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

rowvarval

equality-1-4-graph

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

rowvarval

equality-1-5-graph

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

rowvarval

greater-than-or-equals

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

rowvarval

less-than-or-equals

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

rowvarval

subtraction

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

rowvarval

multiplication

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

rowvarval

addition

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

rowvarval

unary-minus

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

rowvarval

unary-plusn

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

rowvarval

graph-01

Data

file:///Users/swh/Projects/4store/tests/dawg/data/graph/data-g1.ttl

Query

PREFIX : <http://example/> 

SELECT * { ?s ?p ?o }

Results

rowvarval

graph-03

Data

file:///Users/swh/Projects/4store/tests/dawg/data/graph/data-g1.ttl

Query

PREFIX : <http://example/> 

SELECT * { 
    GRAPH ?g { ?s ?p ?o }
}

Results

rowvarval

kanji-01

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

rowvarval

kanji-02

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

rowvarval

normalization-01

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

rowvarval

normalization-02

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

rowvarval

normalization-03

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

rowvarval

date-4

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

rowvarval

open-cmp-01

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

rowvarval

open-cmp-02

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

rowvarval

open-eq-01

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

rowvarval

open-eq-02

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

rowvarval

open-eq-03

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

rowvarval

open-eq-04

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

rowvarval

open-eq-05

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

rowvarval

open-eq-06

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

rowvarval

open-eq-07

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

rowvarval

open-eq-08

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

rowvarval

open-eq-09

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

rowvarval

open-eq-10

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

rowvarval

open-eq-11

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

rowvarval

optional-filter

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

rowvarval

optional-outer-filter

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

rowvarval

optional-outer-filter-with-bound

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

rowvarval

optional-inner-filter-with-negative-ebv-for-outer-variables

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

rowvarval

one-optional-clause

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

rowvarval

two-optional-clauses

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

rowvarval

complex-optional-semantics-1

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

rowvarval

complex-optional-semantics-2

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

rowvarval

complex-optional-semantics-3

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

rowvarval

union-is-not-optional

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

rowvarval

regex-query-001

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

rowvarval

regex-query-002

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

rowvarval

regex-query-003

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

rowvarval

regex-query-004

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

rowvarval

limit-1

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

rowvarval

limit-2

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

rowvarval

limit-3

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

rowvarval

limit-4

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

rowvarval

offset-1

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

rowvarval

offset-2

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

rowvarval

offset-3

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

rowvarval

offset-4

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

rowvarval

slice-1

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

rowvarval

slice-2

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

rowvarval

slice-3

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

rowvarval

slice-4

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

rowvarval

slice-5

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

rowvarval

sort-10

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

rowvarval

sort-1

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

rowvarval

sort-2

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

rowvarval

sort-3

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

rowvarval

sort-4

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

rowvarval

sort-5

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

rowvarval

sort-6

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

rowvarval

sort-7

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

rowvarval

sort-8

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

rowvarval

sort-9

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

rowvarval

builtin-sort

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

rowvarval

function-sort

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

rowvarval

expression-sort

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

rowvarval

syntax-basic-01-rq

Data

Query

SELECT *
WHERE { }

syntax-basic-02-rq

Data

Query

SELECT * {}

syntax-basic-03-rq

Data

Query

# No trailing dot
PREFIX : <http://example.org/ns#> 
SELECT *
WHERE { ?x ?y ?z }

syntax-basic-04-rq

Data

Query

# With trailing dot
SELECT *
WHERE { ?x ?y ?z . }

syntax-basic-05-rq

Data

Query

# Two triples : no trailing dot
SELECT *
WHERE { ?x ?y ?z . ?a ?b ?c }

syntax-basic-06-rq

Data

Query

# Two triples : with trailing dot
SELECT *
WHERE { ?x ?y ?z . ?a ?b ?c . }

syntax-bnodes-01-rq

Data

Query

PREFIX : <http://example.org/ns#>
SELECT * WHERE { [:p :q ] }

syntax-bnodes-02-rq

Data

Query

PREFIX : <http://example.org/ns#>
SELECT * WHERE { [] :p :q }

syntax-bnodes-03-rq

Data

Query

PREFIX : <http://example.org/ns#>
SELECT * WHERE { [ ?x ?y ] :p [ ?pa ?b ] }

syntax-bnodes-04-rq

Data

Query

PREFIX : <http://example.org/ns#> 
SELECT *
WHERE { [ :p :q ; ] }

syntax-bnodes-05-rq

Data

Query

PREFIX : <http://example.org/ns#> 
SELECT *
WHERE { _:a :p1 :q1 .
        _:a :p2 :q2 .
      }

syntax-expr-01-rq

Data

Query

SELECT *
WHERE { ?s ?p ?o . FILTER (?o) }

syntax-expr-02-rq

Data

Query

SELECT *
WHERE { ?s ?p ?o . FILTER REGEX(?o, "foo") }

syntax-expr-03-rq

Data

Query

SELECT *
WHERE { ?s ?p ?o . FILTER REGEX(?o, "foo", "i") }

syntax-expr-04-rq

Data

Query

PREFIX xsd:   <http://www.w3.org/2001/XMLSchema#>
SELECT *
WHERE { ?s ?p ?o . FILTER xsd:integer(?o) }

syntax-expr-05-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
PREFIX xsd:   <http://www.w3.org/2001/XMLSchema#>
SELECT *
WHERE { ?s ?p ?o . FILTER :myFunc(?s,?o) }

syntax-forms-01-rq

Data

Query

PREFIX : <http://example.org/ns#>
SELECT * WHERE { ( [ ?x ?y ] ) :p ( [ ?pa ?b ] 57 ) }

syntax-forms-02-rq

Data

Query

PREFIX : <http://example.org/ns#>
SELECT * WHERE { ( [] [] ) }

syntax-limit-offset-01-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
SELECT *
{ ?s ?p ?o }
ORDER BY ?o
LIMIT 5

syntax-limit-offset-02-rq

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

syntax-limit-offset-03-rq

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

syntax-limit-offset-04-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
SELECT *
{ ?s ?p ?o }
ORDER BY ?o
OFFSET 3

syntax-lists-01-rq

Data

Query

PREFIX : <http://example.org/ns#> 
SELECT * WHERE { ( ?x ) :p ?z  }

syntax-lists-02-rq

Data

Query

PREFIX : <http://example.org/ns#> 
SELECT * WHERE { ?x :p ( ?z ) }

syntax-lists-03-rq

Data

Query

SELECT * WHERE { ( ?z ) }

syntax-lists-04-rq

Data

Query

SELECT * WHERE { ( ( ?z ) ) }

syntax-lists-05-rq

Data

Query

SELECT * WHERE { ( ( ) ) }

syntax-lit-01-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p "x" }

syntax-lit-02-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p 'x' }

syntax-lit-03-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p "x\"y'z" }

syntax-lit-04-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p 'x"y\'z' }

syntax-lit-05-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p "x\"" }

syntax-lit-06-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p 'x\'' }

syntax-lit-07-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p 123 }

syntax-lit-08-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p 123. . }

syntax-lit-09-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p """Long
""
Literal
""" }

syntax-lit-10-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p '''Long
'' """
Literal''' }

syntax-lit-11-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p """Long""\"Literal""" }

syntax-lit-12-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p '''Long''\'Literal''' }

syntax-lit-13-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p """Long\"""Literal""" }

syntax-lit-14-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p '''Long\'''Literal''' }

syntax-lit-15-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p '''Long '' Literal''' }

syntax-lit-16-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p '''Long ' Literal''' }

syntax-lit-17-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p '''Long''\\Literal with '\\ single quotes ''' }

syntax-lit-18-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p """Long "" Literal""" }

syntax-lit-19-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p """Long " Literal""" }

syntax-lit-20-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT * WHERE { :x :p """Long""\\Literal with "\\ single quotes""" }

syntax-order-01-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
SELECT *
{ ?s ?p ?o }
ORDER BY ?o

syntax-order-02-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
SELECT *
{ ?s ?p ?o }
ORDER BY (?o+5)

syntax-order-03-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
SELECT *
{ ?s ?p ?o }
ORDER BY ASC(?o)

syntax-order-04-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
SELECT *
{ ?s ?p ?o }
ORDER BY DESC(?o)

syntax-order-05-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
SELECT *
{ ?s ?p ?o }
ORDER BY DESC(:func(?s, ?o))

syntax-order-06-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
SELECT *
{ ?s ?p ?o }
ORDER BY 
  DESC(?o+57) :func2(?o) ASC(?s)

syntax-order-07-rq

Data

Query

PREFIX :      <http://example.org/ns#> 
SELECT *
{ ?s ?p ?o }
ORDER BY str(?o)

syntax-pat-01-rq

Data

Query

PREFIX : <http://example.org/ns#> 
SELECT *
{ }

syntax-pat-02-rq

Data

Query

# No DOT after optional
PREFIX : <http://example.org/ns#> 
SELECT *
{ ?a :b :c OPTIONAL{:x :y :z} :x ?y ?z }

syntax-pat-03-rq

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 }
}

syntax-pat-04-rq

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 }
}

syntax-qname-01-rq

Data

Query

PREFIX : <http://example.org/ns#> 
SELECT *
{ ?x :p ?z }

syntax-qname-02-rq

Data

Query

PREFIX : <http://example.org/ns#> 
SELECT *
WHERE { :x :p :z . }

syntax-qname-03-rq

Data

Query

PREFIX : <http://example.org/ns#> 
SELECT *
WHERE { :_1 :p.rdf :z.z . }

syntax-qname-04-rq

Data

Query

PREFIX :  <http://example.org/ns#> 
PREFIX a: <http://example.org/ns2#> 
SELECT *
WHERE { : a: :a . : : : . }

syntax-qname-05-rq

Data

Query

PREFIX :  <> 
SELECT *
WHERE { : : : . }

syntax-qname-06-rq

Data

Query

PREFIX :  <#> 
SELECT *
WHERE { : : : . }

syntax-qname-07-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#> 
SELECT *
WHERE { : : : . }

syntax-qname-08-rq

Data

Query

BASE   <http://example.org/>
PREFIX :  <#>
PREFIX x.y:  <x#>
SELECT *
WHERE { :a.b  x.y:  : . }

syntax-struct-01-rq

Data

Query

# Operator
PREFIX :  <http://example.org/ns#> 
SELECT *
{ OPTIONAL { } }

syntax-struct-02-rq

Data

Query

# Operator
PREFIX :  <http://example.org/ns#> 
SELECT *
{ OPTIONAL { :a :b :c } }

syntax-struct-03-rq

Data

Query

# Triple, no DOT, operator
PREFIX :  <http://example.org/ns#> 
SELECT *
{ :p :q :r OPTIONAL { :a :b :c } }

syntax-struct-05-rq

Data

Query

# Triple, DOT, operator
PREFIX :  <http://example.org/ns#> 
SELECT *
{ :p :q :r . OPTIONAL { :a :b :c } }

syntax-struct-06-rq

Data

Query

# Triple, DOT, operator, DOT
PREFIX :  <http://example.org/ns#> 
SELECT *
{ :p :q :r . OPTIONAL { :a :b :c } . }

syntax-struct-07-rq

Data

Query

# Operator, no DOT
PREFIX :  <http://example.org/ns#> 
SELECT *
{ OPTIONAL { :a :b :c } }

syntax-struct-08-rq

Data

Query

# Operator, DOT
PREFIX :  <http://example.org/ns#> 
SELECT *
{ OPTIONAL { :a :b :c } . }

syntax-struct-09-rq

Data

Query

# Operator, triple
PREFIX :  <http://example.org/ns#> 
SELECT *
{ OPTIONAL { :a :b :c } ?x ?y ?z }

syntax-struct-10-rq

Data

Query

# Operator, DOT triple
PREFIX :  <http://example.org/ns#> 
SELECT *
{ OPTIONAL { :a :b :c } . ?x ?y ?z }

syntax-struct-11-rq

Data

Query

# Triple, semi, operator
PREFIX :  <http://example.org/ns#>
SELECT *
{ :p :q :r ; OPTIONAL { :a :b :c } }

syntax-struct-12-rq

Data

Query

# Triple, semi, DOT, operator
PREFIX :  <http://example.org/ns#>
SELECT *
{ :p :q :r ; . OPTIONAL { :a :b :c } }

syntax-struct-13-rq

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 } 
}

syntax-struct-14-rq

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 } 
}

syntax-union-01-rq

Data

Query

PREFIX : <http://example.org/ns#>
SELECT *
{
  { ?s ?p ?o } UNION { ?a ?b ?c } 
}

syntax-union-02-rq

Data

Query

PREFIX : <http://example.org/ns#>
SELECT *
{
  { ?s ?p ?o } UNION { ?a ?b ?c } UNION { ?r ?s ?t }
}

syntax-bnode-01-rq

Data

Query

PREFIX : <http://example.org/>
SELECT * WHERE { [] :p [] }

syntax-bnode-02-rq

Data

Query

PREFIX : <http://example.org/>
# Tab
SELECT * WHERE { [ ] :p [
	] }

syntax-bnode-03-rq

Data

Query

PREFIX : <http://example.org/>
SELECT * WHERE { [ :p :q 
 ] }

syntax-dataset-01-rq

Data

Query

PREFIX : <http://example.org/>
SELECT ?x
FROM <http://example.org/graph>
WHERE {}

syntax-dataset-02-rq

Data

Query

PREFIX : <http://example.org/>
SELECT ?x
FROM NAMED <http://example.org/graph1>
WHERE {}

syntax-dataset-03-rq

Data

Query

PREFIX : <http://example.org/>
SELECT ?x
FROM NAMED :graph1
FROM NAMED :graph2
WHERE {}

syntax-dataset-04-rq

Data

Query

PREFIX : <http://example.org/>
SELECT ?x
FROM :g1
FROM :g2
FROM NAMED :graph1
FROM NAMED :graph2
WHERE {}

syntax-esc-01-rq

Data

Query

SELECT *
WHERE { <x> <p> "\t" }

syntax-esc-02-rq

Data

Query

SELECT *
WHERE { <x> <p> "x\t" }

syntax-esc-03-rq

Data

Query

SELECT *
WHERE { <x> <p> "\tx" }

syntax-esc-04-rq

Data

Query

PREFIX : <http://example/> 
SELECT *
WHERE { <\u0078> :\u0070 ?xx\u0078 }

syntax-esc-05-rq

Data

Query

PREFIX : <http://example/> 
SELECT *
# Comments can contain \ u
# <\u0078> :\u0070 ?xx\u0078
WHERE { <\u0078> :\u0070 ?xx\u0078 }

syntax-form-ask-02-rq

Data

Query

ASK {}

syntax-form-construct01-rq

Data

Query

CONSTRUCT { ?s <p1> <o> . ?s <p2> ?o } WHERE {?s ?p ?o}

syntax-form-construct02-rq

Data

Query

CONSTRUCT { ?s <p1> <o> . ?s <p2> ?o .} WHERE {?s ?p ?o}

syntax-form-construct03-rq

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}

syntax-form-construct04-rq

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}

syntax-form-construct06-rq

Data

Query

CONSTRUCT {} WHERE {}

syntax-form-describe01-rq

Data

Query

DESCRIBE <u>

syntax-form-describe02-rq

Data

Query

DESCRIBE <u> ?u WHERE { <x> <q> ?u . }

syntax-form-select-01-rq

Data

Query

SELECT * WHERE { }

syntax-form-select-02-rq

Data

Query

SELECT * { }

syntax-function-01-rq

Data

Query

PREFIX q: <http://example.org/>
SELECT * WHERE { FILTER (q:name()) }

syntax-function-02-rq

Data

Query

PREFIX q: <http://example.org/>
SELECT * WHERE { FILTER (q:name( )) }

syntax-function-03-rq

Data

Query

PREFIX q: <http://example.org/>
SELECT * WHERE { FILTER (q:name(
)) }

syntax-function-04-rq

Data

Query

PREFIX q: <http://example.org/>
SELECT * WHERE { FILTER (q:name(1
)) . FILTER (q:name(1,2)) . FILTER (q:name(1
,2))}

syntax-general-01-rq

Data

Query

SELECT * WHERE { <a><b><c> }

syntax-general-02-rq

Data

Query

SELECT * WHERE { <a><b>_:x }

syntax-general-03-rq

Data

Query

SELECT * WHERE { <a><b>1 }

syntax-general-04-rq

Data

Query

SELECT * WHERE { <a><b>+11 }

syntax-general-05-rq

Data

Query

SELECT * WHERE { <a><b>-1 }

syntax-general-06-rq

Data

Query

SELECT * WHERE { <a><b>1.0 }

syntax-general-07-rq

Data

Query

SELECT * WHERE { <a><b>+1.0 }

syntax-general-08-rq

Data

Query

SELECT * WHERE { <a><b>-1.0 }

syntax-general-09-rq

Data

Query

SELECT * WHERE { <a><b>1.0e0 }

syntax-general-10-rq

Data

Query

SELECT * WHERE { <a><b>+1.0e+1 }

syntax-general-11-rq

Data

Query

SELECT * WHERE { <a><b>-1.0e-1 }

syntax-general-12-rq

Data

Query

# Legal, if unusual, IRIs
SELECT * WHERE { <a> <b> <?z> }

syntax-general-13-rq

Data

Query

# Legal, if unusual, IRIs
BASE <http://example/page.html>
SELECT * WHERE { <a> <b> <#x> }

syntax-general-14-rq

Data

Query

# Legal, if unusual, IRIs
BASE <http://example/page.html?query>
SELECT * WHERE { <a> <b> <&param=value> }

syntax-graph-01-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  GRAPH ?g { } 
}

syntax-graph-02-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  GRAPH :a { } 
}

syntax-graph-03-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  GRAPH ?g { :x :b ?a } 
}

syntax-graph-04-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  :x :p :z
  GRAPH ?g { :x :b ?a } 
}

syntax-graph-05-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  :x :p :z
  GRAPH ?g { :x :b ?a . GRAPH ?g2 { :x :p ?x } }
}

syntax-keywords-01-rq

Data

Query

# use keyword FILTER as a namespace prefix
PREFIX FILTER: <http://example.org/ns#> 
SELECT *
WHERE { ?x FILTER:foo ?z FILTER (?z) }

syntax-keywords-02-rq

Data

Query

# use keyword FILTER as a local name
PREFIX : <http://example.org/ns#> 
SELECT *
WHERE { ?x :FILTER ?z FILTER (?z) }

syntax-keywords-03-rq

Data

Query

# use keyword UNION as a namespace prefix
PREFIX UNION: <http://example.org/ns#> 
SELECT *
WHERE { ?x UNION:foo ?z }

syntax-lists-01-rq

Data

Query

PREFIX : <http://example.org/>
SELECT * WHERE { () :p 1 }

syntax-lists-02-rq

Data

Query

PREFIX : <http://example.org/>
SELECT * WHERE { ( ) :p 1 }

syntax-lists-03-rq

Data

Query

PREFIX : <http://example.org/>
SELECT * WHERE { ( 
) :p 1 }

syntax-lists-04-rq

Data

Query

PREFIX : <http://example.org/>
SELECT * WHERE { ( 1 2
) :p 1 }

syntax-lists-05-rq

Data

Query

PREFIX : <http://example.org/>
SELECT * WHERE { ( 1 2
) }

syn-blabel-cross-filter

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 }

syn-blabel-cross-graph-bad

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 }

syn-blabel-cross-optional-bad

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 }

syn-blabel-cross-union-bad

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 }

syn-bad-bnode-dot-rq

Data

Query

# NegativeSyntax/bnode-dot.rq
SELECT * WHERE {[] . }

syn-bad-bnodes-missing-pvalues-01-rq

Data

Query

# NegativeSyntax/bnodes-missing-pvalues.rq
PREFIX :   <http://example/ns#>
SELECT * WHERE { [,] :p [;] . }

syn-bad-bnodes-missing-pvalues-02-rq

Data

Query

# NegativeSyntax/bnodes-missing-pvalues-02.rq
SELECT * WHERE {() . [,] . [,;] }

syn-bad-empty-optional-01-rq

Data

Query

# NegativeSyntax/empty-optional.rq
SELECT * { OPTIONAL FILTER (?x) }

syn-bad-empty-optional-02-rq

Data

Query

# NegativeSyntax/empty-optional-02.rq
SELECT * { OPTIONAL GRAPH ?v OPTIONAL FILTER (?x) }

syn-bad-filter-missing-parens-rq

Data

Query

# NegativeSyntax/filter-missing-parens.rq
SELECT * { ?s ?p ?o FILTER ?x }

syn-bad-lone-list-rq

Data

Query

# NegativeSyntax/lone-list.rq
SELECT * WHERE { () }

syn-bad-lone-node-rq

Data

Query

# NegativeSyntax/lone-node.rq
SELECT * WHERE {<a>}

syn-01-rq

Data

Query

# Dot after triple
SELECT * WHERE
{ ?s ?p ?o . }

syn-02-rq

Data

Query

# No dot after triple
SELECT * WHERE
{ ?s ?p ?o }

syn-03-rq

Data

Query

SELECT * WHERE
{ ?s ?p ?o . ?s ?p ?o . }

syn-04-rq

Data

Query

# No dot
SELECT * WHERE
{ ?s ?p ?o . ?s ?p ?o }

syn-05-rq

Data

Query

# DOT after non-triples
SELECT * WHERE
{ FILTER (?o>5) . }

syn-06-rq

Data

Query

# DOT after non-triples
SELECT * WHERE
{ FILTER (?o>5) . ?s ?p ?o }

syn-07-rq

Data

Query

# Trailing ;
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s :p :o ; FILTER(?x) }

syn-08-rq

Data

Query

# Broken ;
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s :p :o ; . }

syn-bad-01-rq

Data

Query

# More a test that bad syntax tests work!
PREFIX ex:   <http://example/ns#>
SELECT *

syn-bad-02-rq

Data

Query

# Missing DOT, 2 triples
PREFIX :   <http://example/ns#>
SELECT *
{ :s1 :p1 :o1 :s2 :p2 :o2 . }

syn-bad-03-rq

Data

Query

# Missing DOT between triples
PREFIX :   <http://example/ns#>
SELECT *
{ :s1 :p1 :o1 :s2 :p2 :o2 . }

syn-bad-04-rq

Data

Query

# Missing DOT after ; between triples
PREFIX :   <http://example/ns#>
SELECT *
{ :s1 :p1 :o1 ; :s2 :p2 :o2 . }

syn-bad-05-rq

Data

Query

# DOT, no triples
SELECT * WHERE
{ . }

syn-bad-06-rq

Data

Query

# DOT, no triples
SELECT * WHERE
{ . . }

syn-bad-07-rq

Data

Query

# DOT, then triples
SELECT * WHERE
{ . ?s ?p ?o }

syn-bad-08-rq

Data

Query

# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o . . }

syn-bad-09-rq

Data

Query

# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o .. }

syn-bad-10-rq

Data

Query

# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o . . ?s1 ?p1 ?o1 }

syn-bad-11-rq

Data

Query

# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o .. ?s1 ?p1 ?o1 }

syn-bad-12-rq

Data

Query

# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o . . ?s1 ?p1 ?o1 }

syn-bad-13-rq

Data

Query

# Multiple DOTs
SELECT * WHERE
{ ?s ?p ?o . ?s1 ?p1 ?o1 .. }

syn-bad-14-rq

Data

Query

# DOT, no triples
SELECT * WHERE
{ . FILTER(?x) }

syn-bad-15-rq

Data

Query

# Broken ;
SELECT * WHERE
{ ; FILTER(?x) }

syn-bad-16-rq

Data

Query

# Broken ;
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s ; :p :o }

syn-bad-17-rq

Data

Query

# Broken ;
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s :p ; }

syn-bad-18-rq

Data

Query

# Broken ;
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s :p ; FILTER(?x) }

syn-bad-19-rq

Data

Query

# Broken ;
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s :p :o . ;  }

syn-bad-20-rq

Data

Query

# Broken ,
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s , :p :o  }

syn-bad-21-rq

Data

Query

# Broken ,
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s  :p , :o  }

syn-bad-22-rq

Data

Query

# Broken ,
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s  :p , }

syn-bad-23-rq

Data

Query

# Broken , can't trail
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s  :p :o , }

syn-bad-24-rq

Data

Query

# Broken , (should be ;)
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ :s :p1 :o1 , :p2 :o2}

syn-bad-25-rq

Data

Query

CONSTRUCT 

syn-bad-26-rq

Data

Query

# Tokenizing matters.
# "longest token rule" means this isn't a "<" and "&&"
PREFIX :   <http://example/ns#>
SELECT * WHERE
{ FILTER (?x<?a&&?b>?y) }

syn-bad-27-rq

Data

Query

PREFIX : <http://example.org/ns#>
SELECT * WHERE { :x [] :q }

syn-bad-28-rq

Data

Query

PREFIX : <http://example.org/ns#>
SELECT * WHERE { :x _:a :q }

syn-bad-29-rq

Data

Query

# Syntactic blank node in a filter.
SELECT * WHERE { <a><b>_:x FILTER(_:x) }

syn-bad-30-rq

Data

Query

# Syntactic blank node in a filter.
SELECT * WHERE { <a><b>_:x FILTER(_:x < 3) }

syn-bad-31-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  GRAPH [] { } 
}

syn-09-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  _:a ?p ?v .  _:a ?q 1 
}

syn-10-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  { _:a ?p ?v .  _:a ?q _:a } UNION { _:b ?q _:c }
}

syn-11-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  _:a ?p ?v .  FILTER(true) . [] ?q _:a
}

syn-bad-34-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  _:a ?p ?v . { _:a ?q 1 }
}

syn-bad-35-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  { _:a ?p ?v . } _:a ?q 1 
}

syn-bad-36-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  { _:a ?p ?v . } UNION { _:a ?q 1 } 
}

syn-bad-37-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  { _:a ?p ?v . } _:a ?q 1 
}

syn-bad-38-rq

Data

Query

PREFIX : <http://example.org/>
SELECT *
WHERE
{
  _:a ?p ?v . OPTIONAL {_:a ?q 1 }
}

syn-bad-graph-breaks-bgp

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
}

syn-bad-opt-breaks-bgp

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
}

syn-bad-union-breaks-bgp

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
}

syn-leading-digits-in-prefixed-names-rq

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.
}

dawg-triple-pattern-001

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

rowvarval

dawg-triple-pattern-002

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

rowvarval

dawg-triple-pattern-003

Data

file:///Users/swh/Projects/4store/tests/dawg/data/triple-match/data-02.ttl

Query

SELECT *
WHERE { ?a ?a ?b . }

Results

rowvarval

dawg-triple-pattern-004

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

rowvarval

tp-double-double

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 .

tp-double-float

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 .

tp-double-decimal

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 .

tp-float-float

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 .

tp-float-decimal

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 .

tp-decimal-decimal

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 .

tp-integer-short

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 .

tp-nonpositiveinteger-short

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 .

tp-negativeinteger-short

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 .

tp-long-short

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 .

tp-int-short

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 .

tp-short-short

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 .

tp-byte-short

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 .

tp-nonnegativeinteger-short

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 .

tp-unsignedlong-short

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 .

tp-unsignedint-short

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 .

tp-unsignedshort-short

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 .

tp-unsignedbyte-short

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 .

tp-positiveinteger-short

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 .

tp-short-double

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 .

tp-short-float

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 .

tp-short-decimal

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 .

tp-short-short-fail

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 .

tp-byte-short-fail

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 .

tp-short-long-fail

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 .

tp-short-int-fail

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 .

tp-short-byte-fail

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 .

tp-double-float-fail

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 .

tp-double-decimal-fail

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 .

tp-float-decimal-fail

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 .