When I learned that release 2.8.5 of ARQ implements all of SPARQL 1.1 Query ("except for corner cases of property paths", and Andy Seaborne recently told me that they've finished up that part) I decided to try out some of the SPARQL 1.1 features, and it was all pretty easy. I used ARQ from the command line and went through Lee Feigenbaum's slides on the status of SPARQL 1.1 as a checklist of things to try. For sample queries and data I tried to use the examples in the SPARQL 1.1 spec wherever possible, but sometimes expanded on them a bit.

Projected expressions When I tried projected expressions using the spec's example I got an error because of the sample query's use of the fn:concat function, but when I added the following prefix declaration to the query it worked with no problem: PREFIX fn: <http://www.w3.org/2005/xpath-functions#>

Aggregates To test aggregates, the spec's example works, but I added the following two lines to the end of the example's data file so that org2's author had a book with a price greater than 10: :auth3 :writesBook :book5 . :book5 :price 17 . This helped to demonstrate the GROUP BY part of the query better. This helped to demonstrate the GROUP BY part of the query better.

Negation The MINUS keyword and the ability to use the NOT operator with EXISTS both provide a cleaner alternative to the FILTER(!bound(?varName)) trick used in SPARQL 1.0 to make missing values part of the retrieval criteria. Lee has a slide on MINUS, but not on NOT EXISTS. I tried NOT EXISTS as well because it's new and is grouped together with MINUS in the spec. The spec even has a subsection on the relationship and difference between NOT EXISTS and MINUS. Using ARQ, the spec's examples for both MINUS and NOT EXISTS worked just fine.

Property paths The spec only has a placeholder for this for now, but when I made up my own example after looking at Lee's slide it worked fine. Here's my sample data: @prefix : <http://rdfdata.org/whatever#> . :jane :knows :frank . :frank :knows :sarah . :sarah :knows :steve . The query asks for everyone that jane knows and whoever they know, transitively. PREFIX : <http://rdfdata.org/whatever#> SELECT ?person WHERE { :jane :knows+ ?person . } I may not have perfectly described the semantics of what that plus sign does here (an asterisk is another option), but you get the idea when you see the result: ---------- | person | ========== | :frank | | :sarah | | :steve | ---------- This will let SPARQL-based applications do even more without needing an OWL inference engine, especially when used with the rdfs:subClassOf property.

Federated queries and subqueries SPARQL 1.1 uses the same syntax for these that Jena (the framework behind ARQ) always had as an extension, so I've demonstrated these before in my Federated SPARQL queries blog entry of last January.