From a545cf0723ed88a47f1b9ddf8a1daa01337fac8e Mon Sep 17 00:00:00 2001
From: Dominik Tomaszuk The SPARQL Results Document begins with Inside the If no literals with base direction appear in the results, the Definition
Document Element
sparql
document element in the http://www.w3.org/2005/sparql-results#
namespace, written as follows:<?xml version="1.0"?>
+
<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#"
xmlns:its="http://www.w3.org/2005/11/its"
its:version="2.0">
@@ -393,7 +393,7 @@
Document Element
sparql
element are two sub-elements, head
and a results element (either results
or boolean
) which must appear in that order.sparql
document element may be simplified as follows.<?xml version="1.0"?>
+
<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
...
</sparql>
@@ -412,7 +412,7 @@
Header
used, the order of the names is undefined.
Inside the head
element, the ordered sequence of variable names chosen are used to create empty child elements variable
with the variable name as the value of an
attribute name
giving a document like this:
<?xml version="1.0"?> +<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> @@ -433,7 +433,7 @@Header
For any query result,
-head
may also containlink
child elements with anhref
attribute containing a relative URI that provides a link to some additional metadata about the query results. The relative URI is resolved against the in-scope base URI which is usually the query results format document URI.link
elements must appear after anyvariable
elements that are present.<?xml version="1.0"?> +<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> @@ -457,7 +457,7 @@Variable Binding Results
The
results
element contains the complete sequence of query results.For each Query Solution in the query results, a
-result
child-element ofresults
is added giving a document like:<?xml version="1.0"?> +<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> @@ -477,7 +477,7 @@Variable Binding Results
solution. It is used to record how the query variables bind to RDF Terms.Each binding inside a solution is written as an element
-binding
as a child ofresult
with the query variable name as the value of thename
attribute. So for a result binding two variables x and hpage it would look like:<?xml version="1.0"?> +<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> @@ -529,7 +529,7 @@Variable Binding Results
Note: The blank node label I is scoped to the result set XML document and need not have any association to the blank node label for that RDF Term in the query graph.
An example of a query solution encoded in this format is as follows:
-<?xml version="1.0"?> +<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> @@ -568,7 +568,7 @@Variable Binding Results
</sparql>An example of a query solution that includes triple terms is as follows:
-<?xml version="1.0"?> +<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> @@ -614,7 +614,7 @@Variable Binding Results
Boolean Results
A boolean result is written as the element content of a
-boolean
child-element of thesparql
element directly after ahead
, containing eithertrue
orfalse
as follows:<?xml version="1.0"?> +<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#"> ... head ... @@ -667,7 +667,7 @@XML Schemas
Note: this schema is machine-generated from the RELAX NG XML schema.If W3C XML Schema is used, an
-xsi:schemaLocation
attribute can be used pointing to the schema as follows:<?xml version="1.0"?> +<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2005/sparql-results# http://www.w3.org/2007/SPARQL/result.xsd">