a ?type } }',
+ 'named-graph-uri': %w(http://kasei.us/2009/09/sparql/data/data1.rdf http://kasei.us/2009/09/sparql/data/data2.rdf),
+ },
+ resp: {
+ status: %w(2XX 3XX),
+ "Content-Type": %w(application/sparql-results+xml application/sparql-results+json),
+ content: true
+ }
+ }],
+ },
+ query_content_type_select: {
+ name: "SELECT query appropriate content type (expect one of: XML, JSON, CSV, TSV)",
+ req: [{
+ method: :POST,
+ content: {
+ query: 'SELECT (1 AS ?value) {}',
+ 'default-graph-uri': 'http://kasei.us/2009/09/sparql/data/data0.rdf',
+ },
+ resp: {
+ status: %w(2XX 3XX),
+ "Content-Type": %w(application/sparql-results+xml application/sparql-results+json text/tab-separated-values text/csv)
+ }
+ }],
+ },
+ query_content_type_ask: {
+ name: "ASK query appropriate content type (expect one of: XML, JSON)",
+ req: [{
+ method: :POST,
+ content: {
+ query: 'ASK {}',
+ 'default-graph-uri': 'http://kasei.us/2009/09/sparql/data/data0.rdf',
+ },
+ resp: {
+ status: %w(2XX 3XX),
+ "Content-Type": %w(application/sparql-results+xml application/sparql-results+json)
+ }
+ }],
+ },
+ query_content_type_describe: {
+ name: "DESCRIBE query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD)",
+ req: [{
+ method: :POST,
+ content: {
+ query: 'DESCRIBE ',
+ 'default-graph-uri': 'http://kasei.us/2009/09/sparql/data/data0.rdf',
+ },
+ resp: {
+ status: %w(2XX 3XX),
+ "Content-Type": %w(application/rdf+xml text/turtle application/n-triples text/html application/ld+json)
+ }
+ }],
+ },
+ query_content_type_construct: {
+ name: "CONSTRUCT query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD))",
+ req: [{
+ method: :POST,
+ content: {
+ query: 'CONSTRUCT { 1 } WHERE {}',
+ 'default-graph-uri': 'http://kasei.us/2009/09/sparql/data/data0.rdf',
+ },
+ resp: {
+ status: %w(2XX 3XX),
+ "Content-Type": %w(application/rdf+xml text/turtle application/n-triples text/html application/ld+json)
+ }
+ }],
+ },
+ update_dataset_default_graph: {
+ name: "update with protocol-specified default graph",
+ req: [{
+ method: :POST,
+ content: {
+ update: %(
+PREFIX dc:
+PREFIX foaf:
+CLEAR ALL ;
+INSERT DATA {
+ GRAPH {
+ a foaf:Document
+ }
+} ;
+INSERT {
+ GRAPH {
+ ?s a dc:BibliographicResource
+ }
+}
+WHERE {
+ ?s a foaf:Document
+}
+)
+},
+ 'using-graph-uri': 'http://kasei.us/2009/09/sparql/data/data1.rdf',
+ resp: {
+ status: %w(2XX 3XX)
+ }
+ }, {
+ method: :POST,
+ content: %(
+ASK {
+ GRAPH {
+ a
+ }
+}
+),
+ 'Content-Type': 'application/sparql-query',
+ 'Accept': 'application/sparql-results+xml',
+ resp: {
+ status: %w(2XX 3XX),
+ 'Content-Type': 'application/sparql-results+xml'
+ }
+ }],
+ },
+ update_dataset_default_graphs: {
+ name: "update with protocol-specified default graphs",
+ req: [{
+ method: :POST,
+ content: {
+ update: %(
+PREFIX dc:
+PREFIX foaf:
+DROP ALL ;
+INSERT DATA {
+ GRAPH { a foaf:Document }
+ GRAPH { a foaf:Document }
+ GRAPH { a foaf:Document }
+} ;
+INSERT {
+ GRAPH {
+ ?s a dc:BibliographicResource
+ }
+}
+WHERE {
+ ?s a foaf:Document
+}
+)
+},
+ 'using-graph-uri': %w(http://kasei.us/2009/09/sparql/data/data1.rdf http://kasei.us/2009/09/sparql/data/data2.rdf),
+ resp: {
+ status: %w(2XX 3XX)
+ }
+ }, {
+ method: :POST,
+ content: %(
+ASK {
+ GRAPH {
+ a .
+ a .
+ }
+ FILTER NOT EXISTS {
+ GRAPH {
+ a .
+ }
+ }
+}
+),
+ 'Content-Type': 'application/sparql-query',
+ 'Accept': 'application/sparql-results+xml',
+ resp: {
+ status: %w(2XX 3XX),
+ 'Content-Type': 'application/sparql-results+xml'
+ }
+ }],
+ },
+ update_dataset_named_graphs: {
+ name: "update with protocol-specified named graphs",
+ req: [{
+ method: :POST,
+ content: {
+ update: %(
+PREFIX dc:
+PREFIX foaf:
+DROP ALL ;
+INSERT DATA {
+ GRAPH { a foaf:Document }
+ GRAPH { a foaf:Document }
+ GRAPH { a foaf:Document }
+} ;
+INSERT {
+ GRAPH {
+ ?s a dc:BibliographicResource
+ }
+}
+WHERE {
+ GRAPH ?g {
+ ?s a foaf:Document
+ }
+}
+)
+},
+ 'using-graph-uri': %w(http://kasei.us/2009/09/sparql/data/data1.rdf http://kasei.us/2009/09/sparql/data/data2.rdf),
+ resp: {
+ status: %w(2XX 3XX)
+ }
+ }, {
+ method: :POST,
+ content: %(
+ASK {
+ GRAPH {
+ a .
+ a .
+ }
+ FILTER NOT EXISTS {
+ GRAPH {
+ a .
+ }
+ }
+}
+),
+ 'Content-Type': 'application/sparql-query',
+ 'Accept': 'application/sparql-results+xml',
+ resp: {
+ status: %w(2XX 3XX),
+ 'Content-Type': 'application/sparql-results+xml'
+ }
+ }],
+ },
+ update_dataset_full: {
+ name: "update with protocol-specified dataset (both named and default graphs)",
+ req: [{
+ method: :POST,
+ update: %(
+PREFIX dc:
+PREFIX foaf:
+DROP ALL ;
+INSERT DATA {
+ GRAPH { a foaf:Document }
+ GRAPH { a foaf:Document }
+ GRAPH { a foaf:Document }
+} ;
+INSERT {
+ GRAPH {
+ ?s ?in
+ }
+}
+WHERE {
+ {
+ GRAPH ?g { ?s a foaf:Document }
+ BIND(?g AS ?in)
+ }
+ UNION
+ {
+ ?s a foaf:Document .
+ BIND("default" AS ?in)
+ }
+}
+),
+ 'using-graph-uri': %w(http://kasei.us/2009/09/sparql/data/data1.rdf http://kasei.us/2009/09/sparql/data/data2.rdf),
+ resp: {
+ status: %w(2XX 3XX)
+ }
+ }, {
+ method: :POST,
+ content: %(
+ASK {
+ GRAPH {
+ "default" .
+ .
+ }
+ FILTER NOT EXISTS {
+ GRAPH {
+ ?p ?o
+ }
+ }
+}
+),
+ 'Content-Type': 'application/sparql-query',
+ 'Accept': 'application/sparql-results+xml',
+ resp: {
+ status: %w(2XX 3XX),
+ 'Content-Type': 'application/sparql-results+xml'
+ }
+ }],
+ },
+ update_post_form: {
+ name: "update via URL-encoded POST",
+ req: [{
+ method: :POST,
+ content: {
+ update: 'CLEAR ALL'
+ },
+ resp: {
+ status: %w(2XX 3XX)
+ }
+ }]
+ },
+ update_post_direct: {
+ name: "update via POST directly",
+ req: [{
+ method: :POST,
+ content: 'CLEAR ALL',
+ 'Content-Type': 'application/sparql-update',
+ resp: {
+ status: %w(2XX 3XX)
+ }
+ }]
+ },
+ update_base_uri: {
+ name: "test for service-defined BASE URI (\"which MAY be the service endpoint\")",
+ req: [{
+ method: :POST,
+ content: {
+ update: 'CLEAR SILENT GRAPH ; INSERT DATA { GRAPH { } }'
+ },
+ resp: {
+ status: %w(2XX 3XX)
+ }
+ }, {
+ method: :POST,
+ content: {
+ query: 'SELECT ?o WHERE { GRAPH { ?o } }'
+ },
+ 'Accept': 'application/sparql-results+xml',
+ resp: {
+ status: %w(2XX 3XX),
+ 'Content-Type': 'application/sparql-results+xml',
+ content: "one result with `?o` bound to an IRI that is _not_ ``"
+ }
+ }]
+ },
+}
+
+NEGATIVE_TESTS = {
+ bad_query_method: {
+ name: "invoke query operation with a method other than GET or POST",
+ req: [{
+ method: :PUT,
+ query: "ASK {}",
+ "default-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_multiple_queries: {
+ name: "invoke query operation with more than one query string",
+ req: [{
+ method: :GET,
+ query: ["ASK {}", "SELECT * {}"],
+ "default-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_query_wrong_media_type: {
+ name: "invoke query operation with a POST with media type that's not url-encoded or application/sparql-query",
+ req: [{
+ method: :POST,
+ "default-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ 'Content-Type': 'text/plain',
+ content: 'ASK {}',
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_query_missing_form_type: {
+ name: "invoke query operation with url-encoded body, but without application/x-www-form-urlencoded media type",
+ req: [{
+ method: :POST,
+ content: {
+ query: "ASK {}",
+ "default-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf"
+ },
+ 'Content-Type': nil,
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_query_missing_direct_type: {
+ name: "invoke query operation with SPARQL body, but without application/sparql-query media type",
+ req: [{
+ method: :POST,
+ "default-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ content: "ASK {}",
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_query_non_utf8: {
+ name: "invoke query operation with direct POST, but with a non-UTF8 encoding (UTF-16)",
+ req: [{
+ method: :POST,
+ "default-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ 'Content-Type': 'application/sparql-query; charset=UTF-16',
+ content: 'ASK {}',
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_query_syntax: {
+ name: "invoke query operation with invalid query syntax (4XX result)",
+ req: [{
+ method: :GET,
+ query: 'ASK {',
+ "default-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_update_get: {
+ name: "invoke update operation with GET",
+ req: [{
+ method: :GET,
+ update: 'CLEAR ALL',
+ "using-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_multiple_updates: {
+ name: "invoke update operation with more than one update string",
+ req: [{
+ method: :POST,
+ content: {
+ update: ['CLEAR ALL', 'CLEAR DEFAULT']
+ },
+ "using-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_update_wrong_media_type: {
+ name: "invoke update operation with a POST with media type that's not url-encoded or application/sparql-update",
+ req: [{
+ method: :POST,
+ content: 'CLEAR NAMED',
+ "using-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ 'Content-Type': 'text/plain',
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_update_missing_form_type: {
+ name: "invoke update operation with url-encoded body, but without application/x-www-form-urlencoded media type",
+ req: [{
+ method: :POST,
+ content: 'CLEAR NAMED',
+ "using-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ 'Content-Type': nil,
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_update_non_utf8: {
+ name: "invoke update operation with direct POST, but with a non-UTF8 encoding",
+ req: [{
+ method: :POST,
+ content: 'CLEAR NAMED',
+ "using-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ 'Content-Type': 'application/sparql-update; charset=UTF-16',
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_update_syntax: {
+ name: "invoke update operation with invalid update syntax (4XX result)",
+ req: [{
+ method: :POST,
+ content: {
+ update: 'CLEAR XYZ'
+ },
+ "using-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf",
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+ bad_update_dataset_conflict: {
+ name: "invoke update with both using-graph-uri/using-named-graph-uri parameter and USING/WITH clause",
+ req: [{
+ method: :POST,
+ content: {
+ "using-named-graph-uri": "http://example/people",
+ update: %(
+PREFIX foaf:
+WITH
+DELETE { ?person foaf:givenName 'Bill' }
+INSERT { ?person foaf:givenName 'William' }
+WHERE {
+ ?person foaf:givenName 'Bill'
+}
+),
+ },
+ "Content-Type": "application/x-www-form-urlencoded",
+ resp: {
+ status: "4XX"
+ }
+ }],
+ },
+}
+
+def req_uri(params)
+ params.map do |key, values|
+ unless %i(method name content resp Content-Type Accept).include?(key)
+ Array(values).map do |value|
+ "#{key}=#{CGI.escape(value.to_s).gsub('+', '%20')}"
+ end.join('&')
+ end
+ end.compact.join('&')
+end
+
+def encode_header(params, field)
+ values = Array(params[field]).map(&:to_s)
+ h_field = {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": field,
+ "ht:fieldValue": Array(values).join(', ')
+ }
+
+ values.each do |value|
+ value, *params = value.split(';').map(&:strip)
+ element = {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": value
+ }
+ params.each do |param|
+ p, v = param.split('=')
+ pv = v.sub(/^["']?([^"']*)["']?$/, '\1')
+ # Remember charset for body encoding
+ $charset = pv if p.downcase == 'charset'
+ param = {
+ "@type": "ht:Parameter",
+ "ht:paramName": p,
+ "ht:paramValue": pv
+ }
+
+ (element[:params] ||= []) << param
+ end
+
+ (h_field[:headerElements] ||= []) << element
+ end
+
+ h_field
+end
+
+def encode_body(content)
+ content = req_uri(content) if content.is_a?(Hash)
+ {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": content,
+ "cnt:characterEncoding": $charset
+ }
+end
+
+def gen_entry(frag, params)
+ $charset = "UTF-8"
+ entry = {
+ '@id': "##{frag}",
+ "@type": "mf:ProtocolTest",
+ "name": params.delete(:name),
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": []
+ }
+ }
+ requests = entry[:action][:requests]
+ params[:req].each do |req|
+ uri_query = req_uri(req)
+ path = uri_query.to_s.empty? ? "/sparql" : "/sparql?#{uri_query}"
+ request = {
+ "@type": "ht:Request",
+ "ht:methodName": req[:method],
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": path,
+ }
+
+ # Headers
+ (request[:headers] ||= []) << encode_header(req, :Accept) if
+ req[:Accept]
+
+ # Default Content-Type on POST
+ #req[:'Content-Type'] = "application/x-www-form-urlencoded" if
+ # req[:method] == :POST && !req.key?(:'Content-Type')
+
+ (request[:headers] ||= []) << encode_header(req, :'Content-Type') if
+ req[:'Content-Type']
+
+ request[:"ht:body"] = encode_body(req[:content]) if req[:content]
+
+ if resp = req.delete(:resp)
+ response = {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": Array(resp[:status])
+ }
+
+ (response[:headers] ||= []) << encode_header(resp, :'Content-Type') if
+ resp[:'Content-Type']
+
+ response[:"ht:body"] = encode_body(resp[:content]) if resp[:content]
+
+ request[:"ht:resp"] = response
+ end
+
+ requests << request
+ end
+ entry
+end
+
+def validate(reader)
+ RDF::Reasoner.apply(:rdfs, :owl)
+ graph = RDF::Graph.new {|g| g << reader}
+ graph.entail!
+ messages = graph.lint
+ messages.each do |kind, term_messages|
+ term_messages.each do |term, messages|
+ STDERR.puts "#{kind} #{term}"
+ messages.each {|m| options[:output].puts " #{m}"}
+ end
+ end
+ exit 1 unless messages.empty?
+end
+
+# Generate JSON-LD describing the test manifest
+man = {
+ "@context": {
+ "@base": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest",
+ "cnt": "http://www.w3.org/2011/content#",
+ "dawgt": "http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#",
+ "ht": "http://www.w3.org/2011/http#",
+ "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",
+ "mq": "http://www.w3.org/2001/sw/DataAccess/tests/test-query#",
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+
+ "action": {"@id": "mf:action", "@type": "@id"},
+ "approval": {"@id": "dawgt:approval", "@type": "@id"},
+ "approvedBy": {"@id": "dawgt:approvedBy", "@type": "@id"},
+ "comment": {"@id": "rdfs:comment"},
+ "data": {"@id": "mq:data", "@type": "@id"},
+ "entries": {"@id": "mf:entries", "@container": "@list", "@type": "@id"},
+ "feature": {"@id": "mf:feature", "@type": "@vocab"},
+ "graphData": {"@id": "mq:graphData", "@type": "@id"},
+ "label": {"@id": "rdfs:label"},
+ "name": {"@id": "mf:name"},
+ "notable": {"@id": "mf:notable", "@type": "@vocab"},
+ "query": {"@id": "mq:query", "@type": "@id"},
+ "queryForm": {"@id": "mq:queryForm", "@type": "@vocab"},
+ "requires": {"@id": "mf:requires", "@type": "@vocab", "@container": "@set"},
+ "result": {"@id": "mf:result", "@type": "@id"},
+
+ "headerElements": {"@id": "ht:headerElements", "@container": "@list"},
+ "headers": {"@id": "ht:headers", "@container": "@list"},
+ "params": {"@id": "ht:params", "@container": "@list"},
+ "requests": {"@id": "ht:requests", "@container": "@list"},
+ },
+ "@id": "",
+ "@type": "mf:Manifest",
+ "label": "SPARQL Protocol",
+ "comment": %(
+Test descriptions used for generating Manifest and HTML renderings.
+Test HTTP connection described using HTTP and CNT vocabularies.
+In responses, status values such as "2XX", "3XX" are used to match the actual response status.
+Multiple values for Content-Type mean that the response MUST include one or more of these types.
+Responses for ASK match any specified boolean content.
+Some tests require special result processing.
+ ),
+ "entries": []
+}
+
+POSITIVE_TESTS.merge(NEGATIVE_TESTS).each do |frag, params|
+ entry = gen_entry(frag, params)
+ man[:entries] << entry
+end
+
+OPT_ARGS = [
+ ["--help", "-?", GetoptLong::NO_ARGUMENT, "print this message"],
+ ["--format", "-f", GetoptLong::REQUIRED_ARGUMENT, "Output format (jsonld, ttl or html)"],
+ ["--output", "-o", GetoptLong::REQUIRED_ARGUMENT, "Output to specified file"],
+ ["--validate", GetoptLong::NO_ARGUMENT, "Validate the resulting graph"],
+]
+
+def usage(**options)
+ STDERR.puts %{
+ generate protocol manifests
+
+ Usage: #{$0} [options]
+ }.gsub(/^ /, '')
+ width = OPT_ARGS.map do |o|
+ l = o.first.length
+ l += o[1].length + 2 if o[1].is_a?(String)
+ l
+ end.max
+ OPT_ARGS.each do |o|
+ s = " %-*s " % [width, (o[1].is_a?(String) ? "#{o[0,2].join(', ')}" : o[0])]
+ s += o.last
+ STDERR.puts s
+ end
+ exit(1)
+end
+
+opts = GetoptLong.new(*OPT_ARGS.map {|o| o[0..-2]})
+
+format = :jsonld
+output = $stdout
+validate = false
+
+opts.each do |opt, arg|
+ case opt
+ when '--help' then usage
+ when '--format' then format = arg.to_sym
+ when '--output' then output = File.open(arg, "w")
+ when '--validate' then validate = true
+ end
+end
+
+case format
+when :html
+ template = File.read(File.expand_path('../template.haml', __FILE__))
+ engine = Haml::Engine.new(template, format: :html5)
+ html = engine.render(self, man: JSON.parse(man.to_json))
+ validate(RDF::RDFa::Reader.new(html, base_uri: "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest.ttl", validate: validate)) if validate
+ output.write(html)
+when :jsonld
+ validate(JSON::LD::Reader.new(man.to_json, base_uri: "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest.ttl", validate: validate)) if validate
+ output.puts man.to_json(JSON::LD::JSON_STATE)
+when :ttl
+ JSON::LD::Reader.new(man.to_json, validate: validate) do |reader|
+ ttl = RDF::Turtle::Writer.buffer(
+ prefixes: {
+ "": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#",
+ cnt: "http://www.w3.org/2011/content#",
+ dawgt: "http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#",
+ ht: "http://www.w3.org/2011/http#",
+ mf: "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",
+ qt: "http://www.w3.org/2001/sw/DataAccess/tests/test-query#",
+ rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+ rdfs: "http://www.w3.org/2000/01/rdf-schema#",
+ }
+ ) {|writer| writer << reader}
+
+ validate(RDF::Turtle::Reader.new(ttl, base_uri: "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest.ttl", validate: true)) if validate
+
+ # Do some result hacking
+ ttl.sub!('', '<>')
+ ttl.sub!(/mf:entries \((.*)\) \.$/) do |matched|
+ matched.sub('(:', '( :').gsub(' :', "\n :")
+ end
+
+ output.write(ttl)
+ end
+else
+ STDERR.puts "unknown output format #{format}"
+ usage
+end
+
diff --git a/sparql11/data-sparql11/protocol/index.html b/sparql11/data-sparql11/protocol/index.html
index 5289012a..1e5e9bee 100644
--- a/sparql11/data-sparql11/protocol/index.html
+++ b/sparql11/data-sparql11/protocol/index.html
@@ -1,1105 +1,2102 @@
-
-
-
-
-
-
-
- SPARQL Protocol
-
-
-
-
-
-
-
-
-
- SPARQL Protocol
- Copyright © 2010 W3C ® (MIT , ERCIM , Keio ), All Rights Reserved. W3C liability , trademark , and document use rules apply.
-
-
-
Abstract
-
-
-
-
This page describes W3C SPARQL Working Group's SPARQL1.0 test suite.
-
-
Configuration
-
-
When accessed without any query parameters, the CGI provides an HTML form that
- may be used to validate a Protocol implementation. The parameters are:
-
-
- "query_url" -- query endpoint URL
- "update_url" -- update endpoint URL
- "software" -- The Protocol implementation IRI that will be used if conneg is used and requests RDF
-
-
-
The following parameters should also be accounted for (in a future version):
-
-
- does the default graph change based on other graphs (e.g. acts as the union of named graphs)?
-
-
-
Requirements
-
-
It is assumed that the Protocol implementation provides support for all of SPARQL (1.0)
- and also SPARQL 1.1 Query/Update support for:
-
-
- Select expressions
- CLEAR
- DROP
- LOAD
-
-
-
The following RDF files are loaded as appropriate to properly setup the
- graphstore/dataset for some tests:
-
-
- http://kasei.us/2009/09/sparql/data/data0.rdf
- http://kasei.us/2009/09/sparql/data/data1.rdf
- http://kasei.us/2009/09/sparql/data/data2.rdf
- http://kasei.us/2009/09/sparql/data/data3.rdf
-
-
-
Finally, it is assumed that implementations can produce application/rdf+xml and
- application/sparql-results+xml when requested using conneg .
-
-
Contributing Tests
-
-
The test manifests and entries are built automatically from manifest.ttl using a Rake task. Tests may be contributed via pull request to https://github.com/w3c/rdf-tests with suitable changes to the manifest.ttl and referenced files.
-
-
Distribution
-
-
Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License . To contribute to a W3C Test Suite, see the policies and contribution forms .
-
-
Disclaimer
-
-
UNDER BOTH MUTUALLY EXCLUSIVE LICENSES, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
- COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
-
-
-
- Test Descriptions
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_post_form:
-
- query via URL-encoded POST
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/x-www-url-form-urlencoded
Content-Length: XXX
query=ASK%20%7B%7D
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_default_graphs_get:
-
- GET query with protocol-specified default graph
-
-
-
-
Request
-
-
GET /sparql?query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20.%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20.%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
Host: www.example
User-agent: sparql-client/0.1
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_default_graphs_post:
-
- POST query with protocol-specified default graphs
-
-
-
-
Request
-
-
POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Content-Length: XXX
ASK { <http://kasei.us/2009/09/sparql/data/data1.rdf> ?p ?o . <http://kasei.us/2009/09/sparql/data/data2.rdf> ?p ?o }
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_named_graphs_post:
-
- POST query with protocol-specified named graphs
-
-
-
-
Request
-
-
POST /sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Content-Length: XXX
ASK { GRAPH ?g { ?s ?p ?o } }
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_named_graphs_get:
-
- GET query with protocol-specified named graphs
-
-
-
-
Request
-
-
GET /sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf&query=ASK%20%7B%20GRAPH%20%3Fg%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20%7D HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_full:
-
- query with protocol-specified dataset (both named and default graphs)
-
-
-
-
Request
-
-
POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Content-Length: XXX
SELECT ?g ?x ?s { ?x ?y ?o GRAPH ?g { ?s ?p ?o } }
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_multiple_dataset:
-
- query specifying dataset in both query string and protocol; test for use of protocol-specified dataset
-
-
-
-
Request
-
-
POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Content-Length: XXX
ASK FROM <http://kasei.us/2009/09/sparql/data/data1.rdf> { <data1.rdf> ?p ?o }
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_get:
-
- query via GET
-
-
-
-
Request
-
-
GET /sparql?query=ASK%20%7B%7D
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_select:
-
- query appropriate content type (expect one of: XML, JSON, CSV, TSV)
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Content-Length: XXX
SELECT (1 AS ?value) {}
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, or text/csv
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_ask:
-
- query appropriate content type (expect one of: XML, JSON)
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Content-Length: XXX
ASK {}
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_describe:
-
- query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa)
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Content-Length: XXX
DESCRIBE <http://example.org/>
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/rdf+xml, application/rdf+json or text/turtle
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_construct:
-
- query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa)
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Content-Length: XXX
CONSTRUCT { <s> <p> 1 } WHERE {}
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/rdf+xml, application/rdf+json or text/turtle
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_default_graph:
-
- update with protocol-specified default graph
-
-
-
-
Request
-
-
POST /sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-update
Content-Length: XXX
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CLEAR ALL ;
INSERT DATA {
GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> {
<http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document
}
} ;
INSERT {
GRAPH <http://example.org/protocol-update-dataset-test/> {
?s a dc:BibliographicResource
}
}
WHERE {
?s a foaf:Document
}
-
-
Response
-
-
2xx or 3xx response
-
-
followed by
-
-
Request
-
-
POST /sparql HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Accept: application/sparql-results+xml
Content-Type: application/sparql-query
Content-Length: XXX
ASK {
GRAPH <http://example.org/protocol-update-dataset-test/> {
<http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource>
}
}
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_default_graphs:
-
- update with protocol-specified default graphs
-
-
-
-
Request
-
-
POST /sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-update
Content-Length: XXX
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CLEAR ALL ;
INSERT DATA {
GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document }
GRAPH <http://kasei.us/2009/09/sparql/data/data2.rdf> { <http://kasei.us/2009/09/sparql/data/data2.rdf> a foaf:Document }
GRAPH <http://kasei.us/2009/09/sparql/data/data3.rdf> { <http://kasei.us/2009/09/sparql/data/data3.rdf> a foaf:Document }
} ;
INSERT {
GRAPH <http://example.org/protocol-update-dataset-graphs-test/> {
?s a dc:BibliographicResource
}
}
WHERE {
?s a foaf:Document
}
-
-
Response
-
-
2xx or 3xx response
-
-
followed by
-
-
Request
-
-
POST /sparql HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Accept: application/sparql-results+xml
Content-Type: application/sparql-query
Content-Length: XXX
ASK {
GRAPH <http://example.org/protocol-update-dataset-graphs-test/> {
<http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
<http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
}
FILTER NOT EXISTS {
GRAPH <http://example.org/protocol-update-dataset-graphs-test/> {
<http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
}
}
}
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_named_graphs:
-
- update with protocol-specified named graphs
-
-
-
-
Request
-
-
POST /sparql?using-named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-update
Content-Length: XXX
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CLEAR ALL ;
INSERT DATA {
GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document }
GRAPH <http://kasei.us/2009/09/sparql/data/data2.rdf> { <http://kasei.us/2009/09/sparql/data/data2.rdf> a foaf:Document }
GRAPH <http://kasei.us/2009/09/sparql/data/data3.rdf> { <http://kasei.us/2009/09/sparql/data/data3.rdf> a foaf:Document }
} ;
INSERT {
GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> {
?s a dc:BibliographicResource
}
}
WHERE {
GRAPH ?g {
?s a foaf:Document
}
}
-
-
Response
-
-
2xx or 3xx response
-
-
followed by
-
-
Request
-
-
POST /sparql HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Accept: application/sparql-results+xml
Content-Type: application/sparql-query
Content-Length: XXX
ASK {
GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> {
<http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
<http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
}
FILTER NOT EXISTS {
GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> {
<http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
}
}
}
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_full:
-
- update with protocol-specified dataset (both named and default graphs)
-
-
-
-
Request
-
-
POST /sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-update
Content-Length: XXX
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CLEAR ALL ;
INSERT DATA {
GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document }
GRAPH <http://kasei.us/2009/09/sparql/data/data2.rdf> { <http://kasei.us/2009/09/sparql/data/data2.rdf> a foaf:Document }
GRAPH <http://kasei.us/2009/09/sparql/data/data3.rdf> { <http://kasei.us/2009/09/sparql/data/data3.rdf> a foaf:Document }
} ;
INSERT {
GRAPH <http://example.org/protocol-update-dataset-full-test/> {
?s <http://example.org/in> ?in
}
}
WHERE {
{
GRAPH ?g { ?s a foaf:Document }
BIND(?g AS ?in)
}
UNION
{
?s a foaf:Document .
BIND("default" AS ?in)
}
}
-
-
Response
-
-
2xx or 3xx response
-
-
followed by
-
-
Request
-
-
POST /sparql HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Accept: application/sparql-results+xml
Content-Type: application/sparql-query
Content-Length: XXX
ASK {
GRAPH <http://example.org/protocol-update-dataset-full-test/> {
<http://kasei.us/2009/09/sparql/data/data1.rdf> <http://example.org/in> "default" .
<http://kasei.us/2009/09/sparql/data/data2.rdf> <http://example.org/in> <http://kasei.us/2009/09/sparql/data/data2.rdf> .
}
FILTER NOT EXISTS {
GRAPH <http://example.org/protocol-update-dataset-full-test/> {
<http://kasei.us/2009/09/sparql/data/data3.rdf> ?p ?o
}
}
}
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_post_form:
-
- update via URL-encoded POST
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/x-www-url-form-urlencoded
Content-Length: XXX
update=CLEAR%20ALL
-
-
Response
-
-
2xx or 3xx response
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_post_direct:
-
- update via POST directly
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-update
Content-Length: XXX
CLEAR ALL
-
-
Response
-
-
2xx or 3xx response
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_base_uri:
-
- test for service-defined BASE URI ("which MAY be the service endpoint")
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-update
Content-Length: XXX
CLEAR GRAPH <http://example.org/protocol-base-test/> ;
INSERT DATA { GRAPH <http://example.org/protocol-base-test/> { <http://example.org/s> <http://example.org/p> <test> } }
-
-
Response
-
-
2xx or 3xx response
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Accept: application/sparql-results+xml
Content-Length: XXX
SELECT ?o WHERE {
GRAPH <http://example.org/protocol-base-test/> {
<http://example.org/s> <http://example.org/p> ?o
}
}
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml
one result with `?o` bound to an IRI that is _not_ `<test>`
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_post_direct:
-
- query via POST directly
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query
Content-Length: XXX
ASK {}
-
-
Response
-
-
2xx or 3xx response
Content-Type: application/sparql-results+xml or application/sparql-results+json
true
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_method:
-
- invoke query operation with a method other than GET or POST
-
-
-
-
Request
-
-
PUT /sparql?query=ASK%20%7B%7D
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_multiple_queries:
-
- invoke query operation with more than one query string
-
-
-
-
Request
-
-
GET /sparql?query=ASK%20%7B%7D&query=SELECT%20%2A%20%7B%7D
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_wrong_media_type:
-
- invoke query operation with a POST with media type that's not url-encoded or application/sparql-query
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: text/plain
Content-Length: XXX
ASK {}
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_missing_form_type:
-
- invoke query operation with url-encoded body, but without application/x-www-url-form-urlencoded media type
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Length: XXX
query=ASK%20%7B%7D
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_missing_direct_type:
-
- invoke query operation with SPARQL body, but without application/sparql-query media type
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Length: XXX
ASK {}
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_non_utf8:
-
- invoke query operation with direct POST, but with a non-UTF8 encoding (UTF-16)
-
-
-
-
(content body encoded in utf-16)
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-query; charset=UTF-16
Content-Length: XXX
ASK {}
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_syntax:
-
- invoke query operation with invalid query syntax (4XX result)
-
-
-
-
Request
-
-
GET /sparql?query=ASK%20%7B
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_get:
-
- invoke update operation with GET
-
-
-
-
Request
-
-
GET /sparql?update=CLEAR%20ALL
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_multiple_updates:
-
- invoke update operation with more than one update string
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/x-www-url-form-urlencoded
Content-Length: XXX
update=CLEAR%20NAMED&update=CLEAR%20DEFAULT
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_wrong_media_type:
-
- invoke update operation with a POST with media type that's not url-encoded or application/sparql-update
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: text/plain
Content-Length: XXX
CLEAR NAMED
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_missing_form_type:
-
- invoke update operation with url-encoded body, but without application/x-www-url-form-urlencoded media type
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Length: XXX
update=CLEAR%20NAMED
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_non_utf8:
-
- invoke update operation with direct POST, but with a non-UTF8 encoding
-
-
-
-
(content body encoded in utf-16)
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/sparql-update; charset=UTF-16
Content-Length: XXX
CLEAR NAMED
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_syntax:
-
- invoke update operation with invalid update syntax
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/x-www-url-form-urlencoded
Content-Length: XXX
update=CLEAR%20XYZ
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
- http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_dataset_conflict:
-
- invoke update with both using-graph-uri/using-named-graph-uri parameter and USING/WITH clause
-
-
-
-
Request
-
-
POST /sparql/ HTTP/1.1
Host: www.example
User-agent: sparql-client/0.1
Content-Type: application/x-www-url-form-urlencoded
Content-Length: XXX
using-named-graph-uri=http%3A%2F%2Fexample%2Fpeople&update=%09%09PREFIX%20foaf%3A%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0A%09%09WITH%20%3Chttp%3A%2F%2Fexample%2Faddresses%3E%0A%09%09DELETE%20%7B%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%20%7D%0A%09%09INSERT%20%7B%20%3Fperson%20foaf%3AgivenName%20%27William%27%20%7D%0A%09%09WHERE%20%7B%0A%09%09%09%3Fperson%20foaf%3AgivenName%20%27Bill%27%0A%09%09%7D%0A
-
-
Response
-
-
4xx
-
-
- type
- mf:ProtocolTest
- approval
- dawgt:Approved
- approvedBy
-
- http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+SPARQL Protocol
+
+
+
+
+
+
+
+
+
+SPARQL Protocol
+Copyright © 2010 W3C ® (MIT , ERCIM , Keio ), All Rights Reserved. W3C liability , trademark , and document use rules apply.
+
+
+
Abstract
+
+Test descriptions used for generating Manifest and HTML renderings. Test HTTP connection described using HTTP and CNT vocabularies. In responses, status values such as "2XX", "3XX" are used to match the actual response status. Multiple values for Content-Type mean that the response MUST include one or more of these types. Responses for ASK match any specified boolean content. Some tests require special result processing.
+
+
This page describes W3C SPARQL Working Group's SPARQL1.0 test suite.
+
+
It is assumed that the Protocol implementation provides support for all of SPARQL (1.0)
+ and also SPARQL 1.1 Query/Update support for:
+
+
+Select expressions
+CLEAR
+DROP
+LOAD
+
+
+
The following RDF files are loaded as appropriate to properly setup the
+graphstore/dataset for some tests:
+
+
+http://kasei.us/2009/09/sparql/data/data0.rdf
+http://kasei.us/2009/09/sparql/data/data1.rdf
+http://kasei.us/2009/09/sparql/data/data2.rdf
+http://kasei.us/2009/09/sparql/data/data3.rdf
+
+
+
Finally, it is assumed that implementations can produce application/rdf+xml and
+application/sparql-results+xml when requested using conneg .
+
+
Contributing Tests
+
+
The test manifests and entries are built automatically from manifest.ttl using a Rake task. Tests may be contributed via pull request to https://github.com/w3c/rdf-tests with suitable changes to the manifest.ttl and referenced files.
+
+
Distribution
+
+
Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License . To contribute to a W3C Test Suite, see the policies and contribution forms .
+
+
Disclaimer
+
+
UNDER BOTH MUTUALLY EXCLUSIVE LICENSES, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
+
+
+
+Test Descriptions
+
+
+
+
+#query_get:
+
+query via GET
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+GET
+/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_post_form:
+
+query via URL-encoded POST
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+POST
+/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_post_direct:
+
+query via POST directly
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+Content-Type :
+application/sparql-query
+
+
+
+
+
+
+ASK {}
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_dataset_default_graph:
+
+query with protocol-specified default graph
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%3Fp%20%3Fo%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_dataset_default_graphs_get:
+
+GET query with protocol-specified default graphs
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+GET
+/sparql?query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20.%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20.%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_dataset_default_graphs_post:
+
+POST query with protocol-specified default graphs
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20.%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20.%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_dataset_named_graphs_post:
+
+POST query with protocol-specified named graphs
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=ASK%20%7B%20GRAPH%20%3Fg1%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20%7D%20GRAPH%20%3Fg2%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20%7D%20%7D&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_dataset_named_graphs_get:
+
+GET query with protocol-specified named graphs
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+GET
+/sparql?query=ASK%20%7B%20GRAPH%20%3Fg1%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20%7D%20GRAPH%20%3Fg2%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20%7D%20%7D&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_dataset_full:
+
+query with protocol-specified dataset (both named and default graphs)
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=%0AASK%20%7B%0A%20%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20a%20%3Ftype%0A%20%20GRAPH%20%3Fg1%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20%7D%0A%20%20GRAPH%20%3Fg2%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20%7D%0A%7D%0A&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_multiple_dataset:
+
+query specifying dataset in both query string and protocol; test for use of protocol-specified dataset
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=ASK%20FROM%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20%7B%20GRAPH%20%3Fg1%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20%7D%20GRAPH%20%3Fg2%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20%7D%20%7D&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+#query_content_type_select:
+
+SELECT query appropriate content type (expect one of: XML, JSON, CSV, TSV)
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=SELECT%20%281%20AS%20%3Fvalue%29%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+or
+text/tab-separated-values
+or
+text/csv
+
+
+
+
+
+
+
+
+
+#query_content_type_ask:
+
+ASK query appropriate content type (expect one of: XML, JSON)
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+or
+application/sparql-results+json
+
+
+
+
+
+
+
+
+
+#query_content_type_describe:
+
+DESCRIBE query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD)
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=DESCRIBE%20%3Chttp%3A%2F%2Fexample.org%2F%3E&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/rdf+xml
+or
+text/turtle
+or
+application/n-triples
+or
+text/html
+or
+application/ld+json
+
+
+
+
+
+
+
+
+
+#query_content_type_construct:
+
+CONSTRUCT query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD))
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=CONSTRUCT%20%7B%20%3Cs%3E%20%3Cp%3E%201%20%7D%20WHERE%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/rdf+xml
+or
+text/turtle
+or
+application/n-triples
+or
+text/html
+or
+application/ld+json
+
+
+
+
+
+
+
+
+
+#update_dataset_default_graph:
+
+update with protocol-specified default graph
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
+update=%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0ACLEAR%20ALL%20%3B%0AINSERT%20DATA%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%7B%0A%20%20%20%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20foaf%3ADocument%0A%20%20%7D%0A%7D%20%3B%0AINSERT%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-update-dataset-test%2F%3E%20%7B%0A%20%20%20%20%3Fs%20a%20dc%3ABibliographicResource%0A%20%20%7D%0A%7D%0AWHERE%20%7B%0A%20%20%3Fs%20a%20foaf%3ADocument%0A%7D%0A
+
+
+
+
Response
+2XX
+or3XX
+
+response
+
+
+
+
+followed by
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+Accept :
+application/sparql-results+xml
+
+
+
+Content-Type :
+application/sparql-query
+
+
+
+
+
+
+
+ASK {
+ GRAPH <http://example.org/protocol-update-dataset-test/> {
+ <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource>
+ }
+}
+
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+
+
+
+
+
+
+
+
+
+#update_dataset_default_graphs:
+
+update with protocol-specified default graphs
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
+update=%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0ADROP%20ALL%20%3B%0AINSERT%20DATA%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%7D%20%3B%0AINSERT%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-update-dataset-graphs-test%2F%3E%20%7B%0A%20%20%20%20%3Fs%20a%20dc%3ABibliographicResource%0A%20%20%7D%0A%7D%0AWHERE%20%7B%0A%20%20%3Fs%20a%20foaf%3ADocument%0A%7D%0A
+
+
+
+
Response
+2XX
+or3XX
+
+response
+
+
+
+
+followed by
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+Accept :
+application/sparql-results+xml
+
+
+
+Content-Type :
+application/sparql-query
+
+
+
+
+
+
+
+ASK {
+ GRAPH <http://example.org/protocol-update-dataset-graphs-test/> {
+ <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
+ <http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
+ }
+ FILTER NOT EXISTS {
+ GRAPH <http://example.org/protocol-update-dataset-graphs-test/> {
+ <http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
+ }
+ }
+}
+
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+
+
+
+
+
+
+
+
+
+#update_dataset_named_graphs:
+
+update with protocol-specified named graphs
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
+update=%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0ADROP%20ALL%20%3B%0AINSERT%20DATA%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%7D%20%3B%0AINSERT%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-update-dataset-named-graphs-test%2F%3E%20%7B%0A%20%20%20%20%3Fs%20a%20dc%3ABibliographicResource%0A%20%20%7D%0A%7D%0AWHERE%20%7B%0A%20%20GRAPH%20%3Fg%20%7B%0A%20%20%20%20%3Fs%20a%20foaf%3ADocument%0A%20%20%7D%0A%7D%0A
+
+
+
+
Response
+2XX
+or3XX
+
+response
+
+
+
+
+followed by
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+Accept :
+application/sparql-results+xml
+
+
+
+Content-Type :
+application/sparql-query
+
+
+
+
+
+
+
+ASK {
+ GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> {
+ <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
+ <http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
+ }
+ FILTER NOT EXISTS {
+ GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> {
+ <http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> .
+ }
+ }
+}
+
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+
+
+
+
+
+
+
+
+
+#update_dataset_full:
+
+update with protocol-specified dataset (both named and default graphs)
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+POST
+/sparql?update=%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0ADROP%20ALL%20%3B%0AINSERT%20DATA%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%7D%20%3B%0AINSERT%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-update-dataset-full-test%2F%3E%20%7B%0A%20%20%20%20%3Fs%20%3Chttp%3A%2F%2Fexample.org%2Fin%3E%20%3Fin%0A%20%20%7D%0A%7D%0AWHERE%20%7B%0A%20%20%7B%0A%20%20%20%20GRAPH%20%3Fg%20%7B%20%3Fs%20a%20foaf%3ADocument%20%7D%0A%20%20%20%20BIND%28%3Fg%20AS%20%3Fin%29%0A%20%20%7D%0A%20%20UNION%0A%20%20%7B%0A%20%20%20%20%3Fs%20a%20foaf%3ADocument%20.%0A%20%20%20%20BIND%28%22default%22%20AS%20%3Fin%29%0A%20%20%7D%0A%7D%0A&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
Response
+2XX
+or3XX
+
+response
+
+
+
+
+followed by
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+Accept :
+application/sparql-results+xml
+
+
+
+Content-Type :
+application/sparql-query
+
+
+
+
+
+
+
+ASK {
+ GRAPH <http://example.org/protocol-update-dataset-full-test/> {
+ <http://kasei.us/2009/09/sparql/data/data1.rdf> <http://example.org/in> "default" .
+ <http://kasei.us/2009/09/sparql/data/data2.rdf> <http://example.org/in> <http://kasei.us/2009/09/sparql/data/data2.rdf> .
+ }
+ FILTER NOT EXISTS {
+ GRAPH <http://example.org/protocol-update-dataset-full-test/> {
+ <http://kasei.us/2009/09/sparql/data/data3.rdf> ?p ?o
+ }
+ }
+}
+
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+
+
+
+
+
+
+
+
+
+#update_post_form:
+
+update via URL-encoded POST
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+update=CLEAR%20ALL
+
+
+
+
Response
+2XX
+or3XX
+
+response
+
+
+
+
+
+
+
+#update_post_direct:
+
+update via POST directly
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+Content-Type :
+application/sparql-update
+
+
+
+
+
+
+CLEAR ALL
+
+
+
+
Response
+2XX
+or3XX
+
+response
+
+
+
+
+
+
+
+#update_base_uri:
+
+test for service-defined BASE URI ("which MAY be the service endpoint")
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+update=CLEAR%20SILENT%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-base-test%2F%3E%20%3B%20INSERT%20DATA%20%7B%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-base-test%2F%3E%20%7B%20%3Chttp%3A%2F%2Fexample.org%2Fs%3E%20%3Chttp%3A%2F%2Fexample.org%2Fp%3E%20%3Ctest%3E%20%7D%20%7D
+
+
+
+
Response
+2XX
+or3XX
+
+response
+
+
+
+
+followed by
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+Accept :
+application/sparql-results+xml
+
+
+
+
+
+
+query=SELECT%20%3Fo%20WHERE%20%7B%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-base-test%2F%3E%20%7B%20%3Chttp%3A%2F%2Fexample.org%2Fs%3E%20%3Chttp%3A%2F%2Fexample.org%2Fp%3E%20%3Fo%20%7D%20%7D
+
+
+
+
Response
+
2XX
+or3XX
+
+response
+
+
+
+Content-Type :
+application/sparql-results+xml
+
+
+
+
+
+
+one result with `?o` bound to an IRI that is _not_ `<test>`
+
+
+
+
+
+
+
+#bad_query_method:
+
+invoke query operation with a method other than GET or POST
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+PUT
+/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_multiple_queries:
+
+invoke query operation with more than one query string
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+GET
+/sparql?query=ASK%20%7B%7D&query=SELECT%20%2A%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_query_wrong_media_type:
+
+invoke query operation with a POST with media type that's not url-encoded or application/sparql-query
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+Content-Type :
+text/plain
+
+
+
+
+
+
+ASK {}
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_query_missing_form_type:
+
+invoke query operation with url-encoded body, but without application/x-www-form-urlencoded media type
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+
+query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_query_missing_direct_type:
+
+invoke query operation with SPARQL body, but without application/sparql-query media type
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
+ASK {}
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_query_non_utf8:
+
+invoke query operation with direct POST, but with a non-UTF8 encoding (UTF-16)
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+Content-Type :
+application/sparql-query ; charset =UTF-16
+
+
+
+
+
+
+
+ASK {}
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_query_syntax:
+
+invoke query operation with invalid query syntax (4XX result)
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+GET
+/sparql?query=ASK%20%7B&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_update_get:
+
+invoke update operation with GET
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+GET
+/sparql?update=CLEAR%20ALL&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_multiple_updates:
+
+invoke update operation with more than one update string
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
+update=CLEAR%20ALL&update=CLEAR%20DEFAULT
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_update_wrong_media_type:
+
+invoke update operation with a POST with media type that's not url-encoded or application/sparql-update
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+Content-Type :
+text/plain
+
+
+
+
+
+
+CLEAR NAMED
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_update_missing_form_type:
+
+invoke update operation with url-encoded body, but without application/x-www-form-urlencoded media type
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
+CLEAR NAMED
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_update_non_utf8:
+
+invoke update operation with direct POST, but with a non-UTF8 encoding
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+Content-Type :
+application/sparql-update ; charset =UTF-16
+
+
+
+
+
+
+
+CLEAR NAMED
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_update_syntax:
+
+invoke update operation with invalid update syntax (4XX result)
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf
+HTTP/1.1
+Host: www.example
+
+
+
+
+update=CLEAR%20XYZ
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+#bad_update_dataset_conflict:
+
+invoke update with both using-graph-uri/using-named-graph-uri parameter and USING/WITH clause
+
+
+
+type
+mf:ProtocolTest
+approval
+dawgt:Approved
+approvedBy
+
+http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3
+
+
+
+
+
+
+
Request
+
POST
+/sparql
+HTTP/1.1
+Host: www.example
+
+
+
+Content-Type :
+application/x-www-form-urlencoded
+
+
+
+
+
+
+using-named-graph-uri=http%3A%2F%2Fexample%2Fpeople&update=%0APREFIX%20foaf%3A%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0AWITH%20%3Chttp%3A%2F%2Fexample%2Faddresses%3E%0ADELETE%20%7B%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%20%7D%0AINSERT%20%7B%20%3Fperson%20foaf%3AgivenName%20%27William%27%20%7D%0AWHERE%20%7B%0A%20%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%0A%7D%0A
+
+
+
+
Response
+4XX
+
+response
+
+
+
+
+
+
+
+
+
diff --git a/sparql11/data-sparql11/protocol/manifest.jsonld b/sparql11/data-sparql11/protocol/manifest.jsonld
new file mode 100644
index 00000000..fe235227
--- /dev/null
+++ b/sparql11/data-sparql11/protocol/manifest.jsonld
@@ -0,0 +1,1813 @@
+{
+ "@context": {
+ "@base": "http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest",
+ "cnt": "http://www.w3.org/2011/content#",
+ "dawgt": "http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#",
+ "ht": "http://www.w3.org/2011/http#",
+ "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",
+ "mq": "http://www.w3.org/2001/sw/DataAccess/tests/test-query#",
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "action": {
+ "@id": "mf:action",
+ "@type": "@id"
+ },
+ "approval": {
+ "@id": "dawgt:approval",
+ "@type": "@id"
+ },
+ "approvedBy": {
+ "@id": "dawgt:approvedBy",
+ "@type": "@id"
+ },
+ "comment": {
+ "@id": "rdfs:comment"
+ },
+ "data": {
+ "@id": "mq:data",
+ "@type": "@id"
+ },
+ "entries": {
+ "@id": "mf:entries",
+ "@container": "@list",
+ "@type": "@id"
+ },
+ "feature": {
+ "@id": "mf:feature",
+ "@type": "@vocab"
+ },
+ "graphData": {
+ "@id": "mq:graphData",
+ "@type": "@id"
+ },
+ "label": {
+ "@id": "rdfs:label"
+ },
+ "name": {
+ "@id": "mf:name"
+ },
+ "notable": {
+ "@id": "mf:notable",
+ "@type": "@vocab"
+ },
+ "query": {
+ "@id": "mq:query",
+ "@type": "@id"
+ },
+ "queryForm": {
+ "@id": "mq:queryForm",
+ "@type": "@vocab"
+ },
+ "requires": {
+ "@id": "mf:requires",
+ "@type": "@vocab",
+ "@container": "@set"
+ },
+ "result": {
+ "@id": "mf:result",
+ "@type": "@id"
+ },
+ "headerElements": {
+ "@id": "ht:headerElements",
+ "@container": "@list"
+ },
+ "headers": {
+ "@id": "ht:headers",
+ "@container": "@list"
+ },
+ "params": {
+ "@id": "ht:params",
+ "@container": "@list"
+ },
+ "requests": {
+ "@id": "ht:requests",
+ "@container": "@list"
+ }
+ },
+ "@id": "",
+ "@type": "mf:Manifest",
+ "label": "SPARQL Protocol",
+ "comment": "\nTest descriptions used for generating Manifest and HTML renderings.\nTest HTTP connection described using HTTP and CNT vocabularies.\nIn responses, status values such as \"2XX\", \"3XX\" are used to match the actual response status.\nMultiple values for Content-Type mean that the response MUST include one or more of these types.\nResponses for ASK match any specified boolean content.\nSome tests require special result processing.\n ",
+ "entries": [
+ {
+ "@id": "#query_get",
+ "@type": "mf:ProtocolTest",
+ "name": "query via GET",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "GET",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_post_form",
+ "@type": "mf:ProtocolTest",
+ "name": "query via URL-encoded POST",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_post_direct",
+ "@type": "mf:ProtocolTest",
+ "name": "query via POST directly",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-query",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-query"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "ASK {}",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_dataset_default_graph",
+ "@type": "mf:ProtocolTest",
+ "name": "query with protocol-specified default graph",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%3Fp%20%3Fo%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_dataset_default_graphs_get",
+ "@type": "mf:ProtocolTest",
+ "name": "GET query with protocol-specified default graphs",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "GET",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20.%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20.%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf",
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_dataset_default_graphs_post",
+ "@type": "mf:ProtocolTest",
+ "name": "POST query with protocol-specified default graphs",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20.%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20.%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_dataset_named_graphs_post",
+ "@type": "mf:ProtocolTest",
+ "name": "POST query with protocol-specified named graphs",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=ASK%20%7B%20GRAPH%20%3Fg1%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20%7D%20GRAPH%20%3Fg2%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20%7D%20%7D&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_dataset_named_graphs_get",
+ "@type": "mf:ProtocolTest",
+ "name": "GET query with protocol-specified named graphs",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "GET",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?query=ASK%20%7B%20GRAPH%20%3Fg1%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20%7D%20GRAPH%20%3Fg2%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20%7D%20%7D&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf",
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_dataset_full",
+ "@type": "mf:ProtocolTest",
+ "name": "query with protocol-specified dataset (both named and default graphs)",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=%0AASK%20%7B%0A%20%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20a%20%3Ftype%0A%20%20GRAPH%20%3Fg1%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20%7D%0A%20%20GRAPH%20%3Fg2%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20%7D%0A%7D%0A&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_multiple_dataset",
+ "@type": "mf:ProtocolTest",
+ "name": "query specifying dataset in both query string and protocol; test for use of protocol-specified dataset",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=ASK%20FROM%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20%7B%20GRAPH%20%3Fg1%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20%7D%20GRAPH%20%3Fg2%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20%7D%20%7D&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": true,
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_content_type_select",
+ "@type": "mf:ProtocolTest",
+ "name": "SELECT query appropriate content type (expect one of: XML, JSON, CSV, TSV)",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=SELECT%20%281%20AS%20%3Fvalue%29%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, text/csv",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "text/tab-separated-values"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "text/csv"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_content_type_ask",
+ "@type": "mf:ProtocolTest",
+ "name": "ASK query appropriate content type (expect one of: XML, JSON)",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml, application/sparql-results+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+json"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_content_type_describe",
+ "@type": "mf:ProtocolTest",
+ "name": "DESCRIBE query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD)",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=DESCRIBE%20%3Chttp%3A%2F%2Fexample.org%2F%3E&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/rdf+xml, text/turtle, application/n-triples, text/html, application/ld+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/rdf+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "text/turtle"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/n-triples"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "text/html"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/ld+json"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#query_content_type_construct",
+ "@type": "mf:ProtocolTest",
+ "name": "CONSTRUCT query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD))",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=CONSTRUCT%20%7B%20%3Cs%3E%20%3Cp%3E%201%20%7D%20WHERE%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/rdf+xml, text/turtle, application/n-triples, text/html, application/ld+json",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/rdf+xml"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "text/turtle"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/n-triples"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "text/html"
+ },
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/ld+json"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#update_dataset_default_graph",
+ "@type": "mf:ProtocolTest",
+ "name": "update with protocol-specified default graph",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "update=%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0ACLEAR%20ALL%20%3B%0AINSERT%20DATA%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%7B%0A%20%20%20%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20foaf%3ADocument%0A%20%20%7D%0A%7D%20%3B%0AINSERT%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-update-dataset-test%2F%3E%20%7B%0A%20%20%20%20%3Fs%20a%20dc%3ABibliographicResource%0A%20%20%7D%0A%7D%0AWHERE%20%7B%0A%20%20%3Fs%20a%20foaf%3ADocument%0A%7D%0A",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ]
+ }
+ },
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Accept",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ },
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-query",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-query"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "\nASK {\n GRAPH {\n a \n }\n}\n",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#update_dataset_default_graphs",
+ "@type": "mf:ProtocolTest",
+ "name": "update with protocol-specified default graphs",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "update=%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0ADROP%20ALL%20%3B%0AINSERT%20DATA%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%7D%20%3B%0AINSERT%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-update-dataset-graphs-test%2F%3E%20%7B%0A%20%20%20%20%3Fs%20a%20dc%3ABibliographicResource%0A%20%20%7D%0A%7D%0AWHERE%20%7B%0A%20%20%3Fs%20a%20foaf%3ADocument%0A%7D%0A",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ]
+ }
+ },
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Accept",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ },
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-query",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-query"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "\nASK {\n GRAPH {\n a .\n a .\n }\n FILTER NOT EXISTS {\n GRAPH {\n a .\n }\n }\n}\n",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#update_dataset_named_graphs",
+ "@type": "mf:ProtocolTest",
+ "name": "update with protocol-specified named graphs",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "update=%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0ADROP%20ALL%20%3B%0AINSERT%20DATA%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%7D%20%3B%0AINSERT%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-update-dataset-named-graphs-test%2F%3E%20%7B%0A%20%20%20%20%3Fs%20a%20dc%3ABibliographicResource%0A%20%20%7D%0A%7D%0AWHERE%20%7B%0A%20%20GRAPH%20%3Fg%20%7B%0A%20%20%20%20%3Fs%20a%20foaf%3ADocument%0A%20%20%7D%0A%7D%0A",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ]
+ }
+ },
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Accept",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ },
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-query",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-query"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "\nASK {\n GRAPH {\n a .\n a .\n }\n FILTER NOT EXISTS {\n GRAPH {\n a .\n }\n }\n}\n",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#update_dataset_full",
+ "@type": "mf:ProtocolTest",
+ "name": "update with protocol-specified dataset (both named and default graphs)",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?update=%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0ADROP%20ALL%20%3B%0AINSERT%20DATA%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf%3E%20a%20foaf%3ADocument%20%7D%0A%7D%20%3B%0AINSERT%20%7B%0A%20%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-update-dataset-full-test%2F%3E%20%7B%0A%20%20%20%20%3Fs%20%3Chttp%3A%2F%2Fexample.org%2Fin%3E%20%3Fin%0A%20%20%7D%0A%7D%0AWHERE%20%7B%0A%20%20%7B%0A%20%20%20%20GRAPH%20%3Fg%20%7B%20%3Fs%20a%20foaf%3ADocument%20%7D%0A%20%20%20%20BIND%28%3Fg%20AS%20%3Fin%29%0A%20%20%7D%0A%20%20UNION%0A%20%20%7B%0A%20%20%20%20%3Fs%20a%20foaf%3ADocument%20.%0A%20%20%20%20BIND%28%22default%22%20AS%20%3Fin%29%0A%20%20%7D%0A%7D%0A&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf",
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ]
+ }
+ },
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Accept",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ },
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-query",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-query"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "\nASK {\n GRAPH {\n \"default\" .\n .\n }\n FILTER NOT EXISTS {\n GRAPH {\n ?p ?o\n }\n }\n}\n",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#update_post_form",
+ "@type": "mf:ProtocolTest",
+ "name": "update via URL-encoded POST",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "update=CLEAR%20ALL",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#update_post_direct",
+ "@type": "mf:ProtocolTest",
+ "name": "update via POST directly",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-update",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-update"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "CLEAR ALL",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#update_base_uri",
+ "@type": "mf:ProtocolTest",
+ "name": "test for service-defined BASE URI (\"which MAY be the service endpoint\")",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "update=CLEAR%20SILENT%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-base-test%2F%3E%20%3B%20INSERT%20DATA%20%7B%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-base-test%2F%3E%20%7B%20%3Chttp%3A%2F%2Fexample.org%2Fs%3E%20%3Chttp%3A%2F%2Fexample.org%2Fp%3E%20%3Ctest%3E%20%7D%20%7D",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ]
+ }
+ },
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Accept",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=SELECT%20%3Fo%20WHERE%20%7B%20GRAPH%20%3Chttp%3A%2F%2Fexample.org%2Fprotocol-base-test%2F%3E%20%7B%20%3Chttp%3A%2F%2Fexample.org%2Fs%3E%20%3Chttp%3A%2F%2Fexample.org%2Fp%3E%20%3Fo%20%7D%20%7D",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "2XX",
+ "3XX"
+ ],
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-results+xml",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-results+xml"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "one result with `?o` bound to an IRI that is _not_ ``",
+ "cnt:characterEncoding": "UTF-8"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_query_method",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke query operation with a method other than GET or POST",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "PUT",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_multiple_queries",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke query operation with more than one query string",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "GET",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?query=ASK%20%7B%7D&query=SELECT%20%2A%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_query_wrong_media_type",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke query operation with a POST with media type that's not url-encoded or application/sparql-query",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "text/plain",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "text/plain"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "ASK {}",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_query_missing_form_type",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke query operation with url-encoded body, but without application/x-www-form-urlencoded media type",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_query_missing_direct_type",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke query operation with SPARQL body, but without application/sparql-query media type",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "ASK {}",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_query_non_utf8",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke query operation with direct POST, but with a non-UTF8 encoding (UTF-16)",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-query; charset=UTF-16",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-query",
+ "params": [
+ {
+ "@type": "ht:Parameter",
+ "ht:paramName": "charset",
+ "ht:paramValue": "UTF-16"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "ASK {}",
+ "cnt:characterEncoding": "UTF-16"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_query_syntax",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke query operation with invalid query syntax (4XX result)",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "GET",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?query=ASK%20%7B&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_update_get",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke update operation with GET",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "GET",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?update=CLEAR%20ALL&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_multiple_updates",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke update operation with more than one update string",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "update=CLEAR%20ALL&update=CLEAR%20DEFAULT",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_update_wrong_media_type",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke update operation with a POST with media type that's not url-encoded or application/sparql-update",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "text/plain",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "text/plain"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "CLEAR NAMED",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_update_missing_form_type",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke update operation with url-encoded body, but without application/x-www-form-urlencoded media type",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "CLEAR NAMED",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_update_non_utf8",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke update operation with direct POST, but with a non-UTF8 encoding",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/sparql-update; charset=UTF-16",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/sparql-update",
+ "params": [
+ {
+ "@type": "ht:Parameter",
+ "ht:paramName": "charset",
+ "ht:paramValue": "UTF-16"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "CLEAR NAMED",
+ "cnt:characterEncoding": "UTF-16"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_update_syntax",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke update operation with invalid update syntax (4XX result)",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf",
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "update=CLEAR%20XYZ",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "@id": "#bad_update_dataset_conflict",
+ "@type": "mf:ProtocolTest",
+ "name": "invoke update with both using-graph-uri/using-named-graph-uri parameter and USING/WITH clause",
+ "approval": "dawgt:Approved",
+ "approvedBy": "http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3",
+ "action": {
+ "@type": "ht:Connection",
+ "ht:connectionAuthority": "www.example",
+ "requests": [
+ {
+ "@type": "ht:Request",
+ "ht:methodName": "POST",
+ "ht:httpVersion": "1.1",
+ "ht:absolutePath": "/sparql",
+ "headers": [
+ {
+ "@type": "ht:RequestHeader",
+ "ht:fieldName": "Content-Type",
+ "ht:fieldValue": "application/x-www-form-urlencoded",
+ "headerElements": [
+ {
+ "@type": "ht:HeaderElement",
+ "ht:elementName": "application/x-www-form-urlencoded"
+ }
+ ]
+ }
+ ],
+ "ht:body": {
+ "@type": "cnt:ContentAsText",
+ "cnt:chars": "using-named-graph-uri=http%3A%2F%2Fexample%2Fpeople&update=%0APREFIX%20foaf%3A%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0AWITH%20%3Chttp%3A%2F%2Fexample%2Faddresses%3E%0ADELETE%20%7B%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%20%7D%0AINSERT%20%7B%20%3Fperson%20foaf%3AgivenName%20%27William%27%20%7D%0AWHERE%20%7B%0A%20%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%0A%7D%0A",
+ "cnt:characterEncoding": "UTF-8"
+ },
+ "ht:resp": {
+ "@type": "ht:Response",
+ "ht:statusCodeValue": [
+ "4XX"
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+}
diff --git a/sparql11/data-sparql11/protocol/manifest.ttl b/sparql11/data-sparql11/protocol/manifest.ttl
index 407ecece..d921c0d7 100644
--- a/sparql11/data-sparql11/protocol/manifest.ttl
+++ b/sparql11/data-sparql11/protocol/manifest.ttl
@@ -1,961 +1,1429 @@
@prefix : .
-@prefix rdf: .
-@prefix rdfs: .
-@prefix mf: .
-@prefix qt: .
-@prefix dawgt: .
-
-<> rdf:type mf:Manifest ;
- rdfs:label "SPARQL Protocol" ;
- mf:entries
- (
- :query_post_form
- :query_dataset_default_graphs_get
- :query_dataset_default_graphs_post
- :query_dataset_named_graphs_post
- :query_dataset_named_graphs_get
- :query_dataset_full
- :query_multiple_dataset
- :query_get
- :query_content_type_select
- :query_content_type_ask
- :query_content_type_describe
- :query_content_type_construct
- :update_dataset_default_graph
- :update_dataset_default_graphs
- :update_dataset_named_graphs
- :update_dataset_full
- :update_post_form
- :update_post_direct
- :update_base_uri
- :query_post_direct
- :bad_query_method
- :bad_multiple_queries
- :bad_query_wrong_media_type
- :bad_query_missing_form_type
- :bad_query_missing_direct_type
- :bad_query_non_utf8
- :bad_query_syntax
- :bad_update_get
- :bad_multiple_updates
- :bad_update_wrong_media_type
- :bad_update_missing_form_type
- :bad_update_non_utf8
- :bad_update_syntax
- :bad_update_dataset_conflict
- ) .
-
-:query_post_form rdf:type mf:ProtocolTest ;
- mf:name "query via URL-encoded POST" ;
- rdfs:comment """
-#### Request
-
- POST /sparql/ HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/x-www-url-form-urlencoded
- Content-Length: XXX
-
- query=ASK%20%7B%7D
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml or application/sparql-results+json
-
- true
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_dataset_default_graphs_get rdf:type mf:ProtocolTest ;
- mf:name "GET query with protocol-specified default graph" ;
- rdfs:comment """
-#### Request
-
- GET /sparql?query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20.%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20.%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf
- Host: www.example
- User-agent: sparql-client/0.1
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml or application/sparql-results+json
-
- true
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_dataset_default_graphs_post rdf:type mf:ProtocolTest ;
- mf:name "POST query with protocol-specified default graphs" ;
- rdfs:comment """
-#### Request
-
- POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/sparql-query
- Content-Length: XXX
-
- ASK { ?p ?o . ?p ?o }
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml or application/sparql-results+json
-
- true
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_dataset_named_graphs_post rdf:type mf:ProtocolTest ;
- mf:name "POST query with protocol-specified named graphs" ;
- rdfs:comment """
-#### Request
-
- POST /sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/sparql-query
- Content-Length: XXX
-
- ASK { GRAPH ?g { ?s ?p ?o } }
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml or application/sparql-results+json
-
- true
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_dataset_named_graphs_get rdf:type mf:ProtocolTest ;
- mf:name "GET query with protocol-specified named graphs" ;
- rdfs:comment """
-#### Request
-
- GET /sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf&query=ASK%20%7B%20GRAPH%20%3Fg%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20%7D HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml or application/sparql-results+json
-
- true
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_dataset_full rdf:type mf:ProtocolTest ;
- mf:name "query with protocol-specified dataset (both named and default graphs)" ;
- rdfs:comment """
-#### Request
-
- POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/sparql-query
- Content-Length: XXX
-
- SELECT ?g ?x ?s { ?x ?y ?o GRAPH ?g { ?s ?p ?o } }
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml or application/sparql-results+json
-
- true
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_multiple_dataset rdf:type mf:ProtocolTest ;
- mf:name "query specifying dataset in both query string and protocol; test for use of protocol-specified dataset" ;
- rdfs:comment """
-#### Request
-
- POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/sparql-query
- Content-Length: XXX
-
- ASK FROM { ?p ?o }
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml or application/sparql-results+json
-
- true
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_get rdf:type mf:ProtocolTest ;
- mf:name "query via GET" ;
- rdfs:comment """
-#### Request
-
- GET /sparql?query=ASK%20%7B%7D
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml or application/sparql-results+json
-
- true
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_content_type_select rdf:type mf:ProtocolTest ;
- mf:name "query appropriate content type (expect one of: XML, JSON, CSV, TSV)" ;
- rdfs:comment """
-#### Request
-
- POST /sparql/ HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/sparql-query
- Content-Length: XXX
-
- SELECT (1 AS ?value) {}
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, or text/csv
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_content_type_ask rdf:type mf:ProtocolTest ;
- mf:name "query appropriate content type (expect one of: XML, JSON)" ;
- rdfs:comment """
-#### Request
-
- POST /sparql/ HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/sparql-query
- Content-Length: XXX
-
- ASK {}
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/sparql-results+xml or application/sparql-results+json
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_content_type_describe rdf:type mf:ProtocolTest ;
- mf:name "query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa)" ;
- rdfs:comment """
-#### Request
-
- POST /sparql/ HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/sparql-query
- Content-Length: XXX
-
- DESCRIBE
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/rdf+xml, application/rdf+json or text/turtle
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:query_content_type_construct rdf:type mf:ProtocolTest ;
- mf:name "query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa)" ;
- rdfs:comment """
-#### Request
-
- POST /sparql/ HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/sparql-query
- Content-Length: XXX
-
- CONSTRUCT { 1 } WHERE {}
-
-#### Response
-
- 2xx or 3xx response
- Content-Type: application/rdf+xml, application/rdf+json or text/turtle
- """ ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy ;
- .
-
-:update_dataset_default_graph rdf:type mf:ProtocolTest ;
- mf:name "update with protocol-specified default graph" ;
- rdfs:comment """
-#### Request
-
- POST /sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf HTTP/1.1
- Host: www.example
- User-agent: sparql-client/0.1
- Content-Type: application/sparql-update
- Content-Length: XXX
-
- PREFIX dc:
- PREFIX foaf:
- CLEAR ALL ;
- INSERT DATA {
- GRAPH {
- a foaf:Document
- }
- } ;
- INSERT {
- GRAPH {
- ?s a dc:BibliographicResource
- }
+@prefix cnt: .
+@prefix dawgt: .
+@prefix ht: .
+@prefix mf: .
+@prefix rdf: .
+@prefix rdfs: .
+
+<> a mf:Manifest;
+ rdfs:label "SPARQL Protocol";
+ rdfs:comment """
+Test descriptions used for generating Manifest and HTML renderings.
+Test HTTP connection described using HTTP and CNT vocabularies.
+In responses, status values such as \"2XX\", \"3XX\" are used to match the actual response status.
+Multiple values for Content-Type mean that the response MUST include one or more of these types.
+Responses for ASK match any specified boolean content.
+Some tests require special result processing.
+ """;
+ mf:entries (
+ :query_get
+ :query_post_form
+ :query_post_direct
+ :query_dataset_default_graph
+ :query_dataset_default_graphs_get
+ :query_dataset_default_graphs_post
+ :query_dataset_named_graphs_post
+ :query_dataset_named_graphs_get
+ :query_dataset_full
+ :query_multiple_dataset
+ :query_content_type_select
+ :query_content_type_ask
+ :query_content_type_describe
+ :query_content_type_construct
+ :update_dataset_default_graph
+ :update_dataset_default_graphs
+ :update_dataset_named_graphs
+ :update_dataset_full
+ :update_post_form
+ :update_post_direct
+ :update_base_uri
+ :bad_query_method
+ :bad_multiple_queries
+ :bad_query_wrong_media_type
+ :bad_query_missing_form_type
+ :bad_query_missing_direct_type
+ :bad_query_non_utf8
+ :bad_query_syntax
+ :bad_update_get
+ :bad_multiple_updates
+ :bad_update_wrong_media_type
+ :bad_update_missing_form_type
+ :bad_update_non_utf8
+ :bad_update_syntax
+ :bad_update_dataset_conflict) .
+
+:bad_multiple_queries a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?query=ASK%20%7B%7D&query=SELECT%20%2A%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:httpVersion "1.1";
+ ht:methodName "GET";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke query operation with more than one query string" .
+
+:bad_multiple_updates a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:body [
+ a cnt:ContentAsText;
+ cnt:characterEncoding "UTF-8";
+ cnt:chars "update=CLEAR%20ALL&update=CLEAR%20DEFAULT"
+ ];
+ ht:httpVersion "1.1";
+ ht:methodName "POST";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke update operation with more than one update string" .
+
+:bad_query_method a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:httpVersion "1.1";
+ ht:methodName "PUT";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke query operation with a method other than GET or POST" .
+
+:bad_query_missing_direct_type a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:body [
+ a cnt:ContentAsText;
+ cnt:characterEncoding "UTF-8";
+ cnt:chars "ASK {}"
+ ];
+ ht:httpVersion "1.1";
+ ht:methodName "POST";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke query operation with SPARQL body, but without application/sparql-query media type" .
+
+:bad_query_missing_form_type a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql";
+ ht:body [
+ a cnt:ContentAsText;
+ cnt:characterEncoding "UTF-8";
+ cnt:chars "query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf"
+ ];
+ ht:httpVersion "1.1";
+ ht:methodName "POST";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke query operation with url-encoded body, but without application/x-www-form-urlencoded media type" .
+
+:bad_query_non_utf8 a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:body [
+ a cnt:ContentAsText;
+ cnt:characterEncoding "UTF-16";
+ cnt:chars "ASK {}"
+ ];
+ ht:headers ([
+ a ht:RequestHeader;
+ ht:fieldName "Content-Type";
+ ht:fieldValue "application/sparql-query; charset=UTF-16";
+ ht:headerElements ([
+ a ht:HeaderElement;
+ ht:elementName "application/sparql-query";
+ ht:params ([
+ a ht:Parameter;
+ ht:paramName "charset";
+ ht:paramValue "UTF-16"
+ ])
+ ])
+ ]);
+ ht:httpVersion "1.1";
+ ht:methodName "POST";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke query operation with direct POST, but with a non-UTF8 encoding (UTF-16)" .
+
+:bad_query_syntax a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?query=ASK%20%7B&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:httpVersion "1.1";
+ ht:methodName "GET";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke query operation with invalid query syntax (4XX result)" .
+
+:bad_query_wrong_media_type a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:body [
+ a cnt:ContentAsText;
+ cnt:characterEncoding "UTF-8";
+ cnt:chars "ASK {}"
+ ];
+ ht:headers ([
+ a ht:RequestHeader;
+ ht:fieldName "Content-Type";
+ ht:fieldValue "text/plain";
+ ht:headerElements ([
+ a ht:HeaderElement;
+ ht:elementName "text/plain"
+ ])
+ ]);
+ ht:httpVersion "1.1";
+ ht:methodName "POST";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke query operation with a POST with media type that's not url-encoded or application/sparql-query" .
+
+:bad_update_dataset_conflict a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql";
+ ht:body [
+ a cnt:ContentAsText;
+ cnt:characterEncoding "UTF-8";
+ cnt:chars "using-named-graph-uri=http%3A%2F%2Fexample%2Fpeople&update=%0APREFIX%20foaf%3A%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0AWITH%20%3Chttp%3A%2F%2Fexample%2Faddresses%3E%0ADELETE%20%7B%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%20%7D%0AINSERT%20%7B%20%3Fperson%20foaf%3AgivenName%20%27William%27%20%7D%0AWHERE%20%7B%0A%20%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%0A%7D%0A"
+ ];
+ ht:headers ([
+ a ht:RequestHeader;
+ ht:fieldName "Content-Type";
+ ht:fieldValue "application/x-www-form-urlencoded";
+ ht:headerElements ([
+ a ht:HeaderElement;
+ ht:elementName "application/x-www-form-urlencoded"
+ ])
+ ]);
+ ht:httpVersion "1.1";
+ ht:methodName "POST";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke update with both using-graph-uri/using-named-graph-uri parameter and USING/WITH clause" .
+
+:bad_update_get a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?update=CLEAR%20ALL&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:httpVersion "1.1";
+ ht:methodName "GET";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke update operation with GET" .
+
+:bad_update_missing_form_type a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:body [
+ a cnt:ContentAsText;
+ cnt:characterEncoding "UTF-8";
+ cnt:chars "CLEAR NAMED"
+ ];
+ ht:httpVersion "1.1";
+ ht:methodName "POST";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke update operation with url-encoded body, but without application/x-www-form-urlencoded media type" .
+
+:bad_update_non_utf8 a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy ;
+ mf:action [
+ a ht:Connection;
+ ht:connectionAuthority "www.example";
+ ht:requests ([
+ a ht:Request;
+ ht:absolutePath "/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf";
+ ht:body [
+ a cnt:ContentAsText;
+ cnt:characterEncoding "UTF-16";
+ cnt:chars "CLEAR NAMED"
+ ];
+ ht:headers ([
+ a ht:RequestHeader;
+ ht:fieldName "Content-Type";
+ ht:fieldValue "application/sparql-update; charset=UTF-16";
+ ht:headerElements ([
+ a ht:HeaderElement;
+ ht:elementName "application/sparql-update";
+ ht:params ([
+ a ht:Parameter;
+ ht:paramName "charset";
+ ht:paramValue "UTF-16"
+ ])
+ ])
+ ]);
+ ht:httpVersion "1.1";
+ ht:methodName "POST";
+ ht:resp [
+ a ht:Response;
+ ht:statusCodeValue "4XX"
+ ]
+ ])
+ ];
+ mf:name "invoke update operation with direct POST, but with a non-UTF8 encoding" .
+
+:bad_update_syntax a mf:ProtocolTest;
+ dawgt:approval dawgt:Approved;
+ dawgt:approvedBy