README.md in sparql-1.0.8 vs README.md in sparql-1.1.0p0

- old
+ new

@@ -7,13 +7,15 @@ [![Build Status](https://travis-ci.org/ruby-rdf/sparql.png?branch=master)](http://travis-ci.org/ruby-rdf/sparql) ## Features * 100% free and unencumbered [public domain](http://unlicense.org/) software. -* [SPARQL 1.0][] query parsing and execution -* Limited [SPARQL 1.1][] query parsing and execution -* SPARQL results as [XML][SPARQL XML], [JSON][SPARQL JSON] or HTML. +* [SPARQL 1.1 Query][] parsing and execution (excluding [Property Paths][]) +* SPARQL results as [XML][SPARQL XML], [JSON][SPARQL JSON], + [CSV][SPARQL 1.1 Query Results CSV and TSV Formats], + [TSV][SPARQL 1.1 Query Results CSV and TSV Formats] + or HTML. * SPARQL CONSTRUCT or DESCRIBE serialized based on Format, Extension of Mime Type using available RDF Writers (see [Linked Data][]) * SPARQL Client for accessing remote SPARQL endpoints. * [Rack][] and [Sinatra][] middleware to perform [HTTP content negotiation][conneg] for result formats * Compatible with any [Rack][] or [Sinatra][] application and any Rack-based framework. @@ -22,37 +24,53 @@ * Compatible with older Ruby versions with the help of the [Backports][] gem. * Supports Unicode query strings both on all versions of Ruby. ## Description -The {SPARQL} gem implements the [SPARQL 1.0][] using the [SPARQL 1.1][] grammar, -and provides [Rack][] and [Sinatra][] +The {SPARQL} gem implements [SPARQL 1.1 Query][], and provides [Rack][] and [Sinatra][] middleware to provide results using [HTTP Content Negotiation][conneg]. -* {SPARQL::Grammar} implements a [SPARQL 1.1][] parser generating [SPARQL S-Expressions (SSE)][SSE]. - * [SPARQL 1.1][] capabilities beyond [SPARQL 1.0][] are not yet supported. - See the section on [SPARQL 1.1][] extensions and limitations for further detail. +* {SPARQL::Grammar} implements a [SPARQL 1.1 Query][] parser generating [SPARQL S-Expressions (SSE)][SSE]. + * Support for [Property Paths][] is excluded. + See the section on [SPARQL 1.1 Query][] extensions and limitations for further detail. * {SPARQL::Algebra} executes SSE against Any `RDF::Graph` or `RDF::Repository`, including compliant [RDF.rb][] repository adaptors such as [RDF::DO][] and [RDF::Mongo][]. * {Rack::SPARQL} and {Sinatra::SPARQL} provide middleware components to format results using an appropriate format based on [HTTP content negotiation][conneg]. -### [SPARQL 1.1][] Extensions and Limitations -The {SPARQL} gem uses the [SPARQL 1.1][] {file:etc/sparql11.bnf EBNF grammar}, which provides +### [SPARQL 1.1 Query][] Extensions and Limitations +The {SPARQL} gem uses the [SPARQL 1.1 Query][] {file:etc/sparql11.bnf EBNF grammar}, which provides much more capability than [SPARQL 1.0][], but has a few limitations: * The format for decimal datatypes has changed in [RDF 1.1][]; they may no longer have a trailing ".", although they do not need a leading digit. -* BNodes may now include extended characters, including ".". As a consequence, BNodes - used in the object position, where the statement or pattern is terminated by a "." - must contain whitespace separating the BNode label, and the ".". +* BNodes may now include extended characters, including ".". -The SPARQL gem now implements the following [SPARQL 1.1][] operations: +The SPARQL gem now implements the following [SPARQL 1.1 Query][] operations: -* Support for all [functions](http://www.w3.org/TR/sparql11-query/#SparqlOps). -* Support for [BIND](http://www.w3.org/TR/sparql11-query/#bind) +* [Functions](http://www.w3.org/TR/sparql11-query/#SparqlOps) +* [BIND](http://www.w3.org/TR/sparql11-query/#bind) +* [GROUP BY](http://www.w3.org/TR/sparql11-query/#groupby) +* [Aggregates](http://www.w3.org/TR/sparql11-query/#aggregates) +* [Subqueries](http://www.w3.org/TR/sparql11-query/#subqueries) +* [Inline Data](http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#inline-data) +* [Inline Data](http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#inline-data) +* [Exists](http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#func-filter-exists) +* [Negation](http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#negation) +The only major area of [SPARQL 1.1 Query][] missing is +[Property Paths][], which +will be in later release along with: + +* [Update][SPARQL 1.1 Update], +* [Federated Query][SPARQL 1.1 Federated Query], +* [Entailment Regimes][SPARQL 1.1 Entailment Regimes], +* [Protocol][SPARQL 1.1 Protocol], and +* [Graph Store HTTP Protocol][SPARQL 1.1 Graph Store HTTP Protocol] + +either in this, or related gems. + ### SPARQL Extension Functions Extension functions may be defined, which will be invoked during query evaluation. For example: # Register a function using the IRI <http://rubygems.org/gems/sparql#crypt> crypt_iri = RDF::URI("http://rubygems.org/gems/sparql#crypt") @@ -69,22 +87,25 @@ { [ schema:email ?email] BIND(rsp:crypt(?email) AS ?crypted) } +See {SPARQL::Algebra::Expression.register_extension} for details. + ### Middleware -`Rack::SPARQL` is a superset of [Rack::LinkedData][] to allow content negotiated results +{Rack::SPARQL} is a superset of [Rack::LinkedData][] to allow content negotiated results to be returned any `RDF::Enumerable` or `RDF::Query::Solutions` compatible results. You would typically return an instance of `RDF::Graph`, `RDF::Repository` or `RDF::Query::Solutions` from your Rack application, and let the `Rack::SPARQL::ContentNegotiation` middleware take care of serializing your response into whatever format the HTTP client requested and understands. -`Sinatra::SPARQL` is a thin Sinatra-specific wrapper around the +{Sinatra::SPARQL} is a thin Sinatra-specific wrapper around the {Rack::SPARQL} middleware, which implements SPARQL - content negotiation for Rack applications. + content negotiation for Rack applications. {Sinatra::SPARQL} also supports + [SPARQL 1.1 Service Description][]. The middleware queries [RDF.rb][] for the MIME content types of known RDF serialization formats, so it will work with whatever serialization plugins that are currently available for RDF.rb. (At present, this includes support for N-Triples, N-Quads, Turtle, RDF/XML, RDF/JSON, JSON-LD, RDFa, TriG and TriX.) @@ -100,12 +121,12 @@ Queries using datasets are re-written to use the identified graphs for `FROM` and `FROM NAMED` by filtering the results, allowing the use of a repository that contains many graphs without confusing information. ### Result formats `SPARQL.serialize_results` may be used on it's own, or in conjunction with {Rack::SPARQL} or {Sinatra::SPARQL} -to provide content-negotiated query results. For basic `SELECT` and `ASK` this includes HTML, XML and JSON formats. -`DESCRIBE` and `CONSTRUCT` create an `RDF::Graph`, which can be serialized through [HTTP Content Netogiation][conneg] +to provide content-negotiated query results. For basic `SELECT` and `ASK` this includes HTML, XML, CSV, TSV and JSON formats. +`DESCRIBE` and `CONSTRUCT` create an `RDF::Graph`, which can be serialized through [HTTP Content Negotiation][conneg] using available RDF writers. For best results, require [Linked Data][] to enable a full set of RDF formats. ## Examples @@ -210,12 +231,12 @@ * {Rack::SPARQL::ContentNegotiation} ## Dependencies * [Ruby](http://ruby-lang.org/) (>= 1.9.2) -* [RDF.rb](http://rubygems.org/gems/rdf) (>= 1.1) -* [SPARQL::Client](https://rubygems.org/gems/sparql-client) (>= 1.0) +* [RDF.rb](http://rubygems.org/gems/rdf) (>= 1.0.7) +* [SPARQL::Client](https://rubygems.org/gems/sparql-client) (>= 1.0.3) * [SXP](https://rubygems.org/gems/sxp) (>= 0.1.0) * [Builder](https://rubygems.org/gems/builder) (>= 3.0.0) * [JSON](https://rubygems.org/gems/json) (>= 1.5.1) * Soft dependency on [Linked Data][] (>= 1.0) * Soft dependency on [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.5.0) @@ -279,22 +300,33 @@ [PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html [SPARQL]: http://en.wikipedia.org/wiki/SPARQL [SPARQL 1.0]: http://www.w3.org/TR/rdf-sparql-query/ [SPARQL 1.0 tests]:http://www.w3.org/2001/sw/DataAccess/tests/ [SPARQL 1.1 tests]: http://www.w3.org/2009/sparql/docs/tests/ -[SPARQL 1.1]: http://www.w3.org/TR/sparql11-query/ [SSE]: http://openjena.org/wiki/SSE [SXP]: http://sxp.rubyforge.org/ [grammar]: http://www.w3.org/TR/rdf-sparql-query/#grammar [RDF 1.1]: http://www.w3.org/TR/rdf11-concepts [RDF.rb]: http://rdf.rubyforge.org/ [Backports]: http://rubygems.org/gems/backports [Linked Data]: http://rubygems.org/gems/linkeddata [SPARQL doc]: http://rubydoc.info/github/ruby-rdf/sparql/frames [SPARQL XML]: http://www.w3.org/TR/rdf-sparql-XMLres/ [SPARQL JSON]: http://www.w3.org/TR/rdf-sparql-json-res/ -[SPARQL Protocol]: http://www.w3.org/TR/rdf-sparql-protocol/ +[Property Paths]: http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#propertypaths + [SSD]: http://www.w3.org/TR/sparql11-service-description/ [Rack]: http://rack.rubyforge.org/ [Sinatra]: http://www.sinatrarb.com/ [conneg]: http://en.wikipedia.org/wiki/Content_negotiation + +[SPARQL 1.1 Query]: http://www.w3.org/TR/sparql11-query/ +[SPARQL 1.1 Update]: http://www.w3.org/TR/sparql11-update/ +[SPARQL 1.1 Service Description]: http://www.w3.org/TR/sparql11-service-description/ +[SPARQL 1.1 Federated Query]: http://www.w3.org/TR/sparql11-federated-query/ +[SPARQL 1.1 Query Results JSON Format]: http://www.w3.org/TR/sparql11-results-json/ +[SPARQL 1.1 Query Results CSV and TSV Formats]: http://www.w3.org/TR/sparql11-results-csv-tsv/ +[SPARQL Query Results XML Format]: http://www.w3.org/TR/rdf-sparql-XMLres/ +[SPARQL 1.1 Entailment Regimes]: http://www.w3.org/TR/sparql11-entailment/ +[SPARQL 1.1 Protocol]: http://www.w3.org/TR/sparql11-protocol/ +[SPARQL 1.1 Graph Store HTTP Protocol]: http://www.w3.org/TR/sparql11-http-rdf-update/