diff --git a/spec/index.html b/spec/index.html index 34388c2..d8988aa 100644 --- a/spec/index.html +++ b/spec/index.html @@ -2,6 +2,7 @@
+The [[[SPARQL12-QUERY]]] defines several Query
- Result Forms (SPARQL Query section 10). This document defines a SPARQL Results
+ Result Forms (SPARQL Query section 10). This document defines a SPARQL Results
Document that encodes the variable binding query results from SELECT
queries (SPARQL Query section
10.2) and boolean query results from ASK
queries (SPARQL Query section 10.5) in XML.
Definition: SPARQL Results Document
-A SPARQL Results Document is an XML document that is valid with respect to either the RELAX NG XML Schema or the W3C XML Schema in Section - 4.
-Definition: SPARQL Results Document
+A SPARQL Results Document is an XML document that is valid with respect to either the RELAX NG XML Schema or the W3C XML Schema described in . +
+The SPARQL Results Document begins with sparql
document element in the http://www.w3.org/2005/sparql-results#
namespace, written as follows:
<?xml version="1.0"?> +The SPARQL Results Document begins with
+sparql
document element in thehttp://www.w3.org/2005/sparql-results#
namespace, written as follows:<?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"> @@ -390,7 +99,7 @@Document Element
Inside the
sparql
element are two sub-elements,head
and a results element (eitherresults
orboolean
) which must appear in that order.If no literals with base direction appear in the results, the
-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> @@ -409,7 +118,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 elementsvariable
with the variable name as the value of an attributename
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"> @@ -430,7 +139,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"> @@ -454,7 +163,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"> @@ -474,7 +183,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"> @@ -526,7 +235,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"> @@ -565,7 +274,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"> @@ -611,7 +320,7 @@Variable Binding Results
set, the namespace can be declared on specific elements as needed: -<?xml version="1.0"?> +<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#"> <head> <variable name="animal"/> @@ -643,7 +352,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 ... @@ -696,7 +405,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">