W3C

SPARQL 1.1 Protocol for RDF

W3C Working Draft 26 January 2010

This version:
http://www.w3.org/TR/2010/WD-sparql11-protocol-20100126/
Latest version:
http://www.w3.org/TR/sparql11-protocol/
Previous version:
http://www.w3.org/TR/2009/WD-sparql11-protocol-20091022/
Editors:
David Charboneau, IBM Corporation <dcharbon@us.ibm.com>
Lee Feigenbaum, Cambridge Semantics <lee@thefigtrees.net>
Previous Editors:
Simon Johnston, IBM Corporation <skjohn@us.ibm.com>
Kendall Grant Clark, 1st Edition, Clark & Parsia LLC <kendall@monkeyfist.com>
Elias Torres, 1st Edition, IBM Corporation <eliast@us.ibm.com>

Abstract

The SPARQL Protocol and RDF Query Language (SPARQL) is a query language and protocol for RDF. This document specifies the SPARQL Protocol; it uses WSDL 2.0 to describe a means for conveying SPARQL queries to an SPARQL query processing service and returning the query results to the entity that requested them. This protocol was developed by the W3C SPARQL Working Group, part of the Semantic Web Activity as described in the activity statement .

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This is a Working Draft.

Signifiant changes since the previously published Working Draft are:

Comments on this document should be sent to public-rdf-dawg-comments@w3.org, a mailing list with a public archive. Questions and comments about SPARQL that are not related to this specification, including extensions and features, can be discussed on the mailing list public-sparql-dev@w3.org, (public archive).

This document was produced by the SPARQL Working Group, which is part of the W3C Semantic Web Activity.

No Endorsement

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

Patents

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1 Introduction
2 SPARQL Protocol
    2.1 SparqlProtocol Interface
        2.1.1 query operation
            2.1.1.1 Query In Message
                2.1.1.1.1 Specifying an RDF Dataset
                2.1.1.1.2 Resolving an Ambiguous RDF Dataset
                2.1.1.1.3 Rejecting Query Requests to RDF Datasets
                2.1.1.1.4 Determining the Base IRI
            2.1.1.2 Query Out Message
            2.1.1.3 Query Fault Messages
                2.1.1.3.1 MalformedQuery
                2.1.1.3.2 QueryRequestRefused
        2.1.2 update operation
            2.1.2.1 Update In Message
            2.1.2.2 Update Out Message
            2.1.2.3 Update Fault Messages
                2.1.2.3.1 MalformedUpdate
                2.1.2.3.2 UpdateRequestRefused
                2.1.2.3.3 GraphDoesNotExist
                2.1.2.3.4 GraphAlreadyExists
    2.2 HTTP Bindings
        2.2.1 HTTP Bindings for SPARQL Query
            2.2.1.1 queryHttpGet
            2.2.1.2 queryHttpPost
            2.2.1.3 HTTP Examples for SPARQL Query
                2.2.1.3.1 SELECT with service-supplied RDF dataset
                2.2.1.3.2 SELECT with simple RDF dataset
                2.2.1.3.3 CONSTRUCT with simple RDF dataset and HTTP content negotiation
                2.2.1.3.4 ASK with simple RDF dataset
                2.2.1.3.5 DESCRIBE with simple RDF dataset
                2.2.1.3.6 SELECT with complex RDF dataset
                2.2.1.3.7 SELECT with query-only RDF dataset
                2.2.1.3.8 SELECT with ambiguous RDF dataset
                2.2.1.3.9 SELECT with malformed query fault
                2.2.1.3.10 SELECT with query request refused fault
                2.2.1.3.11 Very long SELECT query using POST binding
                2.2.1.3.12 SELECT with internationalization
        2.2.2 HTTP Bindings for SPARQL Update
            2.2.2.1 HTTP Examples for SPARQL Update
    2.3 Other Bindings
3 Policy Considerations
    3.1 Security
4 Conformance
5 Changes Since Previous Recommendation

Appendices

A References
    A.1 Normative References
    A.2 Other References
B CVS History


1 Introduction

This document (which refers to itself as "SPARQL 1.1 Protocol for RDF") describes the SPARQL Protocol, a means of conveying SPARQL queries and updates from clients to query processors. SPARQL Protocol has been designed for compatibility with the SPARQL 1.1 Query Language [SPARQL] and with the SPARQL 1.1 Update Language for RDF. SPARQL Protocol is described in two ways: first, as an abstract interface independent of any concrete realization, implementation, or binding to another protocol; second, as an HTTP binding of this interface. This document, as well as the associated WSDL and W3C XML Schema documents, are primarily intended for software developers interested in implementing SPARQL query and update services and clients.

When this document uses the words must, must not, should, should not, may and recommended, and the words appear as emphasized text, they must be interpreted as described in RFC 2119 [RFC2119].

When this document contains excerpts from other documents, including WSDL and XML Schema instances, it uses the following namespace prefixes and namespace URIs:

PrefixNamespace URI
sthttp://www.w3.org/2005/09/sparql-protocol-types/#
xshttp://www.w3.org/2001/XMLSchema
vbrhttp://www.w3.org/2005/sparql-results#
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
whttphttp://www.w3.org/ns/wsdl/http
wsoaphttp://www.w3.org/ns/wsdl/soap
soaphttp://www.w3.org/2003/05/soap-envelope
wsdlxhttp://www.w3.org/ns/wsdl-extensions
tnshttp://www.w3.org/2005/08/sparql-protocol-query/#

2 SPARQL Protocol

This set of documents comprises the specification of the SPARQL Protocol:

SPARQL 1.1 Protocol for RDF
The current document which normatively specifies the SPARQL 1.1 Protocol for RDF in human-readable language.
SPARQL 1.1 Protocol for RDF WSDL 2.0 Description
The normative description of the SPARQL Protocol using WSDL 2.0.
SPARQL 1.1 Protocol for RDF Types
The XML Schema document that normatively defines the types used in SPARQL Protocol.

SPARQL Protocol contains one interface, SparqlProtocol, which in turn contains two operations, Query and update. SPARQL Protocol is described abstractly with WSDL 2.0 [WSDL2] in terms of a web service that implements its interface, types, faults, and operations, as well as by HTTP bindings. Note that while this document uses WSDL 2.0 to describe SPARQL Protocol, there is no obligation on the part of any implementation to use any particular implementation strategy, including the use of any WSDL library or programming language framework.

2.1 SparqlProtocol Interface

SparqlProtocol is the protocol's only interface. It contains two operations, the first of which is Query, and is used to convey a SPARQL query string and, optionally, an RDF dataset description. Secondly the update operation is used to convey a SPARQL update string.

