diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index a5c39e0f..b4ebc542 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -21,7 +21,10 @@ jobs: - name: Install dependencies run: bundle install - name: Generate Test Manifests - run: bundle exec rake + run: | + bundle exec rake + (cd sparql/sparql11/protocol; bundle exec rake) + (cd sparql/sparql11/http-rdf-update; bundle exec rake) - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Automated manifest generation diff --git a/Gemfile b/Gemfile index 591c5ad0..941c4f39 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,8 @@ ruby "3.4.3" gem 'rake' gem 'json-ld' gem 'rdf-turtle' +gem 'rdf-reasoner' +gem 'rdf-rdfa' gem 'haml', '~> 6.3' gem 'htmlbeautifier', '~> 1.4' gem 'kramdown', '~> 2.5' @@ -11,3 +13,4 @@ gem 'logger', '~> 1.7' gem 'ostruct', '~> 0.6' gem 'nokogiri', '~> 1.18' gem 'pathname', '~> 0.4' +gem 'getoptlong' diff --git a/Gemfile.lock b/Gemfile.lock index 5b004919..1552dabf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,6 +11,7 @@ GEM scanf (~> 1.0) sxp (~> 2.0) unicode-types (~> 1.8) + getoptlong (0.2.1) haml (6.3.0) temple (>= 0.8.2) thor @@ -45,11 +46,28 @@ GEM bcp47_spec (~> 0.2) bigdecimal (~> 3.1, >= 3.1.5) link_header (~> 0.0, >= 0.0.8) + rdf-aggregate-repo (3.3.0) + rdf (~> 3.3) + rdf-rdfa (3.3.0) + haml (~> 6.1) + htmlentities (~> 4.3) + rdf (~> 3.3) + rdf-aggregate-repo (~> 3.3) + rdf-vocab (~> 3.3) + rdf-xsd (~> 3.3) + rdf-reasoner (0.9.0) + rdf (~> 3.3) + rdf-xsd (~> 3.3) rdf-turtle (3.3.1) base64 (~> 0.2) bigdecimal (~> 3.1, >= 3.1.5) ebnf (~> 2.5) rdf (~> 3.3) + rdf-vocab (3.3.2) + rdf (~> 3.3) + rdf-xsd (3.3.0) + rdf (~> 3.3) + rexml (~> 3.2) rexml (3.4.1) scanf (1.0.0) sxp (2.0.0) @@ -66,6 +84,7 @@ PLATFORMS x86_64-linux DEPENDENCIES + getoptlong haml (~> 6.3) htmlbeautifier (~> 1.4) json-ld @@ -75,6 +94,8 @@ DEPENDENCIES ostruct (~> 0.6) pathname (~> 0.4) rake + rdf-rdfa + rdf-reasoner rdf-turtle RUBY VERSION diff --git a/Rakefile b/Rakefile index e99d8e1a..9435079c 100644 --- a/Rakefile +++ b/Rakefile @@ -9,7 +9,7 @@ require 'pathname' task default: :index -MANIFESTS = Dir.glob("**/manifest*.ttl").reject {|f| f.include?('-az')} +MANIFESTS = Dir.glob("**/manifest*.ttl").reject {|f| f.include?('-az') || f.include?('protocol') || f.include?('http-rdf-update')} SPECS = { "rdf-concepts/spec/index.html" => "FIXME", diff --git a/rdf/rdf11/rdf-trig/reports/template.md b/rdf/rdf11/rdf-trig/reports/template.md index 63987773..6bfa81a9 100644 --- a/rdf/rdf11/rdf-trig/reports/template.md +++ b/rdf/rdf11/rdf-trig/reports/template.md @@ -211,7 +211,7 @@ a doap:Project, earl:TestSubject, earl:Software ; doap:name "RDF::TriG" ; - doap:homepage ; + doap:homepage ; doap:license ; doap:description "RDF::TriG is an TriG reader/writer for the RDF.rb library suite."@en ; doap:created "2011-08-29"^^xsd:date ; diff --git a/rdf/rdf11/rdf-turtle/reports/template.md b/rdf/rdf11/rdf-turtle/reports/template.md index ae56a5cc..f969644b 100644 --- a/rdf/rdf11/rdf-turtle/reports/template.md +++ b/rdf/rdf11/rdf-turtle/reports/template.md @@ -213,7 +213,7 @@ a doap:Project, earl:TestSubject, earl:Software ; doap:name "RDF::Turtle" ; - doap:homepage ; + doap:homepage ; doap:license ; doap:description "RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite."@en ; doap:created "2011-08-29"^^xsd:date ; diff --git a/sparql/sparql11/http-rdf-update/Rakefile b/sparql/sparql11/http-rdf-update/Rakefile new file mode 100644 index 00000000..d949df1f --- /dev/null +++ b/sparql/sparql11/http-rdf-update/Rakefile @@ -0,0 +1,17 @@ +# Builds manifests +task default: [:jsonld, :ttl, :html] + +desc "Create manifest.jsonld" +task jsonld: "gen_manifest.rb" do + %x(ruby gen_manifest.rb -o manifest.jsonld) +end + +desc "Create manifest.ttl" +task ttl: "gen_manifest.rb" do + %x(ruby gen_manifest.rb --format ttl -o manifest.ttl) +end + +desc "Create index.html" +task html: "gen_manifest.rb" do + %x(ruby gen_manifest.rb --format html -o index.html) +end diff --git a/sparql/sparql11/http-rdf-update/gen_manifest.rb b/sparql/sparql11/http-rdf-update/gen_manifest.rb new file mode 100644 index 00000000..7949f528 --- /dev/null +++ b/sparql/sparql11/http-rdf-update/gen_manifest.rb @@ -0,0 +1,647 @@ +require 'cgi' +require 'getoptlong' +require 'json/ld' +require 'rdf/rdfa' +require 'rdf/reasoner' +require 'rdf/turtle' +require 'haml' +require 'htmlbeautifier' + +# Test descriptions used for generating Manifest and HTML renderings. +# +# ### Request (`req`): +# * `method`: HTTP request method +# * `content`: HTTP request content. If an object/hash, used to create application/x-www-form-urlencoded content. If the request `Content-Type` header indicates a text encoding this MUST be used for encoding any POST content. +# * `Accept`: HTTP request accept header +# * `Content-Type`: HTTP request content-type (defaults to `application/x-www-form-urlencoded` for POST). +# * Other entries are encoded as request query parameters. +# +# If `req` has more than one entry, the intermediate response is expected to be a success with the following `resp` description used to match the final response. +# +# ### Response (`resp`): +# `status`: HTTP response status to match. +# `Content-Type`: response content-type expected to match one of these. +POSITIVE_TESTS = { + put__initial_state: { + name: "PUT - Initial state", + req: [{ + method: :PUT, + path: "$GRAPHSTORE$/person/1.ttl", + Host: "$HOST$", + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + + a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn "John Doe" + ]. +), + resp: { + status: %w(201) + } + }], + }, + get_of_put__initial_state: { + name: "GET of PUT - Initial state", + req: [{ + method: :GET, + path: "$GRAPHSTORE$?graph=$GRAPHSTORE$/person/1.ttl", + Host: "$HOST$", + Accept: "text/turtle", + resp: { + status: %w(200), + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + + a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn "John Doe" + ]. +) + } + }], + }, + put__graph_already_in_store: { + name: "PUT - graph already in store", + req: [{ + method: :PUT, + path: "$GRAPHSTORE$/person/1", + Host: "$HOST$", + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + + a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn "Jane Doe" + ]. +), + resp: { + status: %w(204), + } + }], + }, + get_of_put__graph_already_in_store: { + name: "GET of PUT - graph already in store", + req: [{ + method: :GET, + path: "$GRAPHSTORE$/person/1", + Host: "$HOST$", + Accept: "text/turtle", + resp: { + status: %w(200), + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + + a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn "Jane Doe" + ] . +) + } + }], + }, + put__default_graph: { + name: "PUT - default graph", + req: [{ + method: :PUT, + path: "$GRAPHSTORE$?default", + Host: "$HOST$", + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name "Alice" + ] . +), + resp: { + status: %w(201), + } + }], + }, + get_of_put__default_graph: { + name: "GET of PUT - default graph", + req: [{ + method: :GET, + path: "$GRAPHSTORE$?default", + Host: "$HOST$", + Accept: "text/turtle", + resp: { + status: %w(200), + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name "Alice" + ] . +) + } + }], + }, + put__mismatched_payload: { + name: "PUT - mismatched payload", + req: [{ + method: :PUT, + path: "$GRAPHSTORE$?default", + Host: "$HOST$", + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + + a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn "Jane Doe" + ]. +), + resp: { + status: %w(400), + } + }], + }, + delete__existing_graph: { + name: "DELETE - existing graph", + req: [{ + method: :DELETE, + path: "$GRAPHSTORE$/person/2.ttl", + Host: "$HOST$", + resp: { + status: %w(200), + } + }], + }, + get_of_delete__existing_graph: { + name: "GET of DELETE - existing graph", + req: [{ + method: :GET, + path: "$GRAPHSTORE$/person/2.ttl", + Host: "$HOST$", + resp: { + status: %w(404), + } + }], + }, + delete__nonexistent_graph: { + name: "DELETE - non-existent graph)", + req: [{ + method: :DELETE, + path: "$GRAPHSTORE$/person/2.ttl", + Host: "$HOST$", + resp: { + status: %w(404), + } + }], + }, + post__existing_graph: { + name: "POST - existing graph", + req: [{ + method: :POST, + path: "$GRAPHSTORE$/person/1.ttl", + Host: "$HOST$", + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . + + foaf:name "Jane Doe" +), + resp: { + status: %w(200), + } + }], + }, + get_of_post__existing_graph: { + name: "GET of POST - existing graph", + req: [{ + method: :GET, + path: "$GRAPHSTORE$/person/1.ttl", + Host: "$HOST$", + Accept: "text/turtle", + resp: { + status: %w(200), + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + + a foaf:Person; + foaf:name "Jane Doe"; + foaf:businessCard [ + a v:VCard; + v:fn "Jane Doe" + ] . +) + } + }], + }, + post__multipart_formdata: { + name: "POST - multipart/form-data", + req: [{ + method: :POST, + path: "$GRAPHSTORE$/person/1.ttl", + Host: "$HOST$", + "Content-Type": "multipart/form-data; boundary=a6fe4cd636164618814be9f8d3d1a0de", + content: %( +--a6fe4cd636164618814be9f8d3d1a0de +Content-Disposition: form-data; name="lastName.ttl"; filename="lastName.ttl" +Content-Type: text/turtle; charset=utf-8 + +@prefix foaf: . + foaf:familyName "Doe" + +--a6fe4cd636164618814be9f8d3d1a0de +Content-Disposition: form-data; name="firstName.ttl"; filename="firstName.ttl" +Content-Type: text/turtle; charset=utf-8 + +@prefix foaf: . + foaf:givenName "Jane" + +--a6fe4cd636164618814be9f8d3d1a0de-- + ), + resp: { + status: %w(200), + } + }], + }, + get_of_post__multipart_formdata: { + name: "GET of POST - multipart/form-data", + req: [{ + method: :GET, + path: "$GRAPHSTORE$/person/1.ttl", + Host: "$HOST$", + resp: { + status: %w(200), + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + + a foaf:Person; + foaf:name "Jane Doe"; + foaf:givenName "Jane"; + foaf:familyName "Doe"; + foaf:businessCard [ + a v:VCard; + v:fn "Jane Doe" + ] . +) + } + }], + }, + post__create__new_graph: { + name: "POST - create new graph", + req: [{ + method: :POST, + path: "$GRAPHSTORE$", + Host: "$HOST$", + "Content-Type": "text/turtle; charset=utf-8", + content: %( +@prefix foaf: . +@prefix v: . + +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name "Alice" + ] . +), + resp: { + status: %w(201), + Location: "$NEWPATH$" + } + }], + }, + get_of_post__create__new_graph: { + name: "GET of POST - create new graph", + req: [{ + method: :GET, + path: "$NEWPATH$", + Host: "$HOST$", + Accept: "text/turtle", + resp: { + status: %w(200), + "Content-Type": "text/turtle; charset=utf-8", + content: %( +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name "Alice" + ] . +) + } + }], + }, + get_of_post__after_noop: { + name: "GET of POST - after noop", + req: [{ + method: :GET, + path: "$NEWPATH$", + Host: "$HOST$", + Accept: "text/turtle", + resp: { + status: %w(200), + "Content-Type": "text/turtle; charset=utf-8", + content: %( +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name "Alice" + ] . +) + } + }] + }, + head_on_an_existing_graph: { + name: "", + req: [{ + method: :HEAD, + path: "$GRAPHSTORE$/person/1.ttl", + Host: "$HOST$", + resp: { + status: %w(200), + "Content-Type": "text/turtle; charset=utf-8", + } + }] + }, + head_on_a_nonexisting_graph: { + name: "HEAD on a non-existing graph", + req: [{ + method: :HEAD, + path: "$GRAPHSTORE$/person/4.ttl", + Host: "$HOST$", + resp: { + status: %w(404), + } + }] + } +} + +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:GraphStoreProtocolTest", + "name": params.delete(:name), + "approval": "dawg: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| + path = req[:path] + request = { + "@type": "ht:Request", + "ht:methodName": req[:method], + "ht:httpVersion": "1.1", + "ht:absolutePath": path, + } + + # Headers + req.each_key do |key| + next unless key.to_s.start_with?(/[A-Z]/) + (request[:headers] ||= []) << encode_header(req, key) + end + + request[:"ht:body"] = encode_body(req[:content]) if req[:content] + + if resp = req.delete(:resp) + response = { + "@type": "ht:Response", + "ht:statusCodeValue": Array(resp[:status]) + } + + resp.each_key do |key| + next unless key.to_s.start_with?(/[A-Z]/) + (request[:headers] ||= []) << encode_header(resp, key) + end + + 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": "https://w3c.github.io/rdf-tests/sparql/sparql11/http-rdf-update/manifest", + "cnt": "http://www.w3.org/2011/content#", + "dawg": "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": "dawg:approval", "@type": "@id"}, + "approvedBy": {"@id": "dawg: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 Graph Store Protocol", + "entries": [] +} + +POSITIVE_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 Graph Store 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__)) + haml_runner = if Haml::VERSION >= "6" + Haml::Template.new(format: :html5) {template} + else + Haml::Engine.new(template, format: :html5) + end + html = haml_runner.render(self, man: JSON.parse(man.to_json)) + validate(RDF::RDFa::Reader.new(html, base_uri: "https://w3c.github.io/rdf-tests/sparql/sparql11/http-rdf-update/manifest", validate: validate)) if validate + beautified = HtmlBeautifier.beautify(html) + "\n" + output.write(beautified) +when :jsonld + validate(JSON::LD::Reader.new(man.to_json, base_uri: "https://w3c.github.io/rdf-tests/sparql/sparql11/http-rdf-update/manifest", 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: { + "": "https://w3c.github.io/rdf-tests/sparql/sparql11/http-rdf-update/http-rdf-update/manifest#", + cnt: "http://www.w3.org/2011/content#", + dawg: "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#", + }, + base_uri: "https://w3c.github.io/rdf-tests/sparql/sparql11/http-rdf-update/manifest" + ) {|writer| writer << reader} + + validate(RDF::Turtle::Reader.new(ttl, base_uri: "https://w3c.github.io/rdf-tests/sparql/sparql11/http-rdf-update/manifest", validate: true)) if validate + + # Do some result hacking + 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/sparql/sparql11/http-rdf-update/index.html b/sparql/sparql11/http-rdf-update/index.html index b2abb2a0..9f5ffb89 100644 --- a/sparql/sparql11/http-rdf-update/index.html +++ b/sparql/sparql11/http-rdf-update/index.html @@ -1,5 +1,5 @@ - + @@ -27,6 +27,7 @@ dl.test-description>dt {margin-top: 2em;} dd {margin-left: 0;} dd code {display: inline;} + pre.code {margin-left: 0;} footer {text-align: center;} @@ -50,7 +51,7 @@ .error {color: red;} </style> </head> - <body resource='./' typeof='mf:Manifest'> + <body resource='' typeof='mf:Manifest'> <p> <a href='http://www.w3.org/'> <img alt='W3C' height='48' src='http://www.w3.org/Icons/w3c_home' width='72'> @@ -63,15 +64,64 @@ <h1 property='rdfs:label'>SPARQL Graph Store Protocol</h1> <h2 id='abstract'>Abstract</h2> <p property='rdfs:comment'> </p> - <p>This page describes W3C SPARQL Working Group's SPARQL 1.0 test suite.</p> - <p><strong>$HOST$</strong> is the host where the Graph Store Protocol implementation is listening</p> - <p><strong>$GRAPHSTORE$</strong> is the path of the URL of the graph store</p> - <p><strong>$NEWPATH$</strong> is the URL returned in the Location HTTP header</p> - <p>HTTP response messages are in the format:</p> - <pre><code>HTTP Status code -Headers -<space> -Body + <p>This page describes W3C SPARQL Working Group's SPARQL 1.1 test suite.</p> + <dl> + <dt><strong>$HOST$</strong></dt> + <dd>is the host where the Graph Store Protocol implementation is listening</dd> + <dt><strong>$GRAPHSTORE$</strong></dt> + <dd>is the path of the URL of the graph store</dd> + <dt><strong>$NEWPATH$</strong></dt> + <dd>is the URL returned in the Location HTTP header</dd> + </dl> + <p>The Turtle and JSON-LD versions of this manifest use the <a href="http://www.w3.org/2011/http#"><code>ht</code></a> + and <a href="http://www.w3.org/2011/content#"><code>cnt</code></a> namespaces to describe the + HTTP actions that a test client can use to provision call and response + that a server will use to run each test. + This includes a sequence of HTTP requests, with headers and other information + that can be used for the provisioned client to will use to send HTTP methods + to the system under test along with the expected response.</p> + <p>For example, the following entry for <code>:delete__existing_graph</code> + has an action described as an <code>ht:Connection</code>, with the authority <code>"www.example"</code> + and a sequence of requests having a single entry of type <code>ht:Request</code>, + an <code>ht:absolutePath</code> of <code>"$GRAPHSTORE$/person/2.ttl"</code> (where the + test runner will substitute <code>$GRAPHSTORE</code> with the path to the graph store service + being tested), and the expected response:</p> + <pre><code><#delete__existing_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/2.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "DELETE"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "DELETE - existing graph" . +</code></pre> + <p>This is rendered into HTTP envelopes:</p> + <p><strong>Request</strong></p> + <pre><code> DELETE $GRAPHSTORE$/person/2.ttl HTTP/1.1 + Host: www.example + Host: $HOST$ +</code></pre> + <p><strong>Response</strong></p> + <pre><code> 200 response </code></pre> <h3 id='contributing-tests'>Contributing Tests</h3> <p>The test manifests and entries are built automatically from <a href="manifest.ttl">manifest.ttl</a> using a Rake task. Tests may be contributed via pull request to <a href="https://github.com/w3c/rdf-tests">https://github.com/w3c/rdf-tests</a> with suitable changes to the <a href="manifest.ttl">manifest.ttl</a> and referenced files.</p> @@ -86,659 +136,1237 @@ <h2> Test Descriptions </h2> <dl class='test-description'> - <dt id='put__initial_state'> - <a class='testlink' href='#put__initial_state'> - put__initial_state: + <dt id='#put__initial_state'> + <a class='testlink' href='##put__initial_state'> + #put__initial_state: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#put__initial_state' property='mf:name'>PUT - Initial state</span> + <span about='#put__initial_state' property='mf:name'>PUT - Initial state</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#put__initial_state' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>PUT $GRAPHSTORE$/person/1.ttl HTTP/1.1 -Host: $HOST$ -Content-Type: text/turtle; charset=utf-8 - + <dd inlist='true' property='mf:entry' resource='#put__initial_state' typeof='mf:GraphStoreProtocolTest'> + <dl class='test-detail'> + <dt>type</dt> + <dd>mf:GraphStoreProtocolTest</dd> + <dt>approval</dt> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> + </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>PUT</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/1.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix v: <http://www.w3.org/2006/vcard/ns#> . <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; foaf:businessCard [ a v:VCard; - v:fn "John Doe" + v:fn "John Doe" ]. -</code></pre> - <h4 id="response">Response</h4> - <p><code>201 Created</code></p> +</pre> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>201</span><span> + response + </span> + </code> + </div> + </div> </div> + </dd> + <dt id='#get_of_put__initial_state'> + <a class='testlink' href='##get_of_put__initial_state'> + #get_of_put__initial_state: + </a> + <span about='#get_of_put__initial_state' property='mf:name'>GET of PUT - Initial state</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#get_of_put__initial_state' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='get_of_put__initial_state'> - <a class='testlink' href='#get_of_put__initial_state'> - get_of_put__initial_state: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_put__initial_state' property='mf:name'>GET of PUT - Initial state</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_put__initial_state' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET $GRAPHSTORE$?graph=http://$HOST$/$GRAPHSTORE$/person/1.ttl HTTP/1.1 -Host: $HOST$ -Accept: text/turtle -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -Content-Type: text/turtle; charset=utf-8 -Content-Length: ... - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>$GRAPHSTORE$?graph=$GRAPHSTORE$/person/1.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix v: <http://www.w3.org/2006/vcard/ns#> . <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; foaf:businessCard [ a v:VCard; - v:fn "John Doe" + v:fn "John Doe" ]. -</code></pre> +</pre> + </div> + </code> + </div> + </div> </div> + </dd> + <dt id='#put__graph_already_in_store'> + <a class='testlink' href='##put__graph_already_in_store'> + #put__graph_already_in_store: + </a> + <span about='#put__graph_already_in_store' property='mf:name'>PUT - graph already in store</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#put__graph_already_in_store' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='put__graph_already_in_store'> - <a class='testlink' href='#put__graph_already_in_store'> - put__graph_already_in_store: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#put__graph_already_in_store' property='mf:name'>PUT - graph already in store</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#put__graph_already_in_store' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>PUT $GRAPHSTORE$/person/1.ttl HTTP/1.1 -Host: $HOST$ -Content-Type: text/turtle; charset=utf-8 - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>PUT</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/1</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix v: <http://www.w3.org/2006/vcard/ns#> . <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; foaf:businessCard [ a v:VCard; - v:fn "Jane Doe" + v:fn "Jane Doe" ]. -</code></pre> - <h4 id="response">Response</h4> - <pre><code>204 No Content -</code></pre> +</pre> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>204</span><span> + response + </span> + </code> + </div> + </div> </div> + </dd> + <dt id='#get_of_put__graph_already_in_store'> + <a class='testlink' href='##get_of_put__graph_already_in_store'> + #get_of_put__graph_already_in_store: + </a> + <span about='#get_of_put__graph_already_in_store' property='mf:name'>GET of PUT - graph already in store</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#get_of_put__graph_already_in_store' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='get_of_put__graph_already_in_store'> - <a class='testlink' href='#get_of_put__graph_already_in_store'> - get_of_put__graph_already_in_store: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_put__graph_already_in_store' property='mf:name'>GET of PUT - graph already in store</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_put__graph_already_in_store' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET $GRAPHSTORE$/person/1.ttl HTTP/1.1 -Host: $HOST$ -Accept: text/turtle -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -Content-Type: text/turtle; charset=utf-8 -Content-Length: ... - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/1</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix v: <http://www.w3.org/2006/vcard/ns#> . <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; foaf:businessCard [ a v:VCard; - v:fn "Jane Doe" + v:fn "Jane Doe" ] . -</code></pre> +</pre> + </div> + </code> + </div> + </div> </div> + </dd> + <dt id='#put__default_graph'> + <a class='testlink' href='##put__default_graph'> + #put__default_graph: + </a> + <span about='#put__default_graph' property='mf:name'>PUT - default graph</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#put__default_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='put__default_graph'> - <a class='testlink' href='#put__default_graph'> - put__default_graph: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#put__default_graph' property='mf:name'>PUT - default graph</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#put__default_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>PUT $GRAPHSTORE$?default HTTP/1.1 -Host: $HOST$ -Content-Type: text/turtle; charset=utf-8 - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>PUT</span> + <span property='ht:absolutePath'>$GRAPHSTORE$?default</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix v: <http://www.w3.org/2006/vcard/ns#> . [] a foaf:Person; foaf:businessCard [ a v:VCard; - v:given-name "Alice" + v:given-name "Alice" ] . -</code></pre> - <h4 id="response">Response</h4> - <pre><code>201 Created -</code></pre> +</pre> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>201</span><span> + response + </span> + </code> + </div> + </div> </div> + </dd> + <dt id='#get_of_put__default_graph'> + <a class='testlink' href='##get_of_put__default_graph'> + #get_of_put__default_graph: + </a> + <span about='#get_of_put__default_graph' property='mf:name'>GET of PUT - default graph</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#get_of_put__default_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='get_of_put__default_graph'> - <a class='testlink' href='#get_of_put__default_graph'> - get_of_put__default_graph: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_put__default_graph' property='mf:name'>GET of PUT - default graph</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_put__default_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET $GRAPHSTORE$?default HTTP/1.1 -Host: $HOST$ -Accept: text/turtle -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -Content-Type: text/turtle; charset=utf-8 -Content-Length: ... - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>$GRAPHSTORE$?default</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix v: <http://www.w3.org/2006/vcard/ns#> . [] a foaf:Person; foaf:businessCard [ a v:VCard; - v:given-name "Alice" + v:given-name "Alice" ] . -</code></pre> +</pre> + </div> + </code> + </div> + </div> </div> + </dd> + <dt id='#put__mismatched_payload'> + <a class='testlink' href='##put__mismatched_payload'> + #put__mismatched_payload: + </a> + <span about='#put__mismatched_payload' property='mf:name'>PUT - mismatched payload</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#put__mismatched_payload' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='put__mismatched_payload'> - <a class='testlink' href='#put__mismatched_payload'> - put__mismatched_payload: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#put__mismatched_payload' property='mf:name'>PUT - mismatched payload</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#put__mismatched_payload' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>PUT $GRAPHSTORE$/person/1.ttl HTTP/1.1 -Host: $HOST$ -Content-Type: text/turtle; charset=utf-8 - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>PUT</span> + <span property='ht:absolutePath'>$GRAPHSTORE$?default</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix v: <http://www.w3.org/2006/vcard/ns#> . <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; foaf:businessCard [ a v:VCard; - v:fn "Jane Doe" + v:fn "Jane Doe" ]. -</code></pre> - <h4 id="response">Response</h4> - <pre><code>400 Bad Request -</code></pre> +</pre> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>400</span><span> + response + </span> + </code> + </div> + </div> </div> + </dd> + <dt id='#delete__existing_graph'> + <a class='testlink' href='##delete__existing_graph'> + #delete__existing_graph: + </a> + <span about='#delete__existing_graph' property='mf:name'>DELETE - existing graph</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#delete__existing_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>DELETE</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/2.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='delete__existing_graph'> - <a class='testlink' href='#delete__existing_graph'> - delete__existing_graph: + <dt id='#get_of_delete__existing_graph'> + <a class='testlink' href='##get_of_delete__existing_graph'> + #get_of_delete__existing_graph: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#delete__existing_graph' property='mf:name'>DELETE - existing graph</span> + <span about='#get_of_delete__existing_graph' property='mf:name'>GET of DELETE - existing graph</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#delete__existing_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>DELETE $GRAPHSTORE$/person/2.ttl HTTP/1.1 -Host: $HOST$ -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -</code></pre> - </div> + <dd inlist='true' property='mf:entry' resource='#get_of_delete__existing_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/2.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>404</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='get_of_delete__existing_graph'> - <a class='testlink' href='#get_of_delete__existing_graph'> - get_of_delete__existing_graph: + <dt id='#delete__nonexistent_graph'> + <a class='testlink' href='##delete__nonexistent_graph'> + #delete__nonexistent_graph: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_delete__existing_graph' property='mf:name'>GET of DELETE - existing graph</span> + <span about='#delete__nonexistent_graph' property='mf:name'>DELETE - non-existent graph)</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_delete__existing_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET $GRAPHSTORE$/person/2.ttl HTTP/1.1 -Host: $HOST$ -</code></pre> - <h4 id="response">Response</h4> - <pre><code>404 Not Found -</code></pre> - </div> + <dd inlist='true' property='mf:entry' resource='#delete__nonexistent_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>DELETE</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/2.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>404</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='delete__nonexistent_graph'> - <a class='testlink' href='#delete__nonexistent_graph'> - delete__nonexistent_graph: + <dt id='#post__existing_graph'> + <a class='testlink' href='##post__existing_graph'> + #post__existing_graph: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#delete__nonexistent_graph' property='mf:name'>DELETE - non-existent graph</span> + <span about='#post__existing_graph' property='mf:name'>POST - existing graph</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#delete__nonexistent_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>DELETE $GRAPHSTORE$/person/2.ttl HTTP/1.1 -Host: $HOST$ -</code></pre> - <h4 id="response">Response</h4> - <pre><code>404 Not Found -</code></pre> - </div> + <dd inlist='true' property='mf:entry' resource='#post__existing_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/1.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> +@prefix foaf: <http://xmlns.com/foaf/0.1/> . + +<http://$HOST$/$GRAPHSTORE$/person/1> foaf:name "Jane Doe" +</pre> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='post__existing_graph'> - <a class='testlink' href='#post__existing_graph'> - post__existing_graph: + <dt id='#get_of_post__existing_graph'> + <a class='testlink' href='##get_of_post__existing_graph'> + #get_of_post__existing_graph: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#post__existing_graph' property='mf:name'>POST - existing graph</span> + <span about='#get_of_post__existing_graph' property='mf:name'>GET of POST - existing graph</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#post__existing_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - </div> + <dd inlist='true' property='mf:entry' resource='#get_of_post__existing_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='get_of_post__existing_graph'> - <a class='testlink' href='#get_of_post__existing_graph'> - get_of_post__existing_graph: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_post__existing_graph' property='mf:name'>GET of POST - existing graph</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_post__existing_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST $GRAPHSTORE$/person/1.ttl HTTP/1.1 -Host: $HOST$ -Content-Type: text/turtle; charset=utf-8 - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/1.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . -<http://$HOST$/$GRAPHSTORE$/person/1> foaf:name "Jane Doe" -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -</code></pre> +<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; + foaf:name "Jane Doe"; + foaf:businessCard [ + a v:VCard; + v:fn "Jane Doe" + ] . +</pre> + </div> + </code> + </div> + </div> </div> + </dd> + <dt id='#post__multipart_formdata'> + <a class='testlink' href='##post__multipart_formdata'> + #post__multipart_formdata: + </a> + <span about='#post__multipart_formdata' property='mf:name'>POST - multipart/form-data</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#post__multipart_formdata' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='post__multipart_formdata'> - <a class='testlink' href='#post__multipart_formdata'> - post__multipart_formdata: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#post__multipart_formdata' property='mf:name'>POST - multipart/form-data</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#post__multipart_formdata' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST $GRAPHSTORE$/person/1.ttl HTTP/1.1 -Host: $HOST$ -Content-Type: multipart/form-data; boundary=a6fe4cd636164618814be9f8d3d1a0de - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/1.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='multipart/form-data; boundary=a6fe4cd636164618814be9f8d3d1a0de'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>multipart/form-data</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>boundary</span>=<span property='ht:paramValue'>a6fe4cd636164618814be9f8d3d1a0de</span></span> + </span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <pre class='code' property='cnt:chars'> --a6fe4cd636164618814be9f8d3d1a0de -Content-Disposition: form-data; name="lastName.ttl"; filename="lastName.ttl" +Content-Disposition: form-data; name="lastName.ttl"; filename="lastName.ttl" Content-Type: text/turtle; charset=utf-8 @prefix foaf: <http://xmlns.com/foaf/0.1/> . -<http://$HOST$/$GRAPHSTORE$/person/1> foaf:familyName "Doe" +<http://$HOST$/$GRAPHSTORE$/person/1> foaf:familyName "Doe" --a6fe4cd636164618814be9f8d3d1a0de -Content-Disposition: form-data; name="firstName.ttl"; filename="firstName.ttl" +Content-Disposition: form-data; name="firstName.ttl"; filename="firstName.ttl" Content-Type: text/turtle; charset=utf-8 @prefix foaf: <http://xmlns.com/foaf/0.1/> . -<http://$HOST$/$GRAPHSTORE$/person/1> foaf:givenName "Jane" +<http://$HOST$/$GRAPHSTORE$/person/1> foaf:givenName "Jane" --a6fe4cd636164618814be9f8d3d1a0de-- -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -</code></pre> + </pre> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + </code> + </div> + </div> </div> + </dd> + <dt id='#get_of_post__multipart_formdata'> + <a class='testlink' href='##get_of_post__multipart_formdata'> + #get_of_post__multipart_formdata: + </a> + <span about='#get_of_post__multipart_formdata' property='mf:name'>GET of POST - multipart/form-data</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#get_of_post__multipart_formdata' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='get_of_post__multipart_formdata'> - <a class='testlink' href='#get_of_post__multipart_formdata'> - get_of_post__multipart_formdata: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_post__multipart_formdata' property='mf:name'>GET of POST - multipart/form-data</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_post__multipart_formdata' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET $GRAPHSTORE$/person/1.ttl HTTP/1.1 -Host: $HOST$ -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -Content-Type: text/turtle; charset=utf-8 -Content-Length: ... - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/1.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix v: <http://www.w3.org/2006/vcard/ns#> . <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; - foaf:name "Jane Doe"; - foaf:givenName "Jane"; - foaf:familyName "Doe"; + foaf:name "Jane Doe"; + foaf:givenName "Jane"; + foaf:familyName "Doe"; foaf:businessCard [ a v:VCard; - v:fn "Jane Doe" + v:fn "Jane Doe" ] . -</code></pre> +</pre> + </div> + </code> + </div> + </div> </div> + </dd> + <dt id='#post__create__new_graph'> + <a class='testlink' href='##post__create__new_graph'> + #post__create__new_graph: + </a> + <span about='#post__create__new_graph' property='mf:name'>POST - create new graph</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#post__create__new_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='post__create__new_graph'> - <a class='testlink' href='#post__create__new_graph'> - post__create__new_graph: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#post__create__new_graph' property='mf:name'>POST - create new graph</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#post__create__new_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST $GRAPHSTORE$ HTTP/1.1 -Host: $HOST$ -Content-Type: text/turtle; charset=utf-8 - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>$GRAPHSTORE$</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$NEWPATH$'><span property='ht:fieldName'>Location</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$NEWPATH$</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix v: <http://www.w3.org/2006/vcard/ns#> . [] a foaf:Person; foaf:businessCard [ a v:VCard; - v:given-name "Alice" + v:given-name "Alice" ] . -</code></pre> - <h4 id="response">Response</h4> - <pre><code>201 Created -Location: $NEWPATH$ -</code></pre> +</pre> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>201</span><span> + response + </span> + </code> + </div> + </div> </div> + </dd> + <dt id='#get_of_post__create__new_graph'> + <a class='testlink' href='##get_of_post__create__new_graph'> + #get_of_post__create__new_graph: + </a> + <span about='#get_of_post__create__new_graph' property='mf:name'>GET of POST - create new graph</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#get_of_post__create__new_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='get_of_post__create__new_graph'> - <a class='testlink' href='#get_of_post__create__new_graph'> - get_of_post__create__new_graph: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_post__create__new_graph' property='mf:name'>GET of POST - create new graph</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_post__create__new_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET $NEWPATH$ HTTP/1.1 -Host: $HOST$ -Accept: text/turtle -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -Content-Type: text/turtle; charset=utf-8 -Content-Length: ... - -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix v: <http://www.w3.org/2006/vcard/ns#> . - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>$NEWPATH$</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> [] a foaf:Person; foaf:businessCard [ a v:VCard; - v:given-name "Alice" + v:given-name "Alice" ] . -</code></pre> +</pre> + </div> + </code> + </div> + </div> </div> + </dd> + <dt id='#get_of_post__after_noop'> + <a class='testlink' href='##get_of_post__after_noop'> + #get_of_post__after_noop: + </a> + <span about='#get_of_post__after_noop' property='mf:name'>GET of POST - after noop</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#get_of_post__after_noop' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> - </dd> - <dt id='get_of_post__after_noop'> - <a class='testlink' href='#get_of_post__after_noop'> - get_of_post__after_noop: - </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_post__after_noop' property='mf:name'>GET of POST - after noop</span> - </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#get_of_post__after_noop' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET $NEWPATH$ HTTP/1.1 -Host: $HOST$ -Accept: text/turtle -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -Content-Type: text/turtle; charset=utf-8 -Content-Length: ... - -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix v: <http://www.w3.org/2006/vcard/ns#> . - + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>$NEWPATH$</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='utf-8'> + <pre class='code' property='cnt:chars'> [] a foaf:Person; foaf:businessCard [ a v:VCard; - v:given-name "Alice" + v:given-name "Alice" ] . -</code></pre> +</pre> + </div> + </code> + </div> + </div> </div> - <dl class='test-detail'> - <dt>type</dt> - <dd>mf:GraphStoreProtocolTest</dd> - <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> - <dt>approvedBy</dt> - <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> - </dd> - </dl> </dd> - <dt id='head_on_an_existing_graph'> - <a class='testlink' href='#head_on_an_existing_graph'> - head_on_an_existing_graph: + <dt id='#head_on_an_existing_graph'> + <a class='testlink' href='##head_on_an_existing_graph'> + #head_on_an_existing_graph: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#head_on_an_existing_graph' property='mf:name'>HEAD on an existing graph</span> + <span about='#head_on_an_existing_graph' property='mf:name'></span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#head_on_an_existing_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>HEAD $GRAPHSTORE$/person/1.ttl HTTP/1.1 -Host: $HOST$ -</code></pre> - <h4 id="response">Response</h4> - <pre><code>200 OK -Content-Type: text/turtle; charset=utf-8 -Content-Length: ... -</code></pre> - </div> + <dd inlist='true' property='mf:entry' resource='#head_on_an_existing_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>HEAD</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/1.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/turtle; charset=utf-8'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>utf-8</span></span> + </span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>200</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='head_on_a_nonexisting_graph'> - <a class='testlink' href='#head_on_a_nonexisting_graph'> - head_on_a_nonexisting_graph: + <dt id='#head_on_a_nonexisting_graph'> + <a class='testlink' href='##head_on_a_nonexisting_graph'> + #head_on_a_nonexisting_graph: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#head_on_a_nonexisting_graph' property='mf:name'>HEAD on a non-existing graph</span> + <span about='#head_on_a_nonexisting_graph' property='mf:name'>HEAD on a non-existing graph</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#head_on_a_nonexisting_graph' typeof='mf:GraphStoreProtocolTest'> - <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>HEAD $GRAPHSTORE$/person/4.ttl HTTP/1.1 -Host: $HOST$ -</code></pre> - <h4 id="response">Response</h4> - <pre><code>404 Not Found -</code></pre> - </div> + <dd inlist='true' property='mf:entry' resource='#head_on_a_nonexisting_graph' typeof='mf:GraphStoreProtocolTest'> <dl class='test-detail'> <dt>type</dt> <dd>mf:GraphStoreProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource='dawgt:Approved'>dawgt:Approved</dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> <dt>approvedBy</dt> <dd> - <a href='http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3' property='dawgt:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3</a> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>HEAD</span> + <span property='ht:absolutePath'>$GRAPHSTORE$/person/4.ttl</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='$HOST$'><span property='ht:fieldName'>Host</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>$HOST$</span></span> + </span> + </div> + </span></code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>404</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> </dl> </div> diff --git a/sparql/sparql11/http-rdf-update/manifest-frame.jsonld b/sparql/sparql11/http-rdf-update/manifest-frame.jsonld index c7b8c829..4d39d231 100644 --- a/sparql/sparql11/http-rdf-update/manifest-frame.jsonld +++ b/sparql/sparql11/http-rdf-update/manifest-frame.jsonld @@ -1,14 +1,15 @@ { "@context": { - "dawgt": "http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#", + "@base": "https://w3c.github.io/rdf-tests/sparql/sparql11/http-rdf-update/manifest", + "dawg": "http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#", "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"}, + "approval": {"@id": "dawg:approval", "@type": "@id"}, + "approvedBy": {"@id": "dawg:approvedBy", "@type": "@id"}, "comment": {"@id": "rdfs:comment"}, "data": {"@id": "mq:data", "@type": "@id"}, "entries": {"@id": "mf:entries", "@container": "@list", "@type": "@id"}, diff --git a/sparql/sparql11/http-rdf-update/manifest.jsonld b/sparql/sparql11/http-rdf-update/manifest.jsonld new file mode 100644 index 00000000..4e529575 --- /dev/null +++ b/sparql/sparql11/http-rdf-update/manifest.jsonld @@ -0,0 +1,1231 @@ +{ + "@context": { + "@base": "https://w3c.github.io/rdf-tests/sparql/sparql11/http-rdf-update/manifest", + "cnt": "http://www.w3.org/2011/content#", + "dawg": "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": "dawg:approval", + "@type": "@id" + }, + "approvedBy": { + "@id": "dawg: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 Graph Store Protocol", + "entries": [ + { + "@id": "#put__initial_state", + "@type": "mf:GraphStoreProtocolTest", + "name": "PUT - Initial state", + "approval": "dawg: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": "$GRAPHSTORE$/person/1.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:fn \"John Doe\"\n ].\n", + "cnt:characterEncoding": "utf-8" + }, + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "201" + ] + } + } + ] + } + }, + { + "@id": "#get_of_put__initial_state", + "@type": "mf:GraphStoreProtocolTest", + "name": "GET of PUT - Initial state", + "approval": "dawg: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": "$GRAPHSTORE$?graph=$GRAPHSTORE$/person/1.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Accept", + "ht:fieldValue": "text/turtle", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:fn \"John Doe\"\n ].\n", + "cnt:characterEncoding": "utf-8" + } + } + } + ] + } + }, + { + "@id": "#put__graph_already_in_store", + "@type": "mf:GraphStoreProtocolTest", + "name": "PUT - graph already in store", + "approval": "dawg: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": "$GRAPHSTORE$/person/1", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:fn \"Jane Doe\"\n ].\n", + "cnt:characterEncoding": "utf-8" + }, + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "204" + ] + } + } + ] + } + }, + { + "@id": "#get_of_put__graph_already_in_store", + "@type": "mf:GraphStoreProtocolTest", + "name": "GET of PUT - graph already in store", + "approval": "dawg: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": "$GRAPHSTORE$/person/1", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Accept", + "ht:fieldValue": "text/turtle", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:fn \"Jane Doe\"\n ] .\n", + "cnt:characterEncoding": "utf-8" + } + } + } + ] + } + }, + { + "@id": "#put__default_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "PUT - default graph", + "approval": "dawg: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": "$GRAPHSTORE$?default", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n[] a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:given-name \"Alice\"\n ] .\n", + "cnt:characterEncoding": "utf-8" + }, + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "201" + ] + } + } + ] + } + }, + { + "@id": "#get_of_put__default_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "GET of PUT - default graph", + "approval": "dawg: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": "$GRAPHSTORE$?default", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Accept", + "ht:fieldValue": "text/turtle", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n[] a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:given-name \"Alice\"\n ] .\n", + "cnt:characterEncoding": "utf-8" + } + } + } + ] + } + }, + { + "@id": "#put__mismatched_payload", + "@type": "mf:GraphStoreProtocolTest", + "name": "PUT - mismatched payload", + "approval": "dawg: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": "$GRAPHSTORE$?default", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:fn \"Jane Doe\"\n ].\n", + "cnt:characterEncoding": "utf-8" + }, + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "400" + ] + } + } + ] + } + }, + { + "@id": "#delete__existing_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "DELETE - existing graph", + "approval": "dawg: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": "DELETE", + "ht:httpVersion": "1.1", + "ht:absolutePath": "$GRAPHSTORE$/person/2.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ] + } + } + ] + } + }, + { + "@id": "#get_of_delete__existing_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "GET of DELETE - existing graph", + "approval": "dawg: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": "$GRAPHSTORE$/person/2.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "404" + ] + } + } + ] + } + }, + { + "@id": "#delete__nonexistent_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "DELETE - non-existent graph)", + "approval": "dawg: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": "DELETE", + "ht:httpVersion": "1.1", + "ht:absolutePath": "$GRAPHSTORE$/person/2.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "404" + ] + } + } + ] + } + }, + { + "@id": "#post__existing_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "POST - existing graph", + "approval": "dawg: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": "$GRAPHSTORE$/person/1.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n\n<http://$HOST$/$GRAPHSTORE$/person/1> foaf:name \"Jane Doe\"\n", + "cnt:characterEncoding": "utf-8" + }, + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ] + } + } + ] + } + }, + { + "@id": "#get_of_post__existing_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "GET of POST - existing graph", + "approval": "dawg: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": "$GRAPHSTORE$/person/1.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Accept", + "ht:fieldValue": "text/turtle", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person;\n foaf:name \"Jane Doe\";\n foaf:businessCard [ \n a v:VCard;\n v:fn \"Jane Doe\" \n ] . \n", + "cnt:characterEncoding": "utf-8" + } + } + } + ] + } + }, + { + "@id": "#post__multipart_formdata", + "@type": "mf:GraphStoreProtocolTest", + "name": "POST - multipart/form-data", + "approval": "dawg: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": "$GRAPHSTORE$/person/1.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "multipart/form-data; boundary=a6fe4cd636164618814be9f8d3d1a0de", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "multipart/form-data", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "boundary", + "ht:paramValue": "a6fe4cd636164618814be9f8d3d1a0de" + } + ] + } + ] + } + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n--a6fe4cd636164618814be9f8d3d1a0de\nContent-Disposition: form-data; name=\"lastName.ttl\"; filename=\"lastName.ttl\"\nContent-Type: text/turtle; charset=utf-8\n\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n<http://$HOST$/$GRAPHSTORE$/person/1> foaf:familyName \"Doe\"\n\n--a6fe4cd636164618814be9f8d3d1a0de\nContent-Disposition: form-data; name=\"firstName.ttl\"; filename=\"firstName.ttl\"\nContent-Type: text/turtle; charset=utf-8\n\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n<http://$HOST$/$GRAPHSTORE$/person/1> foaf:givenName \"Jane\"\n\n--a6fe4cd636164618814be9f8d3d1a0de--\n ", + "cnt:characterEncoding": "UTF-8" + }, + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ] + } + } + ] + } + }, + { + "@id": "#get_of_post__multipart_formdata", + "@type": "mf:GraphStoreProtocolTest", + "name": "GET of POST - multipart/form-data", + "approval": "dawg: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": "$GRAPHSTORE$/person/1.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person;\n foaf:name \"Jane Doe\";\n foaf:givenName \"Jane\";\n foaf:familyName \"Doe\";\n foaf:businessCard [\n a v:VCard;\n v:fn \"Jane Doe\"\n ] .\n", + "cnt:characterEncoding": "utf-8" + } + } + } + ] + } + }, + { + "@id": "#post__create__new_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "POST - create new graph", + "approval": "dawg: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": "$GRAPHSTORE$", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Location", + "ht:fieldValue": "$NEWPATH$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$NEWPATH$" + } + ] + } + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix v: <http://www.w3.org/2006/vcard/ns#> .\n\n[] a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:given-name \"Alice\"\n ] .\n", + "cnt:characterEncoding": "utf-8" + }, + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "201" + ] + } + } + ] + } + }, + { + "@id": "#get_of_post__create__new_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "GET of POST - create new graph", + "approval": "dawg: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": "$NEWPATH$", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Accept", + "ht:fieldValue": "text/turtle", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n[] a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:given-name \"Alice\"\n ] .\n", + "cnt:characterEncoding": "utf-8" + } + } + } + ] + } + }, + { + "@id": "#get_of_post__after_noop", + "@type": "mf:GraphStoreProtocolTest", + "name": "GET of POST - after noop", + "approval": "dawg: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": "$NEWPATH$", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Accept", + "ht:fieldValue": "text/turtle", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ], + "ht:body": { + "@type": "cnt:ContentAsText", + "cnt:chars": "\n[] a foaf:Person;\n foaf:businessCard [\n a v:VCard;\n v:given-name \"Alice\"\n ] .\n", + "cnt:characterEncoding": "utf-8" + } + } + } + ] + } + }, + { + "@id": "#head_on_an_existing_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "", + "approval": "dawg: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": "HEAD", + "ht:httpVersion": "1.1", + "ht:absolutePath": "$GRAPHSTORE$/person/1.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + }, + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Content-Type", + "ht:fieldValue": "text/turtle; charset=utf-8", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "text/turtle", + "params": [ + { + "@type": "ht:Parameter", + "ht:paramName": "charset", + "ht:paramValue": "utf-8" + } + ] + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "200" + ] + } + } + ] + } + }, + { + "@id": "#head_on_a_nonexisting_graph", + "@type": "mf:GraphStoreProtocolTest", + "name": "HEAD on a non-existing graph", + "approval": "dawg: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": "HEAD", + "ht:httpVersion": "1.1", + "ht:absolutePath": "$GRAPHSTORE$/person/4.ttl", + "headers": [ + { + "@type": "ht:RequestHeader", + "ht:fieldName": "Host", + "ht:fieldValue": "$HOST$", + "headerElements": [ + { + "@type": "ht:HeaderElement", + "ht:elementName": "$HOST$" + } + ] + } + ], + "ht:resp": { + "@type": "ht:Response", + "ht:statusCodeValue": [ + "404" + ] + } + } + ] + } + } + ] +} diff --git a/sparql/sparql11/http-rdf-update/manifest.ttl b/sparql/sparql11/http-rdf-update/manifest.ttl index 7499fcb9..4601aa28 100644 --- a/sparql/sparql11/http-rdf-update/manifest.ttl +++ b/sparql/sparql11/http-rdf-update/manifest.ttl @@ -1,456 +1,1009 @@ -@prefix : <http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#> . +@base <https://w3c.github.io/rdf-tests/sparql/sparql11/http-rdf-update/manifest> . +@prefix cnt: <http://www.w3.org/2011/content#> . @prefix dawg: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> . -@prefix gsp: <http://www.w3.org/2009/sparql/docs/tests/data-sparql11/http-rdf-update/manifest#> . +@prefix ht: <http://www.w3.org/2011/http#> . @prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -# Note: Comments are formated as Markdown for transformation to HTML version of manifest. - -<> a mf:Manifest; - rdfs:label "SPARQL Graph Store Protocol"; - mf:entries ( gsp:put__initial_state - gsp:get_of_put__initial_state - gsp:put__graph_already_in_store - gsp:get_of_put__graph_already_in_store - gsp:put__default_graph - gsp:get_of_put__default_graph - gsp:put__mismatched_payload - gsp:delete__existing_graph - gsp:get_of_delete__existing_graph - gsp:delete__nonexistent_graph - gsp:post__existing_graph - gsp:get_of_post__existing_graph - gsp:post__multipart_formdata - gsp:get_of_post__multipart_formdata - gsp:post__create__new_graph - gsp:get_of_post__create__new_graph - gsp:get_of_post__after_noop - gsp:head_on_an_existing_graph - gsp:head_on_a_nonexisting_graph ) . - -gsp:delete__existing_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "DELETE - existing graph" ; - rdfs:comment """ -#### Request - - DELETE $GRAPHSTORE$/person/2.ttl HTTP/1.1 - Host: $HOST$ - -#### Response - - 200 OK - """ . - -gsp:delete__nonexistent_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "DELETE - non-existent graph" ; - rdfs:comment """ -#### Request - - DELETE $GRAPHSTORE$/person/2.ttl HTTP/1.1 - Host: $HOST$ - -#### Response - - 404 Not Found - """ . - -gsp:get_of_delete__existing_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "GET of DELETE - existing graph" ; - rdfs:comment """ -#### Request - - GET $GRAPHSTORE$/person/2.ttl HTTP/1.1 - Host: $HOST$ - -#### Response - - 404 Not Found - """ . - -gsp:get_of_post__after_noop a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "GET of POST - after noop" ; - rdfs:comment """ -#### Request - - GET $NEWPATH$ HTTP/1.1 - Host: $HOST$ - Accept: text/turtle - -#### Response - - 200 OK - Content-Type: text/turtle; charset=utf-8 - Content-Length: ... - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - [] a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:given-name "Alice" - ] . - """ . - -gsp:get_of_post__create__new_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "GET of POST - create new graph" ; - rdfs:comment """ -#### Request - - GET $NEWPATH$ HTTP/1.1 - Host: $HOST$ - Accept: text/turtle - -#### Response - - 200 OK - Content-Type: text/turtle; charset=utf-8 - Content-Length: ... - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - [] a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:given-name "Alice" - ] . - """ . - -gsp:get_of_post__existing_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "GET of POST - existing graph" ; - rdfs:comment """ -#### Request - - POST $GRAPHSTORE$/person/1.ttl HTTP/1.1 - Host: $HOST$ - Content-Type: text/turtle; charset=utf-8 - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - - <http://$HOST$/$GRAPHSTORE$/person/1> foaf:name "Jane Doe" - -#### Response - - 200 OK - """ . - -gsp:get_of_post__multipart_formdata a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "GET of POST - multipart/form-data" ; - rdfs:comment """ -#### Request - - GET $GRAPHSTORE$/person/1.ttl HTTP/1.1 - Host: $HOST$ - -#### Response - - 200 OK - Content-Type: text/turtle; charset=utf-8 - Content-Length: ... - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; - foaf:name "Jane Doe"; - foaf:givenName "Jane"; - foaf:familyName "Doe"; - foaf:businessCard [ - a v:VCard; - v:fn "Jane Doe" - ] . - """ . - -gsp:get_of_put__default_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "GET of PUT - default graph" ; - rdfs:comment """ -#### Request - - GET $GRAPHSTORE$?default HTTP/1.1 - Host: $HOST$ - Accept: text/turtle - -#### Response - - 200 OK - Content-Type: text/turtle; charset=utf-8 - Content-Length: ... - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - [] a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:given-name "Alice" - ] . - """ . - -gsp:get_of_put__graph_already_in_store a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "GET of PUT - graph already in store" ; - rdfs:comment """ -#### Request - - GET $GRAPHSTORE$/person/1.ttl HTTP/1.1 - Host: $HOST$ - Accept: text/turtle - -#### Response - - 200 OK - Content-Type: text/turtle; charset=utf-8 - Content-Length: ... - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:fn "Jane Doe" - ] . - """ . - -gsp:get_of_put__initial_state a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "GET of PUT - Initial state" ; - rdfs:comment """ -#### Request - - GET $GRAPHSTORE$?graph=http://$HOST$/$GRAPHSTORE$/person/1.ttl HTTP/1.1 - Host: $HOST$ - Accept: text/turtle - -#### Response - - 200 OK - Content-Type: text/turtle; charset=utf-8 - Content-Length: ... - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:fn "John Doe" - ]. - """ . - -gsp:head_on_a_nonexisting_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "HEAD on a non-existing graph" ; - rdfs:comment """ -#### Request - - HEAD $GRAPHSTORE$/person/4.ttl HTTP/1.1 - Host: $HOST$ - -#### Response - - 404 Not Found - """ . - -gsp:head_on_an_existing_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "HEAD on an existing graph" ; - rdfs:comment """ -#### Request - - HEAD $GRAPHSTORE$/person/1.ttl HTTP/1.1 - Host: $HOST$ - -#### Response - - 200 OK - Content-Type: text/turtle; charset=utf-8 - Content-Length: ... - """ . - -gsp:post__create__new_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "POST - create new graph" ; - rdfs:comment """ -#### Request - - POST $GRAPHSTORE$ HTTP/1.1 - Host: $HOST$ - Content-Type: text/turtle; charset=utf-8 - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - [] a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:given-name "Alice" - ] . - -#### Response - - 201 Created - Location: $NEWPATH$ - """ . - -gsp:post__existing_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "POST - existing graph" . - -gsp:post__multipart_formdata a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "POST - multipart/form-data" ; - rdfs:comment """ -#### Request - - POST $GRAPHSTORE$/person/1.ttl HTTP/1.1 - Host: $HOST$ - Content-Type: multipart/form-data; boundary=a6fe4cd636164618814be9f8d3d1a0de - - --a6fe4cd636164618814be9f8d3d1a0de - Content-Disposition: form-data; name="lastName.ttl"; filename="lastName.ttl" - Content-Type: text/turtle; charset=utf-8 - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - <http://$HOST$/$GRAPHSTORE$/person/1> foaf:familyName "Doe" - - --a6fe4cd636164618814be9f8d3d1a0de - Content-Disposition: form-data; name="firstName.ttl"; filename="firstName.ttl" - Content-Type: text/turtle; charset=utf-8 - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - <http://$HOST$/$GRAPHSTORE$/person/1> foaf:givenName "Jane" - - --a6fe4cd636164618814be9f8d3d1a0de-- - -#### Response - - 200 OK - """ . - -gsp:put__default_graph a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "PUT - default graph" ; - rdfs:comment """ -#### Request - - PUT $GRAPHSTORE$?default HTTP/1.1 - Host: $HOST$ - Content-Type: text/turtle; charset=utf-8 - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - [] a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:given-name "Alice" - ] . - -#### Response - - 201 Created - """ . - -gsp:put__graph_already_in_store a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "PUT - graph already in store" ; - rdfs:comment """ -#### Request - - PUT $GRAPHSTORE$/person/1.ttl HTTP/1.1 - Host: $HOST$ - Content-Type: text/turtle; charset=utf-8 - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:fn "Jane Doe" - ]. - -#### Response - - 204 No Content - """ . - -gsp:put__initial_state a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "PUT - Initial state" ; - rdfs:comment """ -#### Request - - - PUT $GRAPHSTORE$/person/1.ttl HTTP/1.1 - Host: $HOST$ - Content-Type: text/turtle; charset=utf-8 - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:fn "John Doe" - ]. - -#### Response - -`201 Created` - """ . - -gsp:put__mismatched_payload a mf:GraphStoreProtocolTest; - dawg:approval dawg:Approved; - dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-27#resolution_3>; - mf:name "PUT - mismatched payload" ; - rdfs:comment """ -#### Request - - PUT $GRAPHSTORE$/person/1.ttl HTTP/1.1 - Host: $HOST$ - Content-Type: text/turtle; charset=utf-8 - - @prefix foaf: <http://xmlns.com/foaf/0.1/> . - @prefix v: <http://www.w3.org/2006/vcard/ns#> . - - <http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; - foaf:businessCard [ - a v:VCard; - v:fn "Jane Doe" - ]. - -#### Response - - 400 Bad Request - """ . - +<manifest> a mf:Manifest; + rdfs:label "SPARQL Graph Store Protocol"; + mf:entries ( + <#put__initial_state> + <#get_of_put__initial_state> + <#put__graph_already_in_store> + <#get_of_put__graph_already_in_store> + <#put__default_graph> + <#get_of_put__default_graph> + <#put__mismatched_payload> + <#delete__existing_graph> + <#get_of_delete__existing_graph> + <#delete__nonexistent_graph> + <#post__existing_graph> + <#get_of_post__existing_graph> + <#post__multipart_formdata> + <#get_of_post__multipart_formdata> + <#post__create__new_graph> + <#get_of_post__create__new_graph> + <#get_of_post__after_noop> + <#head_on_an_existing_graph> + <#head_on_a_nonexisting_graph>) . + +<#delete__existing_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/2.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "DELETE"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "DELETE - existing graph" . + +<#delete__nonexistent_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/2.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "DELETE"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "404" + ] + ]) + ]; + mf:name "DELETE - non-existent graph)" . + +<#get_of_delete__existing_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/2.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "404" + ] + ]) + ]; + mf:name "GET of DELETE - existing graph" . + +<#get_of_post__after_noop> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$NEWPATH$"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "text/turtle"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name \"Alice\" + ] . +""" + ]; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "GET of POST - after noop" . + +<#get_of_post__create__new_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$NEWPATH$"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "text/turtle"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name \"Alice\" + ] . +""" + ]; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "GET of POST - create new graph" . + +<#get_of_post__existing_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/1.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "text/turtle"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; + foaf:name \"Jane Doe\"; + foaf:businessCard [ + a v:VCard; + v:fn \"Jane Doe\" + ] . +""" + ]; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "GET of POST - existing graph" . + +<#get_of_post__multipart_formdata> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/1.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; + foaf:name \"Jane Doe\"; + foaf:givenName \"Jane\"; + foaf:familyName \"Doe\"; + foaf:businessCard [ + a v:VCard; + v:fn \"Jane Doe\" + ] . +""" + ]; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "GET of POST - multipart/form-data" . + +<#get_of_put__default_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$?default"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "text/turtle"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name \"Alice\" + ] . +""" + ]; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "GET of PUT - default graph" . + +<#get_of_put__graph_already_in_store> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/1"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "text/turtle"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn \"Jane Doe\" + ] . +""" + ]; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "GET of PUT - graph already in store" . + +<#get_of_put__initial_state> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$?graph=$GRAPHSTORE$/person/1.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "text/turtle"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn \"John Doe\" + ]. +""" + ]; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "GET of PUT - Initial state" . + +<#head_on_a_nonexisting_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/4.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "HEAD"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "404" + ] + ]) + ]; + mf:name "HEAD on a non-existing graph" . + +<#head_on_an_existing_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/1.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "HEAD"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "" . + +<#post__create__new_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name \"Alice\" + ] . +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Location"; + ht:fieldValue "$NEWPATH$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$NEWPATH$" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "201" + ] + ]) + ]; + mf:name "POST - create new graph" . + +<#post__existing_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/1.ttl"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . + +<http://$HOST$/$GRAPHSTORE$/person/1> foaf:name \"Jane Doe\" +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "POST - existing graph" . + +<#post__multipart_formdata> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/1.ttl"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars """ +--a6fe4cd636164618814be9f8d3d1a0de +Content-Disposition: form-data; name=\"lastName.ttl\"; filename=\"lastName.ttl\" +Content-Type: text/turtle; charset=utf-8 + +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +<http://$HOST$/$GRAPHSTORE$/person/1> foaf:familyName \"Doe\" + +--a6fe4cd636164618814be9f8d3d1a0de +Content-Disposition: form-data; name=\"firstName.ttl\"; filename=\"firstName.ttl\" +Content-Type: text/turtle; charset=utf-8 + +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +<http://$HOST$/$GRAPHSTORE$/person/1> foaf:givenName \"Jane\" + +--a6fe4cd636164618814be9f8d3d1a0de-- + """ + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "multipart/form-data; boundary=a6fe4cd636164618814be9f8d3d1a0de"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "multipart/form-data"; + ht:params ([ + a ht:Parameter; + ht:paramName "boundary"; + ht:paramValue "a6fe4cd636164618814be9f8d3d1a0de" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "POST - multipart/form-data" . + +<#put__default_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$?default"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +[] a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:given-name \"Alice\" + ] . +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "PUT"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "201" + ] + ]) + ]; + mf:name "PUT - default graph" . + +<#put__graph_already_in_store> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/1"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn \"Jane Doe\" + ]. +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "PUT"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "204" + ] + ]) + ]; + mf:name "PUT - graph already in store" . + +<#put__initial_state> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/1.ttl"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn \"John Doe\" + ]. +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "PUT"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "201" + ] + ]) + ]; + mf:name "PUT - Initial state" . + +<#put__mismatched_payload> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$?default"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "utf-8"; + cnt:chars """ +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix v: <http://www.w3.org/2006/vcard/ns#> . + +<http://$HOST$/$GRAPHSTORE$/person/1> a foaf:Person; + foaf:businessCard [ + a v:VCard; + v:fn \"Jane Doe\" + ]. +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "text/turtle; charset=utf-8"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "text/turtle"; + ht:params ([ + a ht:Parameter; + ht:paramName "charset"; + ht:paramValue "utf-8" + ]) + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "PUT"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "400" + ] + ]) + ]; + mf:name "PUT - mismatched payload" . diff --git a/sparql/sparql11/http-rdf-update/template.haml b/sparql/sparql11/http-rdf-update/template.haml index d61b86b3..53d4e1a2 100644 --- a/sparql/sparql11/http-rdf-update/template.haml +++ b/sparql/sparql11/http-rdf-update/template.haml @@ -1,5 +1,5 @@ !!! 5 -%html{lang: :en, prefix: "dawgt: http://www.w3.org/2001/sw/DataAccess/tests/test-dawg# mf: http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# mfx: http://jena.hpl.hp.com/2005/05/test-manifest-extra# qt: http://www.w3.org/2001/sw/DataAccess/tests/test-query# sd: http://www.w3.org/ns/sparql-service-description# ut: http://www.w3.org/2009/sparql/tests/test-update#"} +%html{lang: :en, prefix: "dawg: http://www.w3.org/2001/sw/DataAccess/tests/test-dawg# mf: http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# cnt: http://www.w3.org/2011/content# ht: http://www.w3.org/2011/http#"} %head %meta{"http-equiv" => "Content-Type", content: "text/html;charset=utf-8"} %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"} @@ -27,6 +27,7 @@ dl.test-description>dt {margin-top: 2em;} dd {margin-left: 0;} dd code {display: inline;} + pre.code {margin-left: 0;} footer {text-align: center;} %title = man['label'] @@ -61,22 +62,72 @@ %p{property: "rdfs:comment"} = Array(man['comment']).join(' ').gsub(/\s+/m, ' ').strip.gsub(/(MUST|SHOULD|MAY)/, '<em class="rfc2119">\\1</em>') :markdown - This page describes W3C SPARQL Working Group's SPARQL 1.0 test suite. + This page describes W3C SPARQL Working Group's SPARQL 1.1 test suite. - **$HOST$** is the host where the Graph Store Protocol implementation is listening + **$HOST$** + : is the host where the Graph Store Protocol implementation is listening - **$GRAPHSTORE$** is the path of the URL of the graph store + **$GRAPHSTORE$** + : is the path of the URL of the graph store - **$NEWPATH$** is the URL returned in the Location HTTP header + **$NEWPATH$** + : is the URL returned in the Location HTTP header - HTTP response messages are in the format: + The Turtle and JSON-LD versions of this manifest use the [`ht`](http://www.w3.org/2011/http#) + and [`cnt`](http://www.w3.org/2011/content#) namespaces to describe the + HTTP actions that a test client can use to provision call and response + that a server will use to run each test. + This includes a sequence of HTTP requests, with headers and other information + that can be used for the provisioned client to will use to send HTTP methods + to the system under test along with the expected response. - HTTP Status code - Headers - <space> - Body + For example, the following entry for `:delete__existing_graph` + has an action described as an `ht:Connection`, with the authority `"www.example"` + and a sequence of requests having a single entry of type `ht:Request`, + an `ht:absolutePath` of `"$GRAPHSTORE$/person/2.ttl"` (where the + test runner will substitute `$GRAPHSTORE` with the path to the graph store service + being tested), and the expected response: + <#delete__existing_graph> a mf:GraphStoreProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + ht:absolutePath "$GRAPHSTORE$/person/2.ttl"; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Host"; + ht:fieldValue "$HOST$"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "$HOST$" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "DELETE"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "200" + ] + ]) + ]; + mf:name "DELETE - existing graph" . + This is rendered into HTTP envelopes: + + **Request** + + DELETE $GRAPHSTORE$/person/2.ttl HTTP/1.1 + Host: www.example + Host: $HOST$ + + **Response** + + 200 response + %h3#contributing-tests="Contributing Tests" :markdown The test manifests and entries are built automatically from [manifest.ttl](manifest.ttl) using a Rake task. Tests may be contributed via pull request to [https://github.com/w3c/rdf-tests](https://github.com/w3c/rdf-tests) with suitable changes to the [manifest.ttl](manifest.ttl) and referenced files. @@ -105,18 +156,12 @@ Test Descriptions %dl.test-description - man['entries'].each do |test| - - test_id = test['@id'].split('#').last + - test_id = test['@id'].split(':').last %dt{id: test_id} %a.testlink{href: "##{test_id}"} = "#{test_id}:" %span{about: test['@id'], property: "mf:name"}<~test['name'] %dd{property: "mf:entry", inlist: true, resource: test['@id'], typeof: test['@type']} - %div{property: "rdfs:comment"} - :markdown - #{test['comment'].to_s.gsub(/(MUST|SHOULD|MAY)/, '<em class="rfc2119">\\1</em>')} - - if test['type'] =~ /Negative/ - %p.error - Negative Test %dl.test-detail %dt="type" %dd<~test['@type'] @@ -126,93 +171,85 @@ - if test['approvedBy'] %dt="approvedBy" %dd - %a{property: "dawgt:approvedBy", href: test['approvedBy']}<~test['approvedBy'] - - - # Spec references - - if test_map[test_id] - %dt="references" - %dd - - links = test_map[test_id].map.with_index {|l, r| %(<a href="#{l}">#{r+1}</a>)} - != "(#{links.join(' ')})" - - - # Evaluation Tests - - if test['action'].is_a?(String) - %dt="action" - %dd - %a{property: "mf:action", href: test['action']}<~test['action'] - - if test['action'].is_a?(Hash) - %dt="action" - %dd - %dl.test-detail{property: "mf:action", resource: test['action']['@id']} - - # Entailment - - if test['action']['EntailmentProfile'] - %dt='EntailmentProfile' - %dd - - test['action']['EntailmentProfile'].each do |r| - %span{property: "sd:EntailmentProfile", resource: r}<~r - - if test['action']['http://www.w3.org/ns/sparql-service-description#EntailmentProfile'] - %dt='EntailmentProfile' - %dd{property: "sd:EntailmentProfile", resource: test['action']['http://www.w3.org/ns/sparql-service-description#EntailmentProfile']['@id']}<~test['action']['http://www.w3.org/ns/sparql-service-description#EntailmentProfile']['@id'] - - if test['action']['entailmentRegime'] - %dt='entailmentRegime' - %dd - - test['action']['entailmentRegime'].each do |r| - %span{property: "sd:entailmentRegime", resource: r}<~r - - if test['action']['http://www.w3.org/ns/sparql-service-description#entailmentRegime'] - %dt='entailmentRegime' - %dd{property: "sd:entailmentRegime", resource: test['action']['http://www.w3.org/ns/sparql-service-description#entailmentRegime']['@id']}<~test['action']['http://www.w3.org/ns/sparql-service-description#entailmentRegime']['@id'] - - - if test['action']['query'] - %dt='query' - %dd - %a{property: "qt:query", href: test['action']['query']}<~test['action']['query'] - - if test['action']['data'] - %dt='data' - %dd - %a{property: "qt:data", href: test['action']['data']}<~test['action']['data'] - - if test['action']['ut:data'] - %dt='data' - %dd - %a{property: "ut:data", href: test['action']['ut:data']}<~test['action']['ut:data'] - - if test['action']['ut:graphData'] - %dt='graphData' - %dd - %table.test-detail - - test['action']['ut:graphData'].each do |gd| - %tr{property: 'ut:graphData', resource: gd['@id']} - %td{property: "rdfs:label"}<~gd['label'] - %td - %a{property: "ut:graph", href: gd['ut:graph']}<~gd['ut:graph'] - - if test['action']['ut:request'] - %dt='request' - %dd - %a{property: "ut:request", href: test['action']['ut:request']}<~test['action']['ut:request'] - - - if test['result'].is_a?(String) - %dt="result" - %dd - %a{property: "mf:result", href: test['result']}<~test['result'] - - if test['result'].is_a?(Hash) - %dt="result" - %dd - %dl.test-detail{property: "mf:result", resource: test['result']['@id']} - - if test['result']['ut:result'] - %dt='result' - %dd - %code{property: "ut:result", resource: test['result']['ut:result']}<~test['result']['ut:result'] - - if test['result']['ut:data'] - %dt='data' - %dd - %a{property: "ut:data", href: test['result']['ut:data']}<~test['result']['ut:data'] - - if test['result']['ut:graphData'] - %dt='graphData' - %dd - %table.test-detail - - test['result']['ut:graphData'].each do |gd| - %tr{property: 'ut:graphData', resource: gd['@id']} - %td{property: "rdfs:label"}<~gd['label'] - %td - %a{property: "ut:graph", href: gd['ut:graph']}<~gd['ut:graph'] + %a{property: "dawg:approvedBy", href: test['approvedBy']}<~test['approvedBy'] + - # Evaluation Tests + - if test['action'].is_a?(Hash) + %div.test-detail{property: "mf:action", typeof: test['action']['@type']} + %meta{property: "ht:connectionAuthority", value: test['action']['ht:connectionAuthority']} + %div{property: 'ht:requests', inlist: true} + - test['action']['requests'].each_with_index do |request, ndx| + - response = request['ht:resp'] + - if ndx > 0 + %br + %div + followed by + %div{typeof: request['@type']} + %h4 Request + %code + %span{property: 'ht:methodName'}<=request['ht:methodName'] + %span{property: 'ht:absolutePath'}&=request['ht:absolutePath'] + HTTP/ + %span{property: 'ht:absolutePath'}<>=request['ht:httpVersion'] + %br + %span<="Host: " + test['action']['ht:connectionAuthority'] + %br + - if request['headers'] + %span{property: 'ht:headers', inlist: true} + - request['headers'].each do |header| + %div{typeof: header['@type']} + %meta{property: 'ht:fieldValue', value: header['ht:fieldValue']} + %span{property: 'ht:fieldName'}<>= header['ht:fieldName'] + = ': ' + %span{property: 'ht:headerElements', inlist: true} + - header['headerElements'].each_with_index do |he, hendx| + - if hendx > 0 + %span or + %span{typeof: he['@type']} + %span{property: 'ht:elementName'}<>= he['ht:elementName'] + - Array(he['params']).each do |param| + = "; " + %span{property: 'ht:params', typeof: param['@type'], inlist: true} + %span{property: 'ht:paramName'}<>= param['ht:paramName'] + = "=" + %span{property: 'ht:paramValue'}<>= param['ht:paramValue'] + - if request['ht:body'] + %br + %div{property: 'ht:body', typeof: request['ht:body']['@type']} + %meta{property: 'cnt:characterEncoding', value: request['ht:body']['cnt:characterEncoding']} + %pre.code{property: 'cnt:chars'}&= request['ht:body']['cnt:chars'] + %div{typeof: response['@type']} + %h4 Response + %code + - response['ht:statusCodeValue'].each_with_index do |s, sndx| + - if sndx > 0 + = "or" + %span{property: 'ht:statusCodeValue'}<=s + %span + response + - if response['headers'] + %span{property: 'ht:headers', inlist: true} + - response['headers'].each_with_index do |header, hndx| + %div{typeof: header['@type']} + %meta{property: 'ht:fieldValue', value: header['ht:fieldValue']} + %span{property: 'ht:fieldName'}<>= header['ht:fieldName'] + = ': ' + %span{property: 'ht:headerElements', inlist: true} + - header['headerElements'].each_with_index do |he, hendx| + - if hendx > 0 + %span or + %span{typeof: he['@type']} + %span{property: 'ht:elementName'}<>= he['ht:elementName'] + - Array(he['params']).each do |param| + = "; " + %span{property: 'ht:params', typeof: param['@type'], inlist: true} + %span{property: 'ht:paramName'}<>= param['ht:paramName'] + = "=" + %span{property: 'ht:paramValue'}<>= param['ht:paramValue'] + - if response['ht:body'] + %br + %div{property: 'ht:body', typeof: response['ht:body']['@type']} + %meta{property: 'cnt:characterEncoding', value: response['ht:body']['cnt:characterEncoding']} + %pre.code{property: 'cnt:chars'}&= response['ht:body']['cnt:chars'] %footer :markdown diff --git a/sparql/sparql11/protocol/Rakefile b/sparql/sparql11/protocol/Rakefile new file mode 100644 index 00000000..c3c62b82 --- /dev/null +++ b/sparql/sparql11/protocol/Rakefile @@ -0,0 +1,14 @@ +# Builds manifests +task default: [:jsonld, :ttl, :html] + +task jsonld: "gen_manifest.rb" do + %x(ruby gen_manifest.rb -o manifest.jsonld) +end + +task ttl: "gen_manifest.rb" do + %x(ruby gen_manifest.rb --format ttl -o manifest.ttl) +end + +task html: "gen_manifest.rb" do + %x(ruby gen_manifest.rb --format html -o index.html) +end diff --git a/sparql/sparql11/protocol/gen_manifest.rb b/sparql/sparql11/protocol/gen_manifest.rb new file mode 100644 index 00000000..aabcb7cb --- /dev/null +++ b/sparql/sparql11/protocol/gen_manifest.rb @@ -0,0 +1,924 @@ +require 'cgi' +require 'getoptlong' +require 'json/ld' +require 'rdf/rdfa' +require 'rdf/reasoner' +require 'rdf/turtle' +require 'haml' +require 'htmlbeautifier' + +# Test descriptions used for generating Manifest and HTML renderings. +# +# ### Request (`req`): +# * `method`: HTTP request method +# * `content`: HTTP request content. If an object/hash, used to create application/x-www-form-urlencoded content. If the request `Content-Type` header indicates a text encoding this MUST be used for encoding any POST content. +# * `Accept`: HTTP request accept header +# * `Content-Type`: HTTP request content-type (defaults to `application/x-www-form-urlencoded` for POST). +# * Other entries are encoded as request query parameters. +# +# If `req` has more than one entry, the intermediate response is expected to be a success with the following `resp` description used to match the final response. +# +# ### Response (`resp`): +# `status`: HTTP response status to match. +# `Content-Type`: response content-type expected to match one of these. +POSITIVE_TESTS = { + query_get: { + name: "query via GET", + req: [{ + method: :GET, + 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), + content: true + } + }], + }, + query_post_form: { + name: "query via URL-encoded POST", + req: [{ + method: :POST, + 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), + content: true + } + }], + }, + query_post_direct: { + name: "query via POST directly", + req: [{ + method: :POST, + content: "ASK {}", + "default-graph-uri": "http://kasei.us/2009/09/sparql/data/data0.rdf", + "Content-Type": "application/sparql-query", + resp: { + status: %w(2XX 3XX), + "Content-Type": %w(application/sparql-results+xml application/sparql-results+json), + content: true + } + }], + }, + query_dataset_default_graph: { + name: "query with protocol-specified default graph", + req: [{ + method: :POST, + content: { + query: 'ASK { <http://kasei.us/2009/09/sparql/data/data1.rdf> ?p ?o }', + "default-graph-uri": "http://kasei.us/2009/09/sparql/data/data1.rdf", + }, + resp: { + status: %w(2XX 3XX), + "Content-Type": %w(application/sparql-results+xml application/sparql-results+json), + content: true + } + }], + }, + query_dataset_default_graphs_get: { + name: "GET query with protocol-specified default graphs", + req: [{ + method: :GET, + query: 'ASK { <http://kasei.us/2009/09/sparql/data/data1.rdf> a ?type . <http://kasei.us/2009/09/sparql/data/data2.rdf> a ?type . }', + "default-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_dataset_default_graphs_post: { + name: "POST query with protocol-specified default graphs", + req: [{ + method: :POST, + content: { + query: 'ASK { <http://kasei.us/2009/09/sparql/data/data1.rdf> a ?type . <http://kasei.us/2009/09/sparql/data/data2.rdf> a ?type . }', + "default-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_dataset_named_graphs_post: { + name: "POST query with protocol-specified named graphs", + req: [{ + method: :POST, + content: { + query: 'ASK { GRAPH ?g1 { <http://kasei.us/2009/09/sparql/data/data1.rdf> a ?type } GRAPH ?g2 { <http://kasei.us/2009/09/sparql/data/data2.rdf> 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_dataset_named_graphs_get: { + name: "GET query with protocol-specified named graphs", + req: [{ + method: :GET, + query: 'ASK { GRAPH ?g1 { <http://kasei.us/2009/09/sparql/data/data1.rdf> a ?type } GRAPH ?g2 { <http://kasei.us/2009/09/sparql/data/data2.rdf> 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_dataset_full: { + name: "query with protocol-specified dataset (both named and default graphs)", + req: [{ + method: :POST, + content: { + query: %( +ASK { + <http://kasei.us/2009/09/sparql/data/data3.rdf> a ?type + GRAPH ?g1 { <http://kasei.us/2009/09/sparql/data/data1.rdf> a ?type } + GRAPH ?g2 { <http://kasei.us/2009/09/sparql/data/data2.rdf> a ?type } +} +), + 'default-graph-uri': 'http://kasei.us/2009/09/sparql/data/data3.rdf', + '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_multiple_dataset: { + name: "query specifying dataset in both query string and protocol; test for use of protocol-specified dataset", + req: [{ + method: :POST, + content: { + query: 'ASK FROM <http://kasei.us/2009/09/sparql/data/data3.rdf> { GRAPH ?g1 { <http://kasei.us/2009/09/sparql/data/data1.rdf> a ?type } GRAPH ?g2 { <http://kasei.us/2009/09/sparql/data/data2.rdf> 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 <http://example.org/>', + '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 { <s> <p> 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: <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 +} +) +}, + 'using-graph-uri': 'http://kasei.us/2009/09/sparql/data/data1.rdf', + resp: { + status: %w(2XX 3XX) + } + }, { + method: :POST, + content: %( +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> + } +} +), + '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: <http://purl.org/dc/terms/> +PREFIX foaf: <http://xmlns.com/foaf/0.1/> +DROP 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 +} +) +}, + '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 <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> . + } + } +} +), + '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: <http://purl.org/dc/terms/> +PREFIX foaf: <http://xmlns.com/foaf/0.1/> +DROP 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 + } +} +) +}, + '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 <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> . + } + } +} +), + '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: <http://purl.org/dc/terms/> +PREFIX foaf: <http://xmlns.com/foaf/0.1/> +DROP 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) + } +} +), + '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 <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 + } + } +} +), + '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 <http://example.org/protocol-base-test/> ; INSERT DATA { GRAPH <http://example.org/protocol-base-test/> { <http://example.org/s> <http://example.org/p> <test> } }' + }, + resp: { + status: %w(2XX 3XX) + } + }, { + method: :POST, + content: { + query: 'SELECT ?o WHERE { GRAPH <http://example.org/protocol-base-test/> { <http://example.org/s> <http://example.org/p> ?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_ `<test>`" + } + }] + }, +} + +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: <http://xmlns.com/foaf/0.1/> +WITH <http://example/addresses> +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": "dawg: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": "https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest", + "cnt": "http://www.w3.org/2011/content#", + "dawg": "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": "dawg:approval", "@type": "@id"}, + "approvedBy": {"@id": "dawg: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": [] +} + +NEGATIVE_TESTS.merge(POSITIVE_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__)) + haml_runner = if Haml::VERSION >= "6" + Haml::Template.new(format: :html5) {template} + else + Haml::Engine.new(template, format: :html5) + end + html = haml_runner.render(self, man: JSON.parse(man.to_json)) + validate(RDF::RDFa::Reader.new(html, base_uri: "https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest", validate: validate)) if validate + beautified = HtmlBeautifier.beautify(html) + "\n" + output.write(beautified) +when :jsonld + validate(JSON::LD::Reader.new(man.to_json, base_uri: "https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest", 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: { + "": "https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest", + cnt: "http://www.w3.org/2011/content#", + dawg: "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#", + }, + base_uri: "https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest" + ) {|writer| writer << reader} + + validate(RDF::Turtle::Reader.new(ttl, base_uri: "https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest", validate: true)) if validate + + # Do some result hacking + 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/sparql/sparql11/protocol/index.html b/sparql/sparql11/protocol/index.html index 2aaac9b9..532a2bed 100644 --- a/sparql/sparql11/protocol/index.html +++ b/sparql/sparql11/protocol/index.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang='en' prefix='dawgt: http://www.w3.org/2001/sw/DataAccess/tests/test-dawg# mf: http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# mfx: http://jena.hpl.hp.com/2005/05/test-manifest-extra# qt: http://www.w3.org/2001/sw/DataAccess/tests/test-query# sd: http://www.w3.org/ns/sparql-service-description# ut: http://www.w3.org/2009/sparql/tests/test-update#'> +<html lang='en' prefix='dawg: http://www.w3.org/2001/sw/DataAccess/tests/test-dawg# mf: http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# cnt: http://www.w3.org/2011/content# ht: http://www.w3.org/2011/http# trs: https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest#'> <head> <meta content='text/html;charset=utf-8' http-equiv='Content-Type'> <meta content='width=device-width, initial-scale=1.0' name='viewport'> @@ -50,7 +50,7 @@ .error {color: red;} </style> </head> - <body resource='./' typeof='mf:Manifest'> + <body resource='' typeof='mf:Manifest'> <p> <a href='http://www.w3.org/'> <img alt='W3C' height='48' src='http://www.w3.org/Icons/w3c_home' width='72'> @@ -62,22 +62,10 @@ <h1 property='rdfs:label'>SPARQL Protocol</h1> <div> <h2 id='abstract'>Abstract</h2> <p property='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 <em class="rfc2119">MUST</em> include one or more of these types. Responses for ASK match any specified boolean content. Some tests require special result processing. </p> - <p>This page describes W3C SPARQL Working Group's SPARQL 1.0 test suite.</p> - <h3 id="configuration">Configuration</h3> - <p>When accessed without any query parameters, the CGI provides an HTML form that - may be used to validate a Protocol implementation. The parameters are:</p> - <ul> - <li>"query_url" – query endpoint URL</li> - <li>"update_url" – update endpoint URL</li> - <li>"software" – The Protocol implementation IRI that will be used if <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html">conneg</a> is used and requests RDF</li> - </ul> - <p>The following parameters <em>should</em> also be accounted for (in a future version):</p> - <ul> - <li>does the default graph change based on other graphs (e.g. acts as the union of named graphs)?</li> - </ul> - <h3 id="requirements">Requirements</h3> - <p>It is assumed that the Protocol implementation provides support for all of SPARQL (1.0) + <p>This page describes W3C SPARQL Working Group's SPARQL 1.1 test suite.</p> + <p>It is assumed that the Protocol implementation provides support for all of SPARQL (1.1) and also SPARQL 1.1 Query/Update support for:</p> <ul> <li>Select expressions</li> @@ -95,6 +83,65 @@ <h3 id="requirements">Requirements</h3> </ul> <p>Finally, it is assumed that implementations can produce application/rdf+xml and application/sparql-results+xml when requested using <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html">conneg</a>.</p> + <p>The Turtle and JSON-LD versions of this manifest use the <a href="http://www.w3.org/2011/http#"><code>ht</code></a> + and <a href="http://www.w3.org/2011/content#"><code>cnt</code></a> namespaces to describe the + HTTP actions that a test client can use to provision call and response + that a server will use to run each test. + This includes a sequence of HTTP requests, with headers and other information + that can be used for the provisioned client to will use to send HTTP methods + to the system under test along with the expected response.</p> + <p>For example, the following entry for <code>trs:query_get</code> + has an action described as an <code>ht:Connection</code>, with the authority <code>"www.example"</code> + and a sequence of requests having a single entry of type <code>ht:Request</code>, + and the expected response:</p> + <pre><code><#query_get> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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 "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "query via GET" . +</code></pre> + <p>This is rendered into HTTP envelopes:</p> + <p><strong>Request</strong></p> + <pre><code> 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 +</code></pre> + <p><strong>Response</strong></p> + <pre><code> 2XXor3XX response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true +</code></pre> <h3 id='contributing-tests'>Contributing Tests</h3> <p>The test manifests and entries are built automatically from <a href="manifest.ttl">manifest.ttl</a> using a Rake task. Tests may be contributed via pull request to <a href="https://github.com/w3c/rdf-tests">https://github.com/w3c/rdf-tests</a> with suitable changes to the <a href="manifest.ttl">manifest.ttl</a> and referenced files.</p> <h3 id='distribution'>Distribution</h3> @@ -108,1142 +155,2081 @@ <h2> Test Descriptions </h2> <dl class='test-description'> - <dt id='query_post_form'> - <a class='testlink' href='#query_post_form'> - query_post_form: + <dt id='#bad_query_method'> + <a class='testlink' href='##bad_query_method'> + #bad_query_method: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_post_form' property='mf:name'>query via URL-encoded POST</span> + <span about='#bad_query_method' property='mf:name'>invoke query operation with a method other than GET or POST</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_post_form' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_query_method' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: application/x-www-form-urlencoded -Content-Length: XXX - -query=ASK%20%7B%7D -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>PUT</span> + <span property='ht:absolutePath'>/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_dataset_default_graphs_get'> - <a class='testlink' href='#query_dataset_default_graphs_get'> - query_dataset_default_graphs_get: + <dt id='#bad_multiple_queries'> + <a class='testlink' href='##bad_multiple_queries'> + #bad_multiple_queries: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_default_graphs_get' property='mf:name'>GET query with protocol-specified default graph</span> + <span about='#bad_multiple_queries' property='mf:name'>invoke query operation with more than one query string</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_default_graphs_get' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_multiple_queries' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='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</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_dataset_default_graphs_post'> - <a class='testlink' href='#query_dataset_default_graphs_post'> - query_dataset_default_graphs_post: + <dt id='#bad_query_wrong_media_type'> + <a class='testlink' href='##bad_query_wrong_media_type'> + #bad_query_wrong_media_type: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_default_graphs_post' property='mf:name'>POST query with protocol-specified default graphs</span> + <span about='#bad_query_wrong_media_type' property='mf:name'>invoke query operation with a POST with media type that's not url-encoded or application/sparql-query</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_default_graphs_post' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_query_wrong_media_type' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 } -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/plain'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/plain</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>ASK {}</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_dataset_named_graphs_post'> - <a class='testlink' href='#query_dataset_named_graphs_post'> - query_dataset_named_graphs_post: + <dt id='#bad_query_missing_form_type'> + <a class='testlink' href='##bad_query_missing_form_type'> + #bad_query_missing_form_type: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_named_graphs_post' property='mf:name'>POST query with protocol-specified named graphs</span> + <span about='#bad_query_missing_form_type' property='mf:name'>invoke query operation with url-encoded body, but without application/x-www-form-urlencoded media type</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_named_graphs_post' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_query_missing_form_type' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 } } -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_dataset_named_graphs_get'> - <a class='testlink' href='#query_dataset_named_graphs_get'> - query_dataset_named_graphs_get: + <dt id='#bad_query_missing_direct_type'> + <a class='testlink' href='##bad_query_missing_direct_type'> + #bad_query_missing_direct_type: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_named_graphs_get' property='mf:name'>GET query with protocol-specified named graphs</span> + <span about='#bad_query_missing_direct_type' property='mf:name'>invoke query operation with SPARQL body, but without application/sparql-query media type</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_named_graphs_get' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_query_missing_direct_type' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>ASK {}</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_dataset_full'> - <a class='testlink' href='#query_dataset_full'> - query_dataset_full: + <dt id='#bad_query_non_utf8'> + <a class='testlink' href='##bad_query_non_utf8'> + #bad_query_non_utf8: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_full' property='mf:name'>query with protocol-specified dataset (both named and default graphs)</span> + <span about='#bad_query_non_utf8' property='mf:name'>invoke query operation with direct POST, but with a non-UTF8 encoding (UTF-16)</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_dataset_full' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_query_non_utf8' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 } } -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-query; charset=UTF-16'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-query</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>UTF-16</span></span> + </span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-16'> + <span property='cnt:chars'>ASK {}</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_multiple_dataset'> - <a class='testlink' href='#query_multiple_dataset'> - query_multiple_dataset: + <dt id='#bad_query_syntax'> + <a class='testlink' href='##bad_query_syntax'> + #bad_query_syntax: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_multiple_dataset' property='mf:name'>query specifying dataset in both query string and protocol; test for use of protocol-specified dataset</span> + <span about='#bad_query_syntax' property='mf:name'>invoke query operation with invalid query syntax (4XX result)</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_multiple_dataset' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_query_syntax' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 } -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>/sparql?query=ASK%20%7B&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_get'> - <a class='testlink' href='#query_get'> - query_get: + <dt id='#bad_update_get'> + <a class='testlink' href='##bad_update_get'> + #bad_update_get: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_get' property='mf:name'>query via GET</span> + <span about='#bad_update_get' property='mf:name'>invoke update operation with GET</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_get' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_update_get' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET /sparql?query=ASK%20%7B%7D -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>/sparql?update=CLEAR%20ALL&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_content_type_select'> - <a class='testlink' href='#query_content_type_select'> - query_content_type_select: + <dt id='#bad_multiple_updates'> + <a class='testlink' href='##bad_multiple_updates'> + #bad_multiple_updates: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_select' property='mf:name'>query appropriate content type (expect one of: XML, JSON, CSV, TSV)</span> + <span about='#bad_multiple_updates' property='mf:name'>invoke update operation with more than one update string</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_select' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_multiple_updates' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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) {} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, or text/csv -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>update=CLEAR%20ALL&update=CLEAR%20DEFAULT</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_content_type_ask'> - <a class='testlink' href='#query_content_type_ask'> - query_content_type_ask: + <dt id='#bad_update_wrong_media_type'> + <a class='testlink' href='##bad_update_wrong_media_type'> + #bad_update_wrong_media_type: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_ask' property='mf:name'>query appropriate content type (expect one of: XML, JSON)</span> + <span about='#bad_update_wrong_media_type' property='mf:name'>invoke update operation with a POST with media type that's not url-encoded or application/sparql-update</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_ask' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_update_wrong_media_type' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: application/sparql-query -Content-Length: XXX - -ASK {} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='text/plain'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/plain</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>CLEAR NAMED</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_content_type_describe'> - <a class='testlink' href='#query_content_type_describe'> - query_content_type_describe: + <dt id='#bad_update_missing_form_type'> + <a class='testlink' href='##bad_update_missing_form_type'> + #bad_update_missing_form_type: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_describe' property='mf:name'>query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa)</span> + <span about='#bad_update_missing_form_type' property='mf:name'>invoke update operation with url-encoded body, but without application/x-www-form-urlencoded media type</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_describe' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_update_missing_form_type' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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/> -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/rdf+xml, application/rdf+json or text/turtle -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>CLEAR NAMED</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='query_content_type_construct'> - <a class='testlink' href='#query_content_type_construct'> - query_content_type_construct: + <dt id='#bad_update_non_utf8'> + <a class='testlink' href='##bad_update_non_utf8'> + #bad_update_non_utf8: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_construct' property='mf:name'>query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa)</span> + <span about='#bad_update_non_utf8' property='mf:name'>invoke update operation with direct POST, but with a non-UTF8 encoding</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_content_type_construct' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_update_non_utf8' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 {} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/rdf+xml, application/rdf+json or text/turtle -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-update; charset=UTF-16'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-update</span>; + <span inlist='true' property='ht:params' typeof='ht:Parameter'><span property='ht:paramName'>charset</span>=<span property='ht:paramValue'>UTF-16</span></span> + </span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-16'> + <span property='cnt:chars'>CLEAR NAMED</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='update_dataset_default_graph'> - <a class='testlink' href='#update_dataset_default_graph'> - update_dataset_default_graph: + <dt id='#bad_update_syntax'> + <a class='testlink' href='##bad_update_syntax'> + #bad_update_syntax: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_default_graph' property='mf:name'>update with protocol-specified default graph</span> + <span about='#bad_update_syntax' property='mf:name'>invoke update operation with invalid update syntax (4XX result)</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_default_graph' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_update_syntax' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 -} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -</code></pre> - <p>followed by</p> - <h4 id="request-1">Request</h4> - <pre><code>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> - } -} -</code></pre> - <h4 id="response-1">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>update=CLEAR%20XYZ</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='update_dataset_default_graphs'> - <a class='testlink' href='#update_dataset_default_graphs'> - update_dataset_default_graphs: + <dt id='#bad_update_dataset_conflict'> + <a class='testlink' href='##bad_update_dataset_conflict'> + #bad_update_dataset_conflict: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_default_graphs' property='mf:name'>update with protocol-specified default graphs</span> + <span about='#bad_update_dataset_conflict' property='mf:name'>invoke update with both using-graph-uri/using-named-graph-uri parameter and USING/WITH clause</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_default_graphs' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#bad_update_dataset_conflict' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 -} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -</code></pre> - <p>followed by</p> - <h4 id="request-1">Request</h4> - <pre><code>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> . - } - } -} -</code></pre> - <h4 id="response-1">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/x-www-form-urlencoded'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/x-www-form-urlencoded</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>4XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='update_dataset_named_graphs'> - <a class='testlink' href='#update_dataset_named_graphs'> - update_dataset_named_graphs: + <dt id='#query_get'> + <a class='testlink' href='##query_get'> + #query_get: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_named_graphs' property='mf:name'>update with protocol-specified named graphs</span> + <span about='#query_get' property='mf:name'>query via GET</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_named_graphs' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_get' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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 - } -} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -</code></pre> - <p>followed by</p> - <h4 id="request-1">Request</h4> - <pre><code>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> . - } - } -} -</code></pre> - <h4 id="response-1">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='ht:absolutePath'>/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='update_dataset_full'> - <a class='testlink' href='#update_dataset_full'> - update_dataset_full: + <dt id='#query_post_form'> + <a class='testlink' href='##query_post_form'> + #query_post_form: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_full' property='mf:name'>update with protocol-specified dataset (both named and default graphs)</span> + <span about='#query_post_form' property='mf:name'>query via URL-encoded POST</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_dataset_full' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_post_form' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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) - } -} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -</code></pre> - <p>followed by</p> - <h4 id="request-1">Request</h4> - <pre><code>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 - } - } -} -</code></pre> - <h4 id="response-1">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='update_post_form'> - <a class='testlink' href='#update_post_form'> - update_post_form: + <dt id='#query_post_direct'> + <a class='testlink' href='##query_post_direct'> + #query_post_direct: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_post_form' property='mf:name'>update via URL-encoded POST</span> + <span about='#query_post_direct' property='mf:name'>query via POST directly</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_post_form' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_post_direct' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: application/x-www-form-urlencoded -Content-Length: XXX - -update=CLEAR%20ALL -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-query'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-query</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>ASK {}</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='update_post_direct'> - <a class='testlink' href='#update_post_direct'> - update_post_direct: + <dt id='#query_dataset_default_graph'> + <a class='testlink' href='##query_dataset_default_graph'> + #query_dataset_default_graph: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_post_direct' property='mf:name'>update via POST directly</span> + <span about='#query_dataset_default_graph' property='mf:name'>query with protocol-specified default graph</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_post_direct' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_dataset_default_graph' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: application/sparql-update -Content-Length: XXX - -CLEAR ALL -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='update_base_uri'> - <a class='testlink' href='#update_base_uri'> - update_base_uri: + <dt id='#query_dataset_default_graphs_get'> + <a class='testlink' href='##query_dataset_default_graphs_get'> + #query_dataset_default_graphs_get: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_base_uri' property='mf:name'>test for service-defined BASE URI ("which MAY be the service endpoint")</span> + <span about='#query_dataset_default_graphs_get' property='mf:name'>GET query with protocol-specified default graphs</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#update_base_uri' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_dataset_default_graphs_get' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>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> } } -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -</code></pre> - <h4 id="request-1">Request</h4> - <pre><code>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 - } -} -</code></pre> - <h4 id="response-1">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml - -one result with `?o` bound to an IRI that is _not_ `<test>` -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='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</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='query_post_direct'> - <a class='testlink' href='#query_post_direct'> - query_post_direct: + <dt id='#query_dataset_default_graphs_post'> + <a class='testlink' href='##query_dataset_default_graphs_post'> + #query_dataset_default_graphs_post: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_post_direct' property='mf:name'>query via POST directly</span> + <span about='#query_dataset_default_graphs_post' property='mf:name'>POST query with protocol-specified default graphs</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#query_post_direct' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_dataset_default_graphs_post' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: application/sparql-query -Content-Length: XXX - -ASK {} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>2xx or 3xx response -Content-Type: application/sparql-results+xml or application/sparql-results+json - -true -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='bad_query_method'> - <a class='testlink' href='#bad_query_method'> - bad_query_method: + <dt id='#query_dataset_named_graphs_post'> + <a class='testlink' href='##query_dataset_named_graphs_post'> + #query_dataset_named_graphs_post: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_method' property='mf:name'>invoke query operation with a method other than GET or POST</span> + <span about='#query_dataset_named_graphs_post' property='mf:name'>POST query with protocol-specified named graphs</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_method' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_dataset_named_graphs_post' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>PUT /sparql?query=ASK%20%7B%7D -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='bad_multiple_queries'> - <a class='testlink' href='#bad_multiple_queries'> - bad_multiple_queries: + <dt id='#query_dataset_named_graphs_get'> + <a class='testlink' href='##query_dataset_named_graphs_get'> + #query_dataset_named_graphs_get: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_multiple_queries' property='mf:name'>invoke query operation with more than one query string</span> + <span about='#query_dataset_named_graphs_get' property='mf:name'>GET query with protocol-specified named graphs</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_multiple_queries' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_dataset_named_graphs_get' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET /sparql?query=ASK%20%7B%7D&query=SELECT%20%2A%20%7B%7D -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>GET</span> + <span property='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</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='bad_query_wrong_media_type'> - <a class='testlink' href='#bad_query_wrong_media_type'> - bad_query_wrong_media_type: + <dt id='#query_dataset_full'> + <a class='testlink' href='##query_dataset_full'> + #query_dataset_full: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_wrong_media_type' property='mf:name'>invoke query operation with a POST with media type that's not url-encoded or application/sparql-query</span> + <span about='#query_dataset_full' property='mf:name'>query with protocol-specified dataset (both named and default graphs)</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_wrong_media_type' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_dataset_full' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: text/plain -Content-Length: XXX - -ASK {} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='bad_query_missing_form_type'> - <a class='testlink' href='#bad_query_missing_form_type'> - bad_query_missing_form_type: + <dt id='#query_multiple_dataset'> + <a class='testlink' href='##query_multiple_dataset'> + #query_multiple_dataset: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_missing_form_type' property='mf:name'>invoke query operation with url-encoded body, but without application/x-www-form-urlencoded media type</span> + <span about='#query_multiple_dataset' property='mf:name'>query specifying dataset in both query string and protocol; test for use of protocol-specified dataset</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_missing_form_type' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_multiple_dataset' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Length: XXX - -query=ASK%20%7B%7D -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>true</span> + </div> + </code> + </div> + </div> + </div> </dd> - <dt id='bad_query_missing_direct_type'> - <a class='testlink' href='#bad_query_missing_direct_type'> - bad_query_missing_direct_type: + <dt id='#query_content_type_select'> + <a class='testlink' href='##query_content_type_select'> + #query_content_type_select: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_missing_direct_type' property='mf:name'>invoke query operation with SPARQL body, but without application/sparql-query media type</span> + <span about='#query_content_type_select' property='mf:name'>SELECT query appropriate content type (expect one of: XML, JSON, CSV, TSV)</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_missing_direct_type' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_content_type_select' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Length: XXX - -ASK {} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, text/csv'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/tab-separated-values</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/csv</span></span> + </span> + </div> + </span></code> + </div> + </div> + </div> </dd> - <dt id='bad_query_non_utf8'> - <a class='testlink' href='#bad_query_non_utf8'> - bad_query_non_utf8: + <dt id='#query_content_type_ask'> + <a class='testlink' href='##query_content_type_ask'> + #query_content_type_ask: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_non_utf8' property='mf:name'>invoke query operation with direct POST, but with a non-UTF8 encoding (UTF-16)</span> + <span about='#query_content_type_ask' property='mf:name'>ASK query appropriate content type (expect one of: XML, JSON)</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_non_utf8' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_content_type_ask' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <p>(content body encoded in utf-16)</p> - <h4 id="request">Request</h4> - <pre><code>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 {} -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>query=ASK%20%7B%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata0.rdf</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml, application/sparql-results+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+json</span></span> + </span> + </div> + </span></code> + </div> + </div> + </div> </dd> - <dt id='bad_query_syntax'> - <a class='testlink' href='#bad_query_syntax'> - bad_query_syntax: + <dt id='#query_content_type_describe'> + <a class='testlink' href='##query_content_type_describe'> + #query_content_type_describe: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_syntax' property='mf:name'>invoke query operation with invalid query syntax (4XX result)</span> + <span about='#query_content_type_describe' property='mf:name'>DESCRIBE query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD)</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_query_syntax' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_content_type_describe' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET /sparql?query=ASK%20%7B -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/rdf+xml, text/turtle, application/n-triples, text/html, application/ld+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/rdf+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/n-triples</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/html</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/ld+json</span></span> + </span> + </div> + </span></code> + </div> + </div> + </div> </dd> - <dt id='bad_update_get'> - <a class='testlink' href='#bad_update_get'> - bad_update_get: + <dt id='#query_content_type_construct'> + <a class='testlink' href='##query_content_type_construct'> + #query_content_type_construct: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_get' property='mf:name'>invoke update operation with GET</span> + <span about='#query_content_type_construct' property='mf:name'>CONSTRUCT query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD))</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_get' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#query_content_type_construct' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>GET /sparql?update=CLEAR%20ALL -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/rdf+xml, text/turtle, application/n-triples, text/html, application/ld+json'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/rdf+xml</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/turtle</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/n-triples</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>text/html</span></span> + <span>or</span> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/ld+json</span></span> + </span> + </div> + </span></code> + </div> + </div> + </div> </dd> - <dt id='bad_multiple_updates'> - <a class='testlink' href='#bad_multiple_updates'> - bad_multiple_updates: + <dt id='#update_dataset_default_graph'> + <a class='testlink' href='##update_dataset_default_graph'> + #update_dataset_default_graph: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_multiple_updates' property='mf:name'>invoke update operation with more than one update string</span> + <span about='#update_dataset_default_graph' property='mf:name'>update with protocol-specified default graph</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_multiple_updates' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#update_dataset_default_graph' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: application/x-www-form-urlencoded -Content-Length: XXX - -update=CLEAR%20NAMED&update=CLEAR%20DEFAULT -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + </code> + </div> + <br> + <div> + followed by + </div> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-query'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-query</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'> + 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> + } + } + </span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + </span></code> + </div> + </div> + </div> </dd> - <dt id='bad_update_wrong_media_type'> - <a class='testlink' href='#bad_update_wrong_media_type'> - bad_update_wrong_media_type: + <dt id='#update_dataset_default_graphs'> + <a class='testlink' href='##update_dataset_default_graphs'> + #update_dataset_default_graphs: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_wrong_media_type' property='mf:name'>invoke update operation with a POST with media type that's not url-encoded or application/sparql-update</span> + <span about='#update_dataset_default_graphs' property='mf:name'>update with protocol-specified default graphs</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_wrong_media_type' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#update_dataset_default_graphs' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: text/plain -Content-Length: XXX - -CLEAR NAMED -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='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</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + </code> + </div> + <br> + <div> + followed by + </div> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-query'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-query</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'> + 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> . + } + } + } + </span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + </span></code> + </div> + </div> + </div> </dd> - <dt id='bad_update_missing_form_type'> - <a class='testlink' href='#bad_update_missing_form_type'> - bad_update_missing_form_type: + <dt id='#update_dataset_named_graphs'> + <a class='testlink' href='##update_dataset_named_graphs'> + #update_dataset_named_graphs: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_missing_form_type' property='mf:name'>invoke update operation with url-encoded body, but without application/x-www-form-urlencoded media type</span> + <span about='#update_dataset_named_graphs' property='mf:name'>update with protocol-specified named graphs</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_missing_form_type' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#update_dataset_named_graphs' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Length: XXX - -update=CLEAR%20NAMED -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='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</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + </code> + </div> + <br> + <div> + followed by + </div> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-query'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-query</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'> + 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> . + } + } + } + </span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + </span></code> + </div> + </div> + </div> </dd> - <dt id='bad_update_non_utf8'> - <a class='testlink' href='#bad_update_non_utf8'> - bad_update_non_utf8: + <dt id='#update_dataset_full'> + <a class='testlink' href='##update_dataset_full'> + #update_dataset_full: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_non_utf8' property='mf:name'>invoke update operation with direct POST, but with a non-UTF8 encoding</span> + <span about='#update_dataset_full' property='mf:name'>update with protocol-specified dataset (both named and default graphs)</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_non_utf8' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#update_dataset_full' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <p>(content body encoded in utf-16)</p> - <h4 id="request">Request</h4> - <pre><code>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 -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='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</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + </code> + </div> + <br> + <div> + followed by + </div> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-query'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-query</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'> + 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 + } + } + } + </span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + </span></code> + </div> + </div> + </div> </dd> - <dt id='bad_update_syntax'> - <a class='testlink' href='#bad_update_syntax'> - bad_update_syntax: + <dt id='#update_post_form'> + <a class='testlink' href='##update_post_form'> + #update_post_form: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_syntax' property='mf:name'>invoke update operation with invalid update syntax</span> + <span about='#update_post_form' property='mf:name'>update via URL-encoded POST</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_syntax' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#update_post_form' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: application/x-www-form-urlencoded -Content-Length: XXX - -update=CLEAR%20XYZ -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>update=CLEAR%20ALL</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + </code> + </div> + </div> + </div> </dd> - <dt id='bad_update_dataset_conflict'> - <a class='testlink' href='#bad_update_dataset_conflict'> - bad_update_dataset_conflict: + <dt id='#update_post_direct'> + <a class='testlink' href='##update_post_direct'> + #update_post_direct: </a> - <span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_dataset_conflict' property='mf:name'>invoke update with both using-graph-uri/using-named-graph-uri parameter and USING/WITH clause</span> + <span about='#update_post_direct' property='mf:name'>update via POST directly</span> </dt> - <dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#bad_update_dataset_conflict' typeof='mf:ProtocolTest'> + <dd inlist='true' property='mf:entry' resource='#update_post_direct' typeof='mf:ProtocolTest'> <div property='rdfs:comment'> - <h4 id="request">Request</h4> - <pre><code>POST /sparql/ HTTP/1.1 -Host: www.example -User-agent: sparql-client/0.1 -Content-Type: application/x-www-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 -</code></pre> - <h4 id="response">Response</h4> - <pre><code>4xx -</code></pre> </div> <dl class='test-detail'> <dt>type</dt> <dd>mf:ProtocolTest</dd> <dt>approval</dt> - <dd property='mf:approval' resource=''></dd> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-update'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-update</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>CLEAR ALL</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + </code> + </div> + </div> + </div> + </dd> + <dt id='#update_base_uri'> + <a class='testlink' href='##update_base_uri'> + #update_base_uri: + </a> + <span about='#update_base_uri' property='mf:name'>test for service-defined BASE URI ("which MAY be the service endpoint")</span> + </dt> + <dd inlist='true' property='mf:entry' resource='#update_base_uri' typeof='mf:ProtocolTest'> + <div property='rdfs:comment'> + </div> + <dl class='test-detail'> + <dt>type</dt> + <dd>mf:ProtocolTest</dd> + <dt>approval</dt> + <dd property='mf:approval' resource='dawg:Approved'>dawg:Approved</dd> + <dt>approvedBy</dt> + <dd> + <a href='http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3' property='dawg:approvedBy'>http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3</a> + </dd> + </dl> + <div class='test-detail' property='mf:action' typeof='ht:Connection'> + <meta property='ht:connectionAuthority' value='www.example'> + <div inlist='true' property='ht:requests'> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + </code> + </div> + <br> + <div> + followed by + </div> + <div typeof='ht:Request'> + <h4>Request</h4> + <code><span property='ht:methodName'>POST</span> + <span property='ht:absolutePath'>/sparql</span> + HTTP/<span property='ht:absolutePath'>1.1</span><br> + <span>Host: www.example</span> + <br> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Accept</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='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</span> + </div> + </code> + </div> + <div typeof='ht:Response'> + <h4>Response</h4> + <code><span property='ht:statusCodeValue'>2XX</span>or<span property='ht:statusCodeValue'>3XX</span><span> + response + </span> + <span inlist='true' property='ht:headers'> + <div typeof='ht:RequestHeader'> + <meta property='ht:fieldValue' value='application/sparql-results+xml'><span property='ht:fieldName'>Content-Type</span>: + <span inlist='true' property='ht:headerElements'> + <span typeof='ht:HeaderElement'><span property='ht:elementName'>application/sparql-results+xml</span></span> + </span> + </div> + </span><br> + <div property='ht:body' typeof='cnt:ContentAsText'> + <meta property='cnt:characterEncoding' value='UTF-8'> + <span property='cnt:chars'>one result with `?o` bound to an IRI that is _not_ `<test>`</span> + </div> + </code> + </div> + </div> + </div> </dd> </dl> </div> diff --git a/sparql/sparql11/protocol/manifest.jsonld b/sparql/sparql11/protocol/manifest.jsonld new file mode 100644 index 00000000..9ed03644 --- /dev/null +++ b/sparql/sparql11/protocol/manifest.jsonld @@ -0,0 +1,1813 @@ +{ + "@context": { + "@base": "https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest", + "cnt": "http://www.w3.org/2011/content#", + "dawg": "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": "dawg:approval", + "@type": "@id" + }, + "approvedBy": { + "@id": "dawg: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": "#bad_query_method", + "@type": "mf:ProtocolTest", + "name": "invoke query operation with a method other than GET or POST", + "approval": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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" + ] + } + } + ] + } + }, + { + "@id": "#query_get", + "@type": "mf:ProtocolTest", + "name": "query via GET", + "approval": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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": "dawg: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 <http://example.org/protocol-update-dataset-test/> {\n <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource>\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": "dawg: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 <http://example.org/protocol-update-dataset-graphs-test/> {\n <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> .\n <http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> .\n }\n FILTER NOT EXISTS {\n GRAPH <http://example.org/protocol-update-dataset-graphs-test/> {\n <http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> .\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": "dawg: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 <http://example.org/protocol-update-dataset-named-graphs-test/> {\n <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> .\n <http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> .\n }\n FILTER NOT EXISTS {\n GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> {\n <http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> .\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": "dawg: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 <http://example.org/protocol-update-dataset-full-test/> {\n <http://kasei.us/2009/09/sparql/data/data1.rdf> <http://example.org/in> \"default\" .\n <http://kasei.us/2009/09/sparql/data/data2.rdf> <http://example.org/in> <http://kasei.us/2009/09/sparql/data/data2.rdf> .\n }\n FILTER NOT EXISTS {\n GRAPH <http://example.org/protocol-update-dataset-full-test/> {\n <http://kasei.us/2009/09/sparql/data/data3.rdf> ?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": "dawg: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": "dawg: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": "dawg: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_ `<test>`", + "cnt:characterEncoding": "UTF-8" + } + } + } + ] + } + } + ] +} diff --git a/sparql/sparql11/protocol/manifest.ttl b/sparql/sparql11/protocol/manifest.ttl index a13cb34b..381ccc05 100644 --- a/sparql/sparql11/protocol/manifest.ttl +++ b/sparql/sparql11/protocol/manifest.ttl @@ -1,961 +1,1430 @@ -@prefix : <http://www.w3.org/2009/sparql/docs/tests/data-sparql11/protocol/manifest#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . -@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> . -@prefix dawgt: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> . - -<> 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-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 <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 { <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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 <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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 <http://example.org/> - -#### Response - - 2xx or 3xx response - Content-Type: application/rdf+xml, application/rdf+json or text/turtle - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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 { <s> <p> 1 } WHERE {} - -#### Response - - 2xx or 3xx response - Content-Type: application/rdf+xml, application/rdf+json or text/turtle - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -: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: <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 - } +@base <https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest> . +@prefix : <https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest> . +@prefix cnt: <http://www.w3.org/2011/content#> . +@prefix dawg: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> . +@prefix ht: <http://www.w3.org/2011/http#> . +@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +<manifest> 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 ( + <#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_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_multiple_queries> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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%20XYZ" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "4XX" + ] + ]) + ]; + mf:name "invoke update operation with invalid update syntax (4XX result)" . + +<#bad_update_wrong_media_type> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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: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 update operation with a POST with media type that's not url-encoded or application/sparql-update" . + +<#query_content_type_ask> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "ASK query appropriate content type (expect one of: XML, JSON)" . + +<#query_content_type_construct> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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=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" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/rdf+xml, text/turtle, application/n-triples, text/html, application/ld+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/rdf+xml" + ] [ + a ht:HeaderElement; + ht:elementName "text/turtle" + ] [ + a ht:HeaderElement; + ht:elementName "application/n-triples" + ] [ + a ht:HeaderElement; + ht:elementName "text/html" + ] [ + a ht:HeaderElement; + ht:elementName "application/ld+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "CONSTRUCT query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD))" . + +<#query_content_type_describe> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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=DESCRIBE%20%3Chttp%3A%2F%2Fexample.org%2F%3E&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:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/rdf+xml, text/turtle, application/n-triples, text/html, application/ld+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/rdf+xml" + ] [ + a ht:HeaderElement; + ht:elementName "text/turtle" + ] [ + a ht:HeaderElement; + ht:elementName "application/n-triples" + ] [ + a ht:HeaderElement; + ht:elementName "text/html" + ] [ + a ht:HeaderElement; + ht:elementName "application/ld+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "DESCRIBE query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa, JSON-LD)" . + +<#query_content_type_select> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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=SELECT%20%281%20AS%20%3Fvalue%29%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:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, text/csv"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ] [ + a ht:HeaderElement; + ht:elementName "text/tab-separated-values" + ] [ + a ht:HeaderElement; + ht:elementName "text/csv" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "SELECT query appropriate content type (expect one of: XML, JSON, CSV, TSV)" . + +<#query_dataset_default_graph> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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%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" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "query with protocol-specified default graph" . + +<#query_dataset_default_graphs_get> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + 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:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "GET query with protocol-specified default graphs" . + +<#query_dataset_default_graphs_post> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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%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:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "POST query with protocol-specified default graphs" . + +<#query_dataset_full> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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=%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" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "query with protocol-specified dataset (both named and default graphs)" . + +<#query_dataset_named_graphs_get> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + 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:httpVersion "1.1"; + ht:methodName "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "GET query with protocol-specified named graphs" . + +<#query_dataset_named_graphs_post> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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%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:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "POST query with protocol-specified named graphs" . + +<#query_get> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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 "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "query via GET" . + +<#query_multiple_dataset> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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%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" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "query specifying dataset in both query string and protocol; test for use of protocol-specified dataset" . + +<#query_post_direct> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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 "application/sparql-query"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-query" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "query via POST directly" . + +<#query_post_form> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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 "POST"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "query via URL-encoded POST" . + +<#update_base_uri> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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 "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" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "2XX", + "3XX" + ] + ] [ + a ht:Request; + ht:absolutePath "/sparql"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + 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" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars "one result with `?o` bound to an IRI that is _not_ `<test>`" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "test for service-defined BASE URI (\"which MAY be the service endpoint\")" . + +<#update_dataset_default_graph> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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%2Fdata1.rdf"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + 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" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "2XX", + "3XX" + ] + ] [ + a ht:Request; + ht:absolutePath "/sparql"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars """ +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> + } +} +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-query"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-query" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "update with protocol-specified default graph" . + +<#update_dataset_default_graphs> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + 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" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "2XX", + "3XX" + ] + ] [ + a ht:Request; + ht:absolutePath "/sparql"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars """ +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> . } - WHERE { - ?s a foaf:Document + } +} +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-query"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-query" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "update with protocol-specified default graphs" . + +<#update_dataset_full> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + mf:action [ + a ht:Connection; + ht:connectionAuthority "www.example"; + ht:requests ([ + a ht:Request; + 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:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "2XX", + "3XX" + ] + ] [ + a ht:Request; + ht:absolutePath "/sparql"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars """ +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 - -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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:update_dataset_default_graphs rdf:type mf:ProtocolTest ; - mf:name "update with protocol-specified default graphs" ; - rdfs:comment """ -#### 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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:update_dataset_named_graphs rdf:type mf:ProtocolTest ; - mf:name "update with protocol-specified named graphs" ; - rdfs:comment """ -#### 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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:update_dataset_full rdf:type mf:ProtocolTest ; - mf:name "update with protocol-specified dataset (both named and default graphs)" ; - rdfs:comment """ -#### 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 - } + } +} +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-query"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-query" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "update with protocol-specified dataset (both named and default graphs)" . + +<#update_dataset_named_graphs> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + 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" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "2XX", + "3XX" + ] + ] [ + a ht:Request; + ht:absolutePath "/sparql"; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars """ +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> . } - 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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:update_post_form rdf:type mf:ProtocolTest ; - mf:name "update 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-form-urlencoded - Content-Length: XXX - - update=CLEAR%20ALL - -#### Response - - 2xx or 3xx response - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:update_post_direct rdf:type mf:ProtocolTest ; - mf:name "update via POST directly" ; - rdfs:comment """ -#### 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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:update_base_uri rdf:type mf:ProtocolTest ; - mf:name "test for service-defined BASE URI (\"which MAY be the service endpoint\")" ; - rdfs:comment """ -#### 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>` - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:query_post_direct rdf:type mf:ProtocolTest ; - mf:name "query via POST directly" ; - 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 - - true - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_query_method rdf:type mf:ProtocolTest ; - mf:name "invoke query operation with a method other than GET or POST" ; - rdfs:comment """ -#### Request - - PUT /sparql?query=ASK%20%7B%7D - -#### Response - - 4xx - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_multiple_queries rdf:type mf:ProtocolTest ; - mf:name "invoke query operation with more than one query string" ; - rdfs:comment """ -#### Request - - GET /sparql?query=ASK%20%7B%7D&query=SELECT%20%2A%20%7B%7D - -#### Response - - 4xx - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_query_wrong_media_type rdf:type mf:ProtocolTest ; - mf:name "invoke query operation with a POST with media type that's not url-encoded or application/sparql-query" ; - rdfs:comment """ -#### 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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_query_missing_form_type rdf:type mf:ProtocolTest ; - mf:name "invoke query operation with url-encoded body, but without application/x-www-form-urlencoded media type" ; - rdfs:comment """ -#### 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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_query_missing_direct_type rdf:type mf:ProtocolTest ; - mf:name "invoke query operation with SPARQL body, but without application/sparql-query media type" ; - rdfs:comment """ -#### Request - - POST /sparql/ HTTP/1.1 - Host: www.example - User-agent: sparql-client/0.1 - Content-Length: XXX - - ASK {} - -#### Response - - 4xx - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_query_non_utf8 rdf:type mf:ProtocolTest ; - mf:name "invoke query operation with direct POST, but with a non-UTF8 encoding (UTF-16)" ; - rdfs:comment """ -(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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_query_syntax rdf:type mf:ProtocolTest ; - mf:name "invoke query operation with invalid query syntax (4XX result)" ; - rdfs:comment """ -#### Request - - GET /sparql?query=ASK%20%7B - -#### Response - - 4xx - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_update_get rdf:type mf:ProtocolTest ; - mf:name "invoke update operation with GET" ; - rdfs:comment """ -#### Request - - GET /sparql?update=CLEAR%20ALL - -#### Response - - 4xx - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_multiple_updates rdf:type mf:ProtocolTest ; - mf:name "invoke update operation with more than one update string" ; - rdfs:comment """ -#### Request - - POST /sparql/ HTTP/1.1 - Host: www.example - User-agent: sparql-client/0.1 - Content-Type: application/x-www-form-urlencoded - Content-Length: XXX - - update=CLEAR%20NAMED&update=CLEAR%20DEFAULT - -#### Response - - 4xx - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_update_wrong_media_type rdf:type mf:ProtocolTest ; - mf:name "invoke update operation with a POST with media type that's not url-encoded or application/sparql-update" ; - rdfs:comment """ -#### 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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_update_missing_form_type rdf:type mf:ProtocolTest ; - mf:name "invoke update operation with url-encoded body, but without application/x-www-form-urlencoded media type" ; - rdfs:comment """ -#### Request - - POST /sparql/ HTTP/1.1 - Host: www.example - User-agent: sparql-client/0.1 - Content-Length: XXX - - update=CLEAR%20NAMED - -#### Response - - 4xx - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_update_non_utf8 rdf:type mf:ProtocolTest ; - mf:name "invoke update operation with direct POST, but with a non-UTF8 encoding" ; - rdfs:comment """ -(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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_update_syntax rdf:type mf:ProtocolTest ; - mf:name "invoke update operation with invalid update syntax" ; - rdfs:comment """ -#### Request - - POST /sparql/ HTTP/1.1 - Host: www.example - User-agent: sparql-client/0.1 - Content-Type: application/x-www-form-urlencoded - Content-Length: XXX - - update=CLEAR%20XYZ - -#### Response - - 4xx - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . - -:bad_update_dataset_conflict rdf:type mf:ProtocolTest ; - mf:name "invoke update with both using-graph-uri/using-named-graph-uri parameter and USING/WITH clause" ; - rdfs:comment """ -#### Request - - POST /sparql/ HTTP/1.1 - Host: www.example - User-agent: sparql-client/0.1 - Content-Type: application/x-www-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 - """ ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3> ; - . + } +} +""" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Accept"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ] [ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-query"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-query" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "update with protocol-specified named graphs" . + +<#update_post_direct> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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 "CLEAR ALL" + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-update"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-update" + ]) + ]); + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "update via POST directly" . + +<#update_post_form> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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 "update=CLEAR%20ALL" + ]; + ht:httpVersion "1.1"; + ht:methodName "POST"; + ht:resp [ + a ht:Response; + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "update via URL-encoded POST" . diff --git a/sparql/sparql11/protocol/template.haml b/sparql/sparql11/protocol/template.haml index bdf927d5..e533e54d 100644 --- a/sparql/sparql11/protocol/template.haml +++ b/sparql/sparql11/protocol/template.haml @@ -1,5 +1,5 @@ !!! 5 -%html{lang: :en, prefix: "dawgt: http://www.w3.org/2001/sw/DataAccess/tests/test-dawg# mf: http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# mfx: http://jena.hpl.hp.com/2005/05/test-manifest-extra# qt: http://www.w3.org/2001/sw/DataAccess/tests/test-query# sd: http://www.w3.org/ns/sparql-service-description# ut: http://www.w3.org/2009/sparql/tests/test-update#"} +%html{lang: :en, prefix: "dawg: http://www.w3.org/2001/sw/DataAccess/tests/test-dawg# mf: http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# cnt: http://www.w3.org/2011/content# ht: http://www.w3.org/2011/http# trs: https://w3c.github.io/rdf-tests/sparql/sparql11/protocol/manifest#"} %head %meta{"http-equiv" => "Content-Type", content: "text/html;charset=utf-8"} %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"} @@ -61,24 +61,9 @@ %p{property: "rdfs:comment"} = Array(man['comment']).join(' ').gsub(/\s+/m, ' ').strip.gsub(/(MUST|SHOULD|MAY)/, '<em class="rfc2119">\\1</em>') :markdown - This page describes W3C SPARQL Working Group's SPARQL 1.0 test suite. + This page describes W3C SPARQL Working Group's SPARQL 1.1 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](http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html) 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) + It is assumed that the Protocol implementation provides support for all of SPARQL (1.1) and also SPARQL 1.1 Query/Update support for: * Select expressions @@ -97,6 +82,70 @@ Finally, it is assumed that implementations can produce application/rdf+xml and application/sparql-results+xml when requested using [conneg](http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html). + The Turtle and JSON-LD versions of this manifest use the [`ht`](http://www.w3.org/2011/http#) + and [`cnt`](http://www.w3.org/2011/content#) namespaces to describe the + HTTP actions that a test client can use to provision call and response + that a server will use to run each test. + This includes a sequence of HTTP requests, with headers and other information + that can be used for the provisioned client to will use to send HTTP methods + to the system under test along with the expected response. + + For example, the following entry for `trs:query_get` + has an action described as an `ht:Connection`, with the authority `"www.example"` + and a sequence of requests having a single entry of type `ht:Request`, + and the expected response: + + <#query_get> a mf:ProtocolTest; + dawg:approval dawg:Approved; + dawg:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-11-20#resolution_3>; + 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 "GET"; + ht:resp [ + a ht:Response; + ht:body [ + a cnt:ContentAsText; + cnt:characterEncoding "UTF-8"; + cnt:chars true + ]; + ht:headers ([ + a ht:RequestHeader; + ht:fieldName "Content-Type"; + ht:fieldValue "application/sparql-results+xml, application/sparql-results+json"; + ht:headerElements ([ + a ht:HeaderElement; + ht:elementName "application/sparql-results+xml" + ] [ + a ht:HeaderElement; + ht:elementName "application/sparql-results+json" + ]) + ]); + ht:statusCodeValue "2XX", + "3XX" + ] + ]) + ]; + mf:name "query via GET" . + + This is rendered into HTTP envelopes: + + **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** + + 2XXor3XX response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true + %h3#contributing-tests="Contributing Tests" :markdown The test manifests and entries are built automatically from [manifest.ttl](manifest.ttl) using a Rake task. Tests may be contributed via pull request to [https://github.com/w3c/rdf-tests](https://github.com/w3c/rdf-tests) with suitable changes to the [manifest.ttl](manifest.ttl) and referenced files. @@ -126,7 +175,7 @@ Test Descriptions %dl.test-description - man['entries'].each do |test| - - test_id = test['@id'].split('#').last + - test_id = test['@id'].split(':').last %dt{id: test_id} %a.testlink{href: "##{test_id}"} = "#{test_id}:" @@ -147,93 +196,85 @@ - if test['approvedBy'] %dt="approvedBy" %dd - %a{property: "dawgt:approvedBy", href: test['approvedBy']}<~test['approvedBy'] - - - # Spec references - - if test_map[test_id] - %dt="references" - %dd - - links = test_map[test_id].map.with_index {|l, r| %(<a href="#{l}">#{r+1}</a>)} - != "(#{links.join(' ')})" - - - # Evaluation Tests - - if test['action'].is_a?(String) - %dt="action" - %dd - %a{property: "mf:action", href: test['action']}<~test['action'] - - if test['action'].is_a?(Hash) - %dt="action" - %dd - %dl.test-detail{property: "mf:action", resource: test['action']['@id']} - - # Entailment - - if test['action']['EntailmentProfile'] - %dt='EntailmentProfile' - %dd - - test['action']['EntailmentProfile'].each do |r| - %span{property: "sd:EntailmentProfile", resource: r}<~r - - if test['action']['http://www.w3.org/ns/sparql-service-description#EntailmentProfile'] - %dt='EntailmentProfile' - %dd{property: "sd:EntailmentProfile", resource: test['action']['http://www.w3.org/ns/sparql-service-description#EntailmentProfile']['@id']}<~test['action']['http://www.w3.org/ns/sparql-service-description#EntailmentProfile']['@id'] - - if test['action']['entailmentRegime'] - %dt='entailmentRegime' - %dd - - test['action']['entailmentRegime'].each do |r| - %span{property: "sd:entailmentRegime", resource: r}<~r - - if test['action']['http://www.w3.org/ns/sparql-service-description#entailmentRegime'] - %dt='entailmentRegime' - %dd{property: "sd:entailmentRegime", resource: test['action']['http://www.w3.org/ns/sparql-service-description#entailmentRegime']['@id']}<~test['action']['http://www.w3.org/ns/sparql-service-description#entailmentRegime']['@id'] - - - if test['action']['query'] - %dt='query' - %dd - %a{property: "qt:query", href: test['action']['query']}<~test['action']['query'] - - if test['action']['data'] - %dt='data' - %dd - %a{property: "qt:data", href: test['action']['data']}<~test['action']['data'] - - if test['action']['ut:data'] - %dt='data' - %dd - %a{property: "ut:data", href: test['action']['ut:data']}<~test['action']['ut:data'] - - if test['action']['ut:graphData'] - %dt='graphData' - %dd - %table.test-detail - - test['action']['ut:graphData'].each do |gd| - %tr{property: 'ut:graphData', resource: gd['@id']} - %td{property: "rdfs:label"}<~gd['label'] - %td - %a{property: "ut:graph", href: gd['ut:graph']}<~gd['ut:graph'] - - if test['action']['ut:request'] - %dt='request' - %dd - %a{property: "ut:request", href: test['action']['ut:request']}<~test['action']['ut:request'] - - - if test['result'].is_a?(String) - %dt="result" - %dd - %a{property: "mf:result", href: test['result']}<~test['result'] - - if test['result'].is_a?(Hash) - %dt="result" - %dd - %dl.test-detail{property: "mf:result", resource: test['result']['@id']} - - if test['result']['ut:result'] - %dt='result' - %dd - %code{property: "ut:result", resource: test['result']['ut:result']}<~test['result']['ut:result'] - - if test['result']['ut:data'] - %dt='data' - %dd - %a{property: "ut:data", href: test['result']['ut:data']}<~test['result']['ut:data'] - - if test['result']['ut:graphData'] - %dt='graphData' - %dd - %table.test-detail - - test['result']['ut:graphData'].each do |gd| - %tr{property: 'ut:graphData', resource: gd['@id']} - %td{property: "rdfs:label"}<~gd['label'] - %td - %a{property: "ut:graph", href: gd['ut:graph']}<~gd['ut:graph'] + %a{property: "dawg:approvedBy", href: test['approvedBy']}<~test['approvedBy'] + - # Evaluation Tests + - if test['action'].is_a?(Hash) + %div.test-detail{property: "mf:action", typeof: test['action']['@type']} + %meta{property: "ht:connectionAuthority", value: test['action']['ht:connectionAuthority']} + %div{property: 'ht:requests', inlist: true} + - test['action']['requests'].each_with_index do |request, ndx| + - response = request['ht:resp'] + - if ndx > 0 + %br + %div + followed by + %div{typeof: request['@type']} + %h4 Request + %code + %span{property: 'ht:methodName'}<=request['ht:methodName'] + %span{property: 'ht:absolutePath'}&=request['ht:absolutePath'] + HTTP/ + %span{property: 'ht:absolutePath'}<>=request['ht:httpVersion'] + %br + %span<="Host: " + test['action']['ht:connectionAuthority'] + %br + - if request['headers'] + %span{property: 'ht:headers', inlist: true} + - request['headers'].each do |header| + %div{typeof: header['@type']} + %meta{property: 'ht:fieldValue', value: header['ht:fieldValue']} + %span{property: 'ht:fieldName'}<>= header['ht:fieldName'] + = ': ' + %span{property: 'ht:headerElements', inlist: true} + - header['headerElements'].each_with_index do |he, hendx| + - if hendx > 0 + %span or + %span{typeof: he['@type']} + %span{property: 'ht:elementName'}<>= he['ht:elementName'] + - Array(he['params']).each do |param| + = "; " + %span{property: 'ht:params', typeof: param['@type'], inlist: true} + %span{property: 'ht:paramName'}<>= param['ht:paramName'] + = "=" + %span{property: 'ht:paramValue'}<>= param['ht:paramValue'] + - if request['ht:body'] + %br + %div{property: 'ht:body', typeof: request['ht:body']['@type']} + %meta{property: 'cnt:characterEncoding', value: request['ht:body']['cnt:characterEncoding']} + %span{property: 'cnt:chars'}&= request['ht:body']['cnt:chars'] + %div{typeof: response['@type']} + %h4 Response + %code + - response['ht:statusCodeValue'].each_with_index do |s, sndx| + - if sndx > 0 + = "or" + %span{property: 'ht:statusCodeValue'}<=s + %span + response + - if response['headers'] + %span{property: 'ht:headers', inlist: true} + - response['headers'].each_with_index do |header, hndx| + %div{typeof: header['@type']} + %meta{property: 'ht:fieldValue', value: header['ht:fieldValue']} + %span{property: 'ht:fieldName'}<>= header['ht:fieldName'] + = ': ' + %span{property: 'ht:headerElements', inlist: true} + - header['headerElements'].each_with_index do |he, hendx| + - if hendx > 0 + %span or + %span{typeof: he['@type']} + %span{property: 'ht:elementName'}<>= he['ht:elementName'] + - Array(he['params']).each do |param| + = "; " + %span{property: 'ht:params', typeof: param['@type'], inlist: true} + %span{property: 'ht:paramName'}<>= param['ht:paramName'] + = "=" + %span{property: 'ht:paramValue'}<>= param['ht:paramValue'] + - if response['ht:body'] + %br + %div{property: 'ht:body', typeof: response['ht:body']['@type']} + %meta{property: 'cnt:characterEncoding', value: response['ht:body']['cnt:characterEncoding']} + %span{property: 'cnt:chars'}&= response['ht:body']['cnt:chars'] %footer :markdown