summaryrefslogtreecommitdiff
path: root/tests/examplefiles/sparql.rq
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examplefiles/sparql.rq')
-rw-r--r--tests/examplefiles/sparql.rq35
1 files changed, 30 insertions, 5 deletions
diff --git a/tests/examplefiles/sparql.rq b/tests/examplefiles/sparql.rq
index caedfd14..70b594e1 100644
--- a/tests/examplefiles/sparql.rq
+++ b/tests/examplefiles/sparql.rq
@@ -1,23 +1,48 @@
# This is a test SPARQL query
+BASE <http://pygments.org/examples/sparql.rq>
+
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ex: <http://example.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?person (COUNT(?nick) AS ?nickCount) {
+ <#jonny> foaf:knows ?person .
+ ?person a foaf:Person .
+ ?person foaf:firstName "Freddy" .
+ ?person foaf:lastName "Smith" .
+ # predicate-object list
?person foaf:nick ?nick ;
- foaf:lastName "Smith" ;
- foaf:age "21"^^xsd:int ;
+ foaf:age "21"^^xsd:int ; # typed literal
ex:title 'Mr' ; # single-quoted string
+ ex:width 2 ; # integer
ex:height 1.80 ; # float
- ex:distanceToSun +1.4e8 ; # float with exponent
+ ex:distanceToSun 1.4e8 ; # float with exponent
ex:ownsACat true ;
- dcterms:description "Someone with a cat called \"cat\"."@en .
+ ex:catName "Kitty", "Kitty_" ; # object list
+ # some other float values
+ ex:float1 .125 ;
+ ex:float2 +2.5e10 ;
+ ex:float3 2.5e+10 ;
+ ex:float4 -1.e-10 ;
+ ex:float5 .0e1 ;
+ ex:float6 5e11 ;
+ ex:float7 1. ;
+ ex:À "" ;
+ ex:豈 "" ;
+ ex:escape "\n\u00c0\U00010000";
+ ex:catAge ?catage ;
+ dcterms:description "Someone with a cat called \"cat\"."@en . # language tag
+ ?person foaf:knows _:b0 .
+ _:b0 foaf:knows [ _:b1 a foaf:Person; foaf:name "Jonny" . ] .
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) )
-} GROUP BY ?person ORDER BY ?img
+ FILTER ( ?catage < 101 && ?catage > 9 && ?catage >= 10 && ?catage <= 100 && ?catage != 20 )
+}
+GROUP BY ?person
+ORDER BY ?img ASC(?firstN) DESC(?page)