<!-- Abstract SparqlProtocol Interface -->
<interface name="SparqlProtocol" styleDefault="http://www.w3.org/ns/wsdl/style/iri">

   <!-- the Interface Faults -->
      <!-- query faults -->
   <fault name="MalformedQuery" element="st:malformed-query"/>
   <fault name="QueryRequestRefused" element="st:query-request-refused"/>
   
     <!-- update faults -->
   <fault name="MalformedUpdate" element="st:malformed-update"/>
   <fault name="GraphDoesNotExist" element="graph-does-not-exist"/>
   <fault name="GraphAlreadyExists" element="graph-already-exists"/>
   <fault name="UpdateRequestRefused" element="query-request-refused"/>
   
   <!-- the Query Operation -->
   <operation name="query" pattern="http://www.w3.org/ns/wsdl/in-out">

      <documentation>The operation is used to convey queries and their results from clients to services and back
      again.</documentation>

      <input messageLabel="In" element="st:query-request"/>
      <output messageLabel="Out" element="st:query-result"/>

      <!-- the interface faults are out faults -->
      <outfault ref="tns:MalformedQuery" messageLabel="Out"/>
      <outfault ref="tns:QueryRequestRefused" messageLabel="Out"/>
   </operation>

   <!-- the Update Operation -->
   <operation name="update" pattern="http://www.w3.org/ns/wsdl/robust-in-only">

      <documentation>The operation is used to convey RDF updates in SPARQL Update from clients to services.</documentation>

      <input messageLabel="In" element="st:update-request"/>
      
      <!-- the interface faults are out faults -->
      <outfault ref="tns:MalformedUpdate"/>
      <outfault ref="tns:GraphDoesNotExist"/>
      <outfault ref="tns:GraphAlreadyExists"/>
      <outfault ref="tns:UpdateRequestRefused"/>
   </operation>

</interface>

Excerpt 1.0 WSDL 2.0 fragment

2.1.1 query operation

The query operation is described as an In-Out message exchange pattern [WSDL-Adjuncts]. The constraints of an In-Out message exchange pattern are as follows:

This pattern consists of exactly two messages, in order, as follows:

  1. A message:

    • indicated by a Interface Message Reference component whose {message label} is "In" and {direction} is "in"

    • received from some node N

  2. A message:

    • indicated by a Interface Message Reference component whose {message label} is "Out" and {direction} is "out"

    • sent to node N

This pattern uses the rule 2.2.1 Fault Replaces Message.

2.1.1.1 Query In Message

Abstractly, the contents of the In Message of SparqlProtocol's query operation is an instance of an XML Schema complex type, called st:query-request in Excerpt 1.0, composed of two further parts: one SPARQL query string; and zero or one RDF dataset descriptions. The SPARQL query string, identified by one Query type, is defined by [SPARQL] as "a sequence of characters in the language defined by the [SPARQL] grammar, starting with the Query production". The RDF dataset description is composed of zero or one default RDF graphs — composed by the RDF merge of the RDF graphs identified by zero or more default-graph-uri types — and by zero or more named RDF graphs, identified by zero or more named-graph-uri types. These correspond to the FROM and FROM NAMED keywords in [SPARQL], respectively.

These types are defined in the following XML Schema fragment, from protocol-types.xsd:

<xs:element name="query-request">
  <xs:complexType>
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="query" type="xs:string">
       <xs:annotation>
	      <xs:documentation>query is an xs:string constrained by the language definition,
         http://www.w3.org/TR/rdf-sparql-query/#grammar, as "a sequence of characters in 
         the language defined by the [SPARQL] grammar, starting with the Query production".</xs:documentation>
       </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="default-graph-uri" type="xs:anyURI"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="named-graph-uri" type="xs:anyURI"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

Excerpt 1.1 XML Schema fragment showing query-request type

2.1.1.1.1 Specifying an RDF Dataset

The RDF dataset may be specified either in a [SPARQL] query using FROM and FROM NAMED keywords; or it may be specified in the protocol described in this document; or it may be specified in both the query string and in the protocol.

2.1.1.1.2 Resolving an Ambiguous RDF Dataset

In the case where both the query and the protocol specify an RDF dataset, but not the identical RDF dataset, the dataset specified in the protocol must be the RDF dataset consumed by SparqlProtocol's query operation.

2.1.1.1.3 Rejecting Query Requests to RDF Datasets

A conformant SPARQL 1.1 Protocol service may provide a default RDF dataset against which SPARQL query requests are executed in cases where there is no RDF dataset specified in the protocol or in the query request. A conformant SPARQL Protocol service may refuse to process any query request that does not specify an RDF dataset. Finally, a conformant SPARQL Protocol service may refuse to process any query request against any specified RDF dataset. See 2.1.1.3.2 Query Fault Messages, QueryRequestRefused.

2.1.1.1.4 Determining the Base IRI

The BASE keyword in the query string defines the Base IRI used to resolve relative IRIs per Uniform Resource Identifier (URI): Generic Syntax [RFC3986] section 5.1.1, "Base URI Embedded in Content". Section 5.1.2, "Base URI from the Encapsulating Entity" defines how the Base IRI may come from an encapsulating document, such as a SOAP envelope with an xml:base directive. The SPARQL Protocol does not dereference query URIs so section 5.1.3 does not apply. Finally, per section 5.1.4, SPARQL Protocol services must define their own base URI, which may be the service invocation URI.

2.1.1.2 Query Out Message

Abstractly, the contents of the Out Message of SparqlProtocol's query operation is an instance of an XML Schema complex type, called query-result in Excerpt 1.2, composed of either:

  1. a SPARQL Results Document [SRD] (for SPARQL Query for RDF query forms SELECT and ASK); or,
  2. an RDF graph [RDF-Concepts] serialized, for example, in the RDF/XML syntax [RDF-Syntax], or an equivalent RDF graph serialization, for SPARQL Query for RDF query forms DESCRIBE and CONSTRUCT).

The query-result type is defined in this W3C XML Schema fragment, from protocol-types.xsd:

<xs:element name="query-result">
      <xs:annotation>
          <xs:documentation>The type for serializing query results,
          either as XML or RDF/XML.</xs:documentation>
      </xs:annotation>
      <xs:complexType>
          <xs:choice>
              <xs:element maxOccurs="1" ref="vbr:sparql"/>
              <xs:element maxOccurs="1" ref="rdf:RDF"/>
          </xs:choice>
      </xs:complexType>
</xs:element>

Excerpt 1.2 protocol-types.xsd XML Schema fragment showing query-result type

2.1.1.3 Query Fault Messages

[WSDL2-Adjuncts] defines several fault propagation rules which specify how operation faults and messages interact. The Query operation employs the Fault Replaces Message rule:

Any message after the first in the pattern may be replaced with a fault message, which must have identical direction. The fault message must be delivered to the same target node as the message it replaces, unless otherwise specified by an extension or binding extension. If there is no path to this node, the fault must be discarded.

Thus, the query operation contained in the SparqlQuery interface may return, in place of the Out Message, either the MalformedQuery message or the QueryRequestRefused message, both of which are defined in this XML Schema fragment from protocol-types.xsd:

<xs:element type="xs:string" name="fault-details">
    <xs:annotation>
      <xs:documentation> This element contains human-readable information about the fault
        returned by the SPARQL query processing service.</xs:documentation>
    </xs:annotation>
  </xs:element>
    <xs:element name="malformed-query">
      <xs:complexType>
          <xs:all><xs:element minOccurs="0" maxOccurs="1" ref="st:fault-details"/></xs:all>
      </xs:complexType>
  </xs:element>
  <xs:element name="query-request-refused">
      <xs:complexType>
          <xs:all><xs:element minOccurs="0" maxOccurs="1" ref="st:fault-details"/></xs:all>
      </xs:complexType>

</xs:element>

Excerpt 1.3 XML Schema fragment showing fault-details type

When the update operation returns one of the fault messages, query processing services must include explanatory, debugging, or other additional information for human consumption via the fault-details type defined in Excerpt 1.3.

2.1.1.3.1 MalformedQuery

When the value of the query type is not a legal sequence of characters in the language defined by the SPARQL grammar, the MalformedQuery or QueryRequestRefused fault message must be returned. According to the Fault Replaces Message Rule, if a WSDL fault is returned, including MalformedQuery, an Out Message must not be returned.

2.1.1.3.2 QueryRequestRefused

This WSDL fault message should be returned when a client submits a request that the service refuses to process. The QueryRequestRefused fault message neither indicates whether the server may or may not process a subsequent, identical request or requests, nor does it constrain a conformant SPARQL service from returning other HTTP status codes or HTTP headers as appropriate given the semantics of [HTTP].

2.1.2 update operation

The update operation is described as an In-Out message exchange pattern.

2.1.2.1 Update In Message

Abstractly, the contents of the In Message of SparqlProtocol's update operation is an instance of an XML Schema complex type, called st:update-request, composed of one further part: one SPARQL update string. The SPARQL update string, identified by one update type, is defined by [SPARQL] as "a sequence of characters in the language defined by the [SPARQLUpdate] grammar, starting with the SPARQLUpdate production".

2.1.2.2 Update Out Message
Editorial note 
The Working Group has not yet determined the structure of an Update out message, if any.
2.1.2.3 Update Fault Messages
Editorial note 
The final set of Update Fault Messages will largely depend on error conditions defined by the SPARQL 1.1 Update specification.

[WSDL2-Adjuncts] defines several fault propagation rules which specify how operation faults and messages interact. The update operation employs the Message Triggers Fault rule:

When the Message Triggers Fault propagation rule is in effect, any message, including the first in the pattern, MAY trigger a fault message, which must have opposite direction. The fault message must be delivered to the originator of the triggering message, unless otherwise specified by an extension or binding extension. Any node MAY propagate a fault message, and must not do so more than once for each triggering message. If there is no path to the originator, the fault must be discarded.

Thus, in the case of a fault the update operation contained in the SparqlProtocol interface may return the MalformedUpdate message, the UpdateRequestRefused message, the GraphDoesNotExist message or the GraphAlreadyExists message, all of which are defined in this XML Schema fragment from protocol-types.xsd:

<xs:element type="xs:string" name="fault-details">
    <xs:annotation>
      <xs:documentation>This element contains human-readable information about the fault
        returned by the SPARQL query processing service.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="malformed-update">
    <xs:complexType>
      <xs:all>
	<xs:element minOccurs="0" maxOccurs="1" ref="st:fault-details"/>
      </xs:all>
    </xs:complexType>
  </xs:element>
  <xs:element name="graph-does-not-exist">
    <xs:complexType>
      <xs:all>
	<xs:element minOccurs="0" maxOccurs="1" ref="st:fault-details"/>
      </xs:all>
    </xs:complexType>
  </xs:element>
  <xs:element name="graph-already-exists">
    <xs:complexType>
      <xs:all>
	<xs:element minOccurs="0" maxOccurs="1" ref="st:fault-details"/>
      </xs:all>
    </xs:complexType>
	</xs:element>
	<xs:element name="update-request-refused">
    <xs:complexType>
      <xs:all>
        <xs:element minOccurs="0" maxOccurs="1" ref="st:fault-details"/>
      </xs:all>
    </xs:complexType>
  </xs:element>

Excerpt 1.4 XML Schema fragment showing update fault types

When the update operation returns one of the fault messages, query processing services must include explanatory, debugging, or other additional information for human consumption via the fault-details type defined in Excerpt 1.4.

2.1.2.3.1 MalformedUpdate

When the value of the update type is not a legal sequence of characters in the language defined by the SPARQLUpdate grammar, the MalformedUpdate or UpdateRequestRefused fault message must be returned.

2.1.2.3.2 UpdateRequestRefused

This WSDL fault message should be returned when a client submits a request that the service refuses to process. The UpdateRequestRefused fault message does not indicate whether the server may or may not process a subsequent, identical request or requests, nor does it constrain a conformant SPARQL service from returning other HTTP status codes or HTTP headers as appropriate given the semantics of [HTTP].

2.1.2.3.3 GraphDoesNotExist

This WSDL fault message should be returned when a client submits a request that generates an error in executing the update due to a specified graph not existing in the dataset being updated. The GraphDoesNotExist fault message does not constrain a conformant SPARQL service from returning other HTTP status codes or HTTP headers as appropriate given the semantics of [HTTP].

2.1.2.3.4 GraphAlreadyExists

This WSDL fault message should be returned when a client submits a request that generates an error in executing the update due to a specified graph already existing in the dataset being updated. The GraphAlreadyExists fault message does not constrain a conformant SPARQL service from returning other HTTP status codes or HTTP headers as appropriate given the semantics of [HTTP].

2.2 HTTP Bindings

The SparqlProtocol interface operations described thus far (Query and update) are abstract operations; they require protocol bindings to become invocable operations. The next section of this document describes HTTP bindings for these operations. A conformant SPARQL Protocol service must support the SparqlProtocol interface; if a SPARQL Protocol service supports HTTP bindings, it must support the bindings as described in protocol-query.wsdl. A SPARQL Protocol service may support other interfaces.

2.2.1 HTTP Bindings for SPARQL Query

[WSDL2-Adjuncts] defines a means of binding abstract interface operations to HTTP. The HTTP bindings for the query operation (from protocol-query.wsdl) are as follows:

<!-- the HTTP GET binding for query operation -->
 <binding name="queryHttpGet" interface="tns:SparqlProtocol" 
	    type="http://www.w3.org/2006/01/wsdl/http"
	    whttp:version="1.1">

   <fault ref="tns:MalformedQuery" whttp:code="400"/>
   <fault ref="tns:QueryRequestRefused" whttp:code="500"/>

   <operation ref="tns:query"
        wsdlx:safe="true"
		whttp:method="GET"
		whttp:faultSerialization="*/*"
		whttp:inputSerialization="application/x-www-form-urlencoded"
		whttp:outputSerialization="application/sparql-results+xml, application/rdf+xml, */*" />
 </binding>

 <!-- the HTTP POST binding for query operation -->
 <binding name="queryHttpPost" interface="tns:SparqlProtocol"
		 type="http://www.w3.org/2006/01/wsdl/http"
		 whttp:version="1.1">
		
	  <fault ref="tns:MalformedQuery" whttp:code="400"/>
	  <fault ref="tns:QueryRequestRefused" whttp:code="500"/>
		
   <operation ref="tns:query" 
        wsdlx:safe="true"
 		whttp:method="POST" 
		whttp:faultSerialization="*/*"
		whttp:inputSerialization="application/x-www-form-urlencoded, application/xml"
		whttp:outputSerialization="application/sparql-results+xml, application/rdf+xml, */*" />	
 </binding>

There are two HTTP bindings, queryHttpGet and queryHttpPost, both of which are described as bindings of the SparqlProtocol interface. In each of these bindings, the two faults described in SparqlProtocol interface, MalformedQuery and QueryRequestRefused, are bound to HTTP status codes 400 Bad Request and 500 Internal Server Error, respectively [HTTP].

The queryHttpGet binding should be used except in cases where the URL-encoded query exceeds practical limits, in which case the queryHttpPost binding should be used.

An Informative Note About Serialization Constraints. The output serialization of the queryHttpGet and queryHttpPost bindings is intentionally under constrained in order to reflect the variety of serialization types of RDF graphs. The fault serialization of queryHttpGet and queryHttpPost is also intentionally under constrained. A conformant SPARQL Protocol service can provide alternative WSDL interfaces and bindings with different constraints.

2.2.1.1 queryHttpGet

This binding of the query operation uses [HTTP] GET with the following serialization type constraints: the value of whttp:faultSerialization is */*; second, the value of whttp:inputSerialization is application/x-www-form-urlencoded with UTF-8 encoding; and, third, the whttp:outputSerialization is application/sparql-results+xml with UTF-8 encoding, application/rdf+xml with UTF-8 encoding, and */*.

2.2.1.2 queryHttpPost

This binding of the query operation uses [HTTP] POST with the following serialization type constraints: the value of whttp:faultSerialization is */*; second, the value of whttp:inputSerialization is application/x-www-form-urlencoded with UTF-8 encoding and application/xml with UTF-8 encoding; and, third, the whttp:outputSerialization is application/sparql-results+xml with UTF-8 encoding, application/rdf+xml with UTF-8 encoding, and */*.

2.2.1.3 HTTP Examples for SPARQL Query

The following abstract HTTP trace examples illustrate invocation of the query operation under several different scenarios. These example traces are abstracted from complete HTTP traces in three ways: (1) In each example the string "EncodedQuery" represents the URL-encoded string equivalent of the SPARQL query given in the first block of each example; (2) only partial response bodies, containing the query results, are displayed; (3) the URI values of default-graph-uri and named-graph-uri are also not URL-encoded.

2.2.1.3.1 SELECT with service-supplied RDF dataset

This SPARQL query

PREFIX dc: <http://purl.org/dc/elements/1.1/> 
SELECT ?book ?who 
WHERE { ?book dc:creator ?who }

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated in this HTTP trace:

GET /sparql/?query=EncodedQuery HTTP/1.1
Host: www.example
User-agent: my-sparql-client/0.1

That query against the service-supplied RDF dataset, executed by that SPARQL query service, returns the following query result:

HTTP/1.1 200 OK
Date: Fri, 06 May 2005 20:55:12 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type: application/sparql-results+xml

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">

 <head>
   <variable name="book"/>
   <variable name="who"/>
 </head>
 <results distinct="false" ordered="false">
   <result>
     <binding name="book"><uri>http://www.example/book/book5</uri></binding>
     <binding name="who"><bnode>r29392923r2922</bnode></binding>
   </result>
...
</sparql> 
2.2.1.3.2 SELECT with simple RDF dataset

This SPARQL query

PREFIX dc: <http://purl.org/dc/elements/1.1/> 
SELECT ?book ?who 
WHERE { ?book dc:creator ?who }

is conveyed to the SPARQL query service, http://www.other.example/sparql/, as illustrated in this HTTP trace:

GET /sparql/?query=EncodedQuery&default-graph-uri=http://www.other.example/books HTTP/1.1
Host: www.other.example
User-agent: my-sparql-client/0.1

That query — against the RDF dataset identified by the value of the default-graph-uri parameter, http://www.other.example/books — executed by that SPARQL query service, returns the following query result:

HTTP/1.1 200 OK
Date: Fri, 06 May 2005 20:55:12 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type: application/sparql-results+xml

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
 <head>
   <variable name="book"/>
   <variable name="who"/>
 </head>
...
</sparql> 
2.2.1.3.3 CONSTRUCT with simple RDF dataset and HTTP content negotiation

This SPARQL query

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX myfoaf: <http://www.example/jose/foaf.rdf#>

CONSTRUCT { myfoaf:jose foaf:depiction <http://www.example/jose/jose.jpg>.
            myfoaf:jose foaf:schoolHomepage <http://www.edu.example/>.
            ?s ?p ?o.}
WHERE { ?s ?p ?o. myfoaf:jose foaf:nick "Jo".
       FILTER ( ! (?s = myfoaf:kendall && ?p = foaf:knows && ?o = myfoaf:edd ) 
              && ! ( ?s = myfoaf:julia && ?p = foaf:mbox && ?o = <mailto:julia@mail.example> )
	      && ! ( ?s = myfoaf:julia && ?p = rdf:type && ?o = foaf:Person))
}

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated in this HTTP trace:

GET /sparql/?query=EncodedQuery&default-graph-uri=http://www.example/jose-foaf.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Accept: text/turtle, application/rdf+xml

With the response illustrated here:

HTTP/1.1 200 OK
Date: Fri, 06 May 2005 20:55:11 GMT
Server: Apache/1.3.29 (Unix)
Connection: close
Content-Type: text/turtle

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix myfoaf: <http://www.example/jose/foaf.rdf#>.

myfoaf:jose foaf:name "Jose Jimeñez";
	    foaf:depiction <http://www.example/jose/jose.jpg>;
            foaf:nick "Jo";
...

Note: registration for the media type text/turtle was started but not completed at the time of this publication. Please see http://www.w3.org/TeamSubmission/turtle for the final registered media type for the Turtle language.

2.2.1.3.4 ASK with simple RDF dataset

This SPARQL query

PREFIX dc: <http://purl.org/dc/elements/1.1/> 
ASK WHERE { ?book dc:creator "J.K. Rowling"}

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated in this HTTP trace:

GET /sparql/?query=EncodedQuery&default-graph-uri=http://www.example/books HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1

With the response illustrated here:

HTTP/1.1 200 OK
Date: Fri, 06 May 2005 20:48:25 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type: application/sparql-results+xml

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
 <head></head>
 <boolean>true</boolean>
</sparql>
2.2.1.3.5 DESCRIBE with simple RDF dataset

This SPARQL query

PREFIX books: <http://www.example/book/>
DESCRIBE books:book6

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated here:

GET /sparql/?query=EncodedQuery&default-graph-uri=http://www.example/books HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1

With the response illustrated here:

HTTP/1.1 200 OK
Date: Wed, 03 Aug 2005 12:48:25 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type:  application/rdf+xml

<?xml version="1.0"?>
<rdf:RDF ...
  <rdf:Description rdf:about="http://www.example/book/book6">
    <dc:title>Example Book #6 </dc:title>
  </rdf:Description>
</rdf:RDF>
2.2.1.3.6 SELECT with complex RDF dataset

This SPARQL query

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT ?who ?g ?mbox
WHERE {  ?g dc:publisher ?who .
   GRAPH ?g { ?x foaf:mbox ?mbox }
}

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated here (with line breaks for legibility):

GET /sparql/?query=EncodedQuery&default-graph-uri=http://www.example/publishers
&default-graph-uri=http://www.example/morepublishers&named-graph-uri=http://your.example/foaf-alice
&named-graph-uri=http://www.example/foaf-bob&named-graph-uri=http://www.example/foaf-susan
&named-graph-uri=http://this.example/john/foaf
Host: www.example
User-agent: sparql-client/0.1

With the response illustrated here:

HTTP/1.1 200 OK
Date: Wed, 03 Aug 2005 12:48:25 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type:  application/sparql-results+xml

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
  <head>
    <variable name="who"/>
    <variable name="g"/>
    <variable name="mbox"/>
  </head>
...
</sparql>
2.2.1.3.7 SELECT with query-only RDF dataset

This SPARQL query

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT ?who ?g ?mbox
FROM <http://www.example/publishers>
FROM NAMED <http://www.example/alice>
FROM NAMED <http://www.example/bob>
WHERE { ?g dc:publisher ?who .
        GRAPH ?g { ?x foaf:mbox ?mbox }
}

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated in this HTTP trace:

GET /sparql/?query=EncodedQuery HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1

With the response illustrated here:

HTTP/1.1 200 OK
Date: Wed, 03 Aug 2005 12:48:25 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type: application/sparql-results+xml

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
...
</sparql>
2.2.1.3.8 SELECT with ambiguous RDF dataset

This SPARQL query

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT ?who ?g ?mbox
FROM <http://www.example/publishers>
FROM NAMED <http://www.example/john>
FROM NAMED <http://www.example/susan>
WHERE { ?g dc:publisher ?who .
        GRAPH ?g { ?x foaf:mbox ?mbox }
}

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated in this HTTP trace:

GET /sparql/?query=EncodedQuery&default-graph-uri=http://www.example/morepublishers
&named-graph-uri=http://www.example/bob&named-graph-uri=http://www.example/alice HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1

This protocol operation contains an ambiguous RDF dataset: the dataset specified in the query is different than the one specified in the protocol (by way of default-graph-uri and named-graph-uri parameters). A conformant SPARQL Protocol service must resolve this ambiguity by executing the query against the RDF dataset specified in the protocol:

HTTP/1.1 200 OK
Date: Wed, 03 Aug 2005 12:48:25 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type: application/sparql-results+xml

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
  <head>
    <variable name="who"/>
    <variable name="g"/>
    <variable name="mbox"/>
  </head>
  <results ordered="false" distinct="false">
    <result>
      <binding name="who">
      	<literal>Bob Hacker</literal>
      </binding>
      <binding name="g">
	<uri>http://www.example/bob</uri>
      </binding>
      <binding name="mbox">
        <uri>mailto:bob@oldcorp.example</uri>
      </binding>
    </result>
    <result>
      <binding name="who">
	<literal>Alice Hacker</literal>
      </binding>
      <binding name="g">
	<uri>http://www.example/alice</uri>
      </binding>
      <binding name="mbox">
	<uri>mailto:alice@work.example</uri>
      </binding>
    </result>
  </results>
</sparql>
2.2.1.3.9 SELECT with malformed query fault

This syntactically invalid SPARQL query

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE { ?x foaf:name ?name
ORDER BY ?name }

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated in this HTTP trace:

GET /sparql/?query=EncodedQuery&default-graph-uri=http://www.example/morepublishers HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1

With the response — the MalformedQuery fault replacing the Out Message, as per 2.1 Sparql Protocol Interface — illustrated here:

HTTP/1.1 400 Bad Request
Date: Wed, 03 Aug 2005 12:48:25 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type: text/plain; charset=UTF-8

4:syntax error, unexpected ORDER, expecting '}'
2.2.1.3.10 SELECT with query request refused fault

This SPARQL query

PREFIX bio: <http://bio.example/schema/#>
SELECT ?valence
FROM <http://another.example/protein-db.rdf>
WHERE { ?x bio:protein ?valence }
ORDER BY ?valence

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated in this HTTP trace:

GET /sparql/?query=EncodedQuery&default-graph-uri=http://another.example/protein-db.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1

With the response — the QueryRequestRefused fault replacing the Out Message, as per 2.1 Sparql Protocol Interface — illustrated here:

HTTP/1.1 500 Internal Server Error
Date: Wed, 03 Aug 2005 12:48:25 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>SPARQL Processing Service: Query Request Refused</title>
</head>
<body>
<p> Query Request Refused: your request could not be processed because 
 <code>http://another.example/protein-db.rdf</code> could not be retrieved within 
 the time alloted.</p>
</body>
</html>
2.2.1.3.11 Very long SELECT query using POST binding

Some SPARQL queries, perhaps machine generated, may be longer than can be reliably conveyed by way of the HTTP GET binding described in 2.2 HTTP Bindings. In those cases the POST binding described in 2.2.1.2 queryHttpPost may be used. This SPARQL query

PREFIX : <http://www.w3.org/2002/12/cal/icaltzd#>
PREFIX Chi: <http://www.w3.org/2002/12/cal/test/Chiefs.ics#>
PREFIX New: <http://www.w3.org/2002/12/cal/tzd/America/New_York#>
PREFIX XML: <http://www.w3.org/2001/XMLSchema#>

SELECT ?summary
WHERE {
    {
	Chi:D603E2AC-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-09-08T16:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:09:27Z"^^XML:dateTime;
         :dtstart "2002-09-08T13:00:00"^^New:tz;
         :summary ?summary;
         :uid "D603E2AC-C1C9-11D6-9446-003065F198AC" .
   	}
	UNION
    {
	Chi:D603E90B-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-09-15T16:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:10:19Z"^^XML:dateTime;
         :dtstart "2002-09-15T13:00:00"^^New:tz;
         :summary ?summary;
         :uid "D603E90B-C1C9-11D6-9446-003065F198AC" .
   	}
	UNION
    {
	Chi:D603ED6E-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-09-22T16:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:11:05Z"^^XML:dateTime;
         :dtstart "2002-09-22T13:00:00"^^New:tz;
         :summary ?summary;
         :uid "D603ED6E-C1C9-11D6-9446-003065F198AC" .
   	}
	UNION
    {
	Chi:D603F18C-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-09-29T16:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:15:46Z"^^XML:dateTime;
         :dtstart "2002-09-29T13:00:00"^^New:tz;
         :summary ?summary;
         :uid "D603F18C-C1C9-11D6-9446-003065F198AC" .
   	}
	UNION
    {
	Chi:D603F5B7-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-11-04"^^XML:date;
         :dtstamp "2002-09-06T03:12:53Z"^^XML:dateTime;
         :dtstart "2002-11-03"^^XML:date;
         :summary ?summary;
         :uid "D603F5B7-C1C9-11D6-9446-003065F198AC" .
   	}
	UNION
    {
	Chi:D603F9D7-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-11-10T20:15:00"^^New:tz;
         :dtstamp "2002-09-06T03:14:12Z"^^XML:dateTime;
         :dtstart "2002-11-10T17:15:00"^^New:tz;
         :summary ?summary;
         :uid "D603F9D7-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D604022C-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-11-17T17:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:14:51Z"^^XML:dateTime;
         :dtstart "2002-11-17T14:00:00"^^New:tz;
         :summary ?summary;
         :uid "D604022C-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D604065C-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-10-06T19:05:00"^^New:tz;
         :dtstamp "2002-09-06T03:16:54Z"^^XML:dateTime;
         :dtstart "2002-10-06T16:05:00"^^New:tz;
         :summary ?summary;
         :uid "D604065C-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D6040A7E-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-10-13T19:15:00"^^New:tz;
         :dtstamp "2002-09-06T03:17:51Z"^^XML:dateTime;
         :dtstart "2002-10-13T16:15:00"^^New:tz;
         :summary ?summary;
         :uid "D6040A7E-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D6040E96-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-10-20T16:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:18:32Z"^^XML:dateTime;
         :dtstart "2002-10-20T13:00:00"^^New:tz;
         :summary ?summary;
         :uid "D6040E96-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D6041270-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-10-27T17:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:19:15Z"^^XML:dateTime;
         :dtstart "2002-10-27T14:00:00"^^New:tz;
         :summary ?summary;
         :uid "D6041270-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D6041673-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-11-24T20:05:00"^^New:tz;
         :dtstamp "2002-09-06T03:22:09Z"^^XML:dateTime;
         :dtstart "2002-11-24T17:05:00"^^New:tz;
         :summary ?summary;
         :uid "D6041673-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D6041A73-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-12-01T17:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:22:52Z"^^XML:dateTime;
         :dtstart "2002-12-01T14:00:00"^^New:tz;
         :summary ?summary;
         :uid "D6041A73-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D60421EF-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-12-08T17:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:24:04Z"^^XML:dateTime;
         :dtstart "2002-12-08T14:00:00"^^New:tz;
         :summary ?summary;
         :uid "D60421EF-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D6042660-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-12-15T20:05:00"^^New:tz;
         :dtstamp "2002-09-06T03:25:03Z"^^XML:dateTime;
         :dtstart "2002-12-15T17:05:00"^^New:tz;
         :summary ?summary;
         :uid "D6042660-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D6042A93-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-12-22T17:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:25:47Z"^^XML:dateTime;
         :dtstart "2002-12-22T14:00:00"^^New:tz;
         :summary ?summary;
         :uid "D6042A93-C1C9-11D6-9446-003065F198AC" .
    }
	UNION
    {
	Chi:D6042EDF-C1C9-11D6-9446-003065F198AC     a :Vevent;
         :dtend "2002-12-28T21:00:00"^^New:tz;
         :dtstamp "2002-09-06T03:26:51Z"^^XML:dateTime;
         :dtstart "2002-12-28T18:00:00"^^New:tz;
         :summary ?summary;
         :uid "D6042EDF-C1C9-11D6-9446-003065F198AC" .
    }
}

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated in this HTTP trace:

POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 9461

query=EncodedQuery&default-graph-uri=http://another.example/calendar.rdf

With the response illustrated here:

HTTP/1.1 200 OK
Date: Wed, 03 Aug 2005 12:48:25 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.4 DAV/1.0.3
Connection: close
Content-Type: application/sparql-results+xml

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
    <head>
        <variable name="summary"/>
    </head>
    <results ordered="false" distinct="false">
        <result>
            <binding name="summary">
                <literal>Chiefs vs. Cleveland @ Cleveland Stadium</literal>
            </binding>
        </result>
        <result>
            <binding name="summary">
                <literal>Chiefs vs. Jacksonville @ Arrowhead Stadium</literal>
            </binding>
        </result>
        <result>
            <binding name="summary">
                <literal>Chiefs vs. New England @ Gillette Stadium</literal>
            </binding>
        </result>
        ...
        <result>
            <binding name="summary">
                <literal>Chiefs vs. Oakland @ Network Associates Coliseum</literal>
            </binding>
        </result>
    </results>
</sparql>
2.2.1.3.12 SELECT with internationalization

SPARQL queries may include internationalized characters or character sets. This SPARQL query

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

is conveyed to the SPARQL query service, http://www.example/sparql/, as illustrated in this HTTP trace:

GET /sparql/?query=EncodedQuery
Host: www.example
User-agent: sparql-client/0.1
HTTP/1.1 200 OK
Date: Wed, 03 Aug 2005 12:48:25 GMT
Server: Apache/1.3.29 (Unix)
Connection: close
Content-Type: application/sparql-results+xml

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
...
</sparql>
Editorial note: TODO @@2009-Oct-20
Put in internationalized results

2.2.2 HTTP Bindings for SPARQL Update

2.2.2.1 HTTP Examples for SPARQL Update
Editorial note 
This is a placeholder for example HTTP interactions for sending SPARQL 1.1 Update commands via HTTP POST.

@@

2.3 Other Bindings

[WSDL2-Adjuncts] defines a means of binding abstract interface operations to to other transports such as SOAP. Any implementation of this specification is at liberty to provide alternative bindings.

3 Policy Considerations

3.1 Security

Editorial note 
The editors note that security concerns for issuing SPARQL 1.1 Update commands over the protocol should be addressed.

There are at least two possible sources of denial-of-service attacks against SPARQL protocol services. First, under-constrained queries can result in very large numbers of results, which may require large expenditures of computing resources to process, assemble, or return. Another possible source are queries containing very complex — either because of resource size, the number of resources to be retrieved, or a combination of size and number — RDF dataset descriptions, which the service may be unable to assemble without significant expenditure of resources, including bandwidth, CPU, or secondary storage. In some cases such expenditures may effectively constitute a denial-of-service attack. A SPARQL protocol service may place restrictions on the resources that it retrieves or on the rate at which external resources are retrieved. There may be other sources of denial-of-service attacks against SPARQL query processing services.

Since a SPARQL protocol service may make HTTP requests of other origin servers on behalf of its clients, it may be used as a vector of attacks against other sites or services. Thus, SPARQL protocol services may effectively act as proxies for third-party clients. Such services may place restrictions on the resources that they retrieve or on the rate at which external resources can be retrieved. SPARQL protocol services may log client requests in such a way as to facilitate tracing them with regard to third-party origin servers or services.

SPARQL protocol services may choose to detect these and other costly, or otherwise unsafe, queries, impose time or memory limits on queries, or impose other restrictions to reduce the service's (and other service's) vulnerability to denial-of-service attacks. They also may refuse to process such query requests.

Different IRIs may have the same appearance. Characters in different scripts may look similar (a Cyrillic "о" may appear similar to a Latin "o"). A character followed by combining characters may have the same visual representation as another character (LATIN SMALL LETTER E followed by COMBINING ACUTE ACCENT has the same visual representation as LATIN SMALL LETTER E WITH ACUTE). Users of SPARQL must take care to construct queries with IRIs that match the IRIs in the data. Further information about matching of similar characters can be found in Unicode Security Considerations [UNISEC] and Internationalized Resource Identifiers (IRIs) [RFC3987] Section 8.

4 Conformance

The status of the parts of SPARQL 1.1 Protocol for RDF (this document) is as follows:

Further, both protocol-query.wsdl and protocol-types.xsd are normative.

A conformant SPARQL Protocol service:

  1. must implement one or more operations of the SparqlProtocol interface;
  2. may implement HTTP bindings of the query operation of the SparqlProtocol interface;
  3. may implement HTTP bindings of the update operation of the SparqlProtocol interface;
  4. must implement HTTP bindings of query and update in the way described in this document ("SPARQL 1.1 Protocol for RDF"), in protocol-query.wsdl, and protocol-types.xsd;
  5. may implement other interfaces, bindings of the operations of those interfaces, or bindings of the Query and update operations other than the normative HTTP bindings described by SPARQL 1.1 Protocol for RDF; and
  6. must be consistent with the normative constraints (indicated by [RFC 2119] keywords) described in 3. Policy Considerations.

5 Changes Since Previous Recommendation

This specification extends and updates the SPARQL Protocol for RDF of January, 2008. The significant changes are:

A References

A.1 Normative References

IANA-CHARSETS
(Internet Assigned Numbers Authority) Official Names for Character Sets, ed. Keld Simonsen et al. (See http://www.iana.org/assignments/character-sets.)
IETF RFC 2119
IETF (Internet Engineering Task Force). RFC 2119: Key words for use in RFCs to Indicate Requirement Levels. Scott Bradner, 1997. (See http://www.ietf.org/rfc/rfc2119.txt.)
IETF BCP 47
IETF (Internet Engineering Task Force). BCP 47, consisting of RFC 4646: Tags for Identifying Languages, and RFC 4647: Matching of Language Tags, A. Phillips, M. Davis. 2006. (See ftp://ftp.isi.edu/in-notes/bcp/bcp47.txt.)
IETF RFC 3986
IETF (Internet Engineering Task Force). RFC 3986: Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee, R. Fielding, L. Masinter. 2005. (See http://www.ietf.org/rfc/rfc3986.txt.)
ISO/IEC 10646
ISO (International Organization for Standardization). ISO/IEC 10646-1:2000. Information technology — Universal Multiple-Octet Coded Character Set (UCS) — Part 1: Architecture and Basic Multilingual Plane and ISO/IEC 10646-2:2001. Information technology — Universal Multiple-Octet Coded Character Set (UCS) — Part 2: Supplementary Planes, as, from time to time, amended, replaced by a new edition or expanded by the addition of new parts. [Geneva]: International Organization for Standardization. (See http://www.iso.org/iso/home.htm for the latest version.)
ISO/IEC 10646:2000
ISO (International Organization for Standardization). ISO/IEC 10646-1:2000. Information technology — Universal Multiple-Octet Coded Character Set (UCS) — Part 1: Architecture and Basic Multilingual Plane. [Geneva]: International Organization for Standardization, 2000.
Unicode
The Unicode Consortium. The Unicode Standard, Version 5.0.0, defined by: The Unicode Standard, Version 5.0 (Boston, MA, Addison-Wesley, 2007. ISBN 0-321-48091-0).
UnicodeNormal
The Unicode Consortium. Unicode normalization forms. Mark Davis and Martin Durst. 2008. (See http://unicode.org/reports/tr15/.)

A.2 Other References

Aho/Ullman
Aho, Alfred V., Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Reading: Addison-Wesley, 1986, rpt. corr. 1988.
Brüggemann-Klein
Brüggemann-Klein, Anne. Formal Models in Document Processing. Habilitationsschrift. Faculty of Mathematics at the University of Freiburg, 1993. (See ftp://ftp.informatik.uni-freiburg.de/documents/papers/brueggem/habil.ps.)
Brüggemann-Klein and Wood
Brüggemann-Klein, Anne, and Derick Wood. Deterministic Regular Languages. Universität Freiburg, Institut für Informatik, Bericht 38, Oktober 1991. Extended abstract in A. Finkel, M. Jantzen, Hrsg., STACS 1992, S. 173-184. Springer-Verlag, Berlin 1992. Lecture Notes in Computer Science 577. Full version titled One-Unambiguous Regular Languages in Information and Computation 140 (2): 229-253, February 1998.
Clark
James Clark. Comparison of SGML and XML. (See http://www.w3.org/TR/NOTE-sgml-xml-971215.)
IANA-LANGCODES
(Internet Assigned Numbers Authority) Registry of Language Tags (See http://www.iana.org/assignments/language-subtag-registry.)
IETF RFC 2141
IETF (Internet Engineering Task Force). RFC 2141: URN Syntax, ed. R. Moats. 1997. (See http://www.ietf.org/rfc/rfc2141.txt.)
IETF RFC 3023
IETF (Internet Engineering Task Force). RFC 3023: XML Media Types. eds. M. Murata, S. St.Laurent, D. Kohn. 2001. (See http://www.ietf.org/rfc/rfc3023.txt.)
IETF RFC 2781
IETF (Internet Engineering Task Force). RFC 2781: UTF-16, an encoding of ISO 10646, ed. P. Hoffman, F. Yergeau. 2000. (See http://www.ietf.org/rfc/rfc2781.txt.)
ISO 639
(International Organization for Standardization). ISO 639:1988 (E). Code for the representation of names of languages. [Geneva]: International Organization for Standardization, 1988.
ISO 3166
(International Organization for Standardization). ISO 3166-1:1997 (E). Codes for the representation of names of countries and their subdivisions — Part 1: Country codes [Geneva]: International Organization for Standardization, 1997.
ISO 8879
ISO (International Organization for Standardization). ISO 8879:1986(E). Information processing — Text and Office Systems — Standard Generalized Markup Language (SGML). First edition — 1986-10-15. [Geneva]: International Organization for Standardization, 1986.
ISO/IEC 10744
ISO (International Organization for Standardization). ISO/IEC 10744-1992 (E). Information technology — Hypermedia/Time-based Structuring Language (HyTime). [Geneva]: International Organization for Standardization, 1992. Extended Facilities Annexe. [Geneva]: International Organization for Standardization, 1996.
WEBSGML
ISO (International Organization for Standardization). ISO 8879:1986 TC2. Information technology — Document Description and Processing Languages. [Geneva]: International Organization for Standardization, 1998. (See http://www.sgmlsource.com/8879/n0029.htm.)
XML Names
Tim Bray, Dave Hollander, and Andrew Layman, editors. Namespaces in XML. Textuality, Hewlett-Packard, and Microsoft. World Wide Web Consortium, 1999. (See http://www.w3.org/TR/xml-names/.)

B CVS History

$Log: Overview.html,v $
Revision 1.2  2010/01/27 20:55:41  bertails
~ fix some links

Revision 1.1  2010/01/27 16:24:12  bertails
sparql

Revision 1.12  2010/01/27 01:36:40  apollere2
Fixed last broken fragments.

Revision 1.11  2010/01/27 01:33:33  apollere2
removed cvs-log-meat div2, because it causes a strange TOC entry

Revision 1.10  2010/01/27 01:30:55  apollere2
Fixed broken fragment link.

Revision 1.9  2010/01/22 02:07:27  apollere2
Added no-endorsement boilerplate.

Revision 1.8  2010/01/22 02:03:03  apollere2
changed the second occurrence of Excerpt-1.3 to Exceprt-1.4

Revision 1.7  2010/01/22 01:56:25  apollere2
Adapted previous versions, dates, etc.

Revision 1.15  2010/01/18 21:28:18  dcharbon2
* Fixed name references for protocol and query specifications
* Removed references to obsolete update syntax
* Updated formatting of MUST and MUST NOT where it was incorrect
* Simplified text surrounding reporting debugging data on service fault.
* Update section references
* Improved xml schema fragment descriptions
* Updated the "update" type removing references to dataset types in protocol-types.xsd

Revision 1.14  2010/01/10 16:02:56  lfeigenb
* Add Query faults back in
* Clean up the XX tokens
* Editor notes for Update's out and fault messages
* Note changes since previous WD in the SotD

Revision 1.13  2010/01/05 16:50:46  dcharbon2
Updated URI references for WSDL 2.0. Also updated the Update section for faults.

Revision 1.12  2009/10/21 02:25:37  lfeigenb
fix links
add .wsdl and .xsd

Revision 1.10  2009/10/20 20:21:47  lfeigenb
fixed placement of table

Revision 1.9  2009/10/20 19:10:19  lfeigenb
Fixed and added support for markup that was previously unsupported by our XSLTs.

Future SPARQL-specific customizations should go in shared/sparql.xsl

Revision 1.8  2009/10/20 18:13:47  lfeigenb
Factored out shared XML spec files into docs/shared

Revision 1.7  2009/10/20 16:24:01  lfeigenb
remove extra 1.1 ; DAWG -> SPARQL WG ; add note about security for update

Revision 1.6  2009/10/20 05:58:28  lfeigenb
Make all changes and updates suggested in

http://lists.w3.org/Archives/Public/public-rdf-dawg/2009OctDec/0204.html

Revision 1.5  2009/10/15 22:37:08  lfeigenb
Changes in preparation of FPWD as per http://www.w3.org/2009/sparql/meeting/2009-10-13

Revision 1.4  2009/10/03 00:15:20  lfeigenb
fixed xml tags

Revision 1.3  2009/10/03 00:13:19  lfeigenb
Initial updates by SimonKJ

Revision 1.2  2009/09/28 22:55:59  eric
- some leftover noise from the port

Revision 1.1  2009/09/28 22:30:46  eric
CREATED