Skip to content

Commit 4038a3b

Browse files
committed
SPARQL String. Unicode escapes exclude surrogates
1 parent 16f8a7a commit 4038a3b

File tree

1 file changed

+56
-30
lines changed

1 file changed

+56
-30
lines changed

spec/index.html

Lines changed: 56 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@
347347
<h2>Abstract</h2>
348348
<p>
349349
RDF is a directed, labeled graph data model for representing information in the
350-
Web. This specification defines the syntax and semantics of the SPARQL query language for
350+
Web. This specification defines the syntax and semantics of the SPARQL Query Language for
351351
RDF. SPARQL can be used to express queries across diverse data sources, whether the data is
352352
stored natively as RDF or viewed as RDF via middleware. SPARQL contains capabilities for
353353
querying required and optional graph patterns along with their conjunctions and
@@ -374,11 +374,11 @@ <h2>Introduction</h2>
374374
RDF is a directed, labeled graph data model for representing information in the Web. RDF is
375375
often used to represent, among other things, personal information, social networks, metadata
376376
about digital artifacts, as well as to provide a means of integration over disparate sources of
377-
information. This specification defines the syntax and semantics of the SPARQL query language
377+
information. This specification defines the syntax and semantics of the SPARQL Query Language
378378
for RDF.
379379
</p>
380380
<p>
381-
The SPARQL query language for RDF is designed to meet the use cases and
381+
The SPARQL Query Language for RDF is designed to meet the use cases and
382382
requirements identified by the RDF Data Access Working Group in [[RDF-DAWG-UC]],
383383
the SPARQL 1.1 Working Group in [[SPARQL-FEATURES]], and the RDF-star Working Group.
384384
</p>
@@ -390,7 +390,7 @@ <h3>Document Outline</h3>
390390
</p>
391391
<p>
392392
This section of the document, <a href="#introduction">section 1</a>, introduces the SPARQL
393-
query language specification. It presents the organization of this specification document and
393+
Query Language specification. It presents the organization of this specification document and
394394
the conventions used throughout the specification.
395395
</p>
396396
<p>
@@ -5364,7 +5364,7 @@ <h4>Operator Extensibility</h4>
53645364
</section>
53655365
<section id="SparqlOps">
53665366
<h3>Function Definitions</h3>
5367-
<p>This section defines the operators and functions introduced by the SPARQL Query language.
5367+
<p>This section defines the operators and functions introduced by the SPARQL query language.
53685368
The examples show the behavior of the operators as invoked by the appropriate grammatical
53695369
constructs.</p>
53705370
<section id="func-forms">
@@ -10510,30 +10510,49 @@ <h4>Notes</h4>
1051010510
<h2>SPARQL Grammar</h2>
1051110511
<p>The SPARQL grammar covers both SPARQL Query and [[[SPARQL11-UPDATE]]].</p>
1051210512
<section id="queryString">
10513-
<h3>SPARQL Request String</h3>
10513+
<h3>SPARQL String</h3>
1051410514
<p>
10515-
A <dfn data-lt="SPARQLRequestString">SPARQL Request String</dfn> is
10516-
a <a>SPARQL Query String</a> or <a>SPARQL Update String</a> and is a Unicode character string
10517-
(c.f. section 6.1 String concepts of [[CHARMOD]]) in the language defined by the following
10518-
grammar.</p>
10515+
<span id="defn_SPARQLRequestString"></span>
10516+
A <dfn>SPARQL string</dfn> is an
10517+
<a data-cite="RDF12-CONCEPTS#dfn-rdf-string">RDF string</a> that
10518+
conforms to the grammar given in this section.
10519+
</p>
10520+
<p class="note">
10521+
An <a data-cite="RDF12-CONCEPTS#dfn-rdf-string">RDF string</a> is
10522+
a sequence of
10523+
<a data-cite="I18N-GLOSSARY#dfn-code-point" class="lint-ignore">Unicode code points</a>
10524+
which are <a data-cite="I18N-GLOSSARY#dfn-scalar-value" class="lint-ignore">Unicode scalar values</a>.
10525+
Unicode scalar values do not include the
10526+
<a data-cite="I18N-GLOSSARY#dfn-surrogate" class="lint-ignore">surrogate code points</a>.
10527+
</p>
1051910528
<p>
10520-
A <dfn data-lt="SPARQLQueryString">SPARQL Query String</dfn> starts
10521-
at the <a href="#rQueryUnit">QueryUnit</a> production.</p>
10529+
<span id="defn_SPARQLQueryString"></span>
10530+
A <dfn>SPARQL query string</dfn> is a
10531+
<a>SPARQL string</a> that conforms to the grammar starting at
10532+
the <a href="#rQueryUnit">QueryUnit</a> production.
10533+
</p>
1052210534
<p>
10523-
A <dfn data-lt="SPARQLUpdateString">SPARQL Update String</dfn> starts
10524-
at the <a href="#rUpdateUnit">UpdateUnit</a> production.</p>
10525-
<p>For compatibility with future versions of Unicode, the characters in this string may
10535+
<span id="defn_SPARQLUpdateString"></span>
10536+
A <dfn>SPARQL update string</dfn> is a
10537+
<a>SPARQL string</a> that conforms to the grammar starting at
10538+
the <a href="#rUpdateUnit">UpdateUnit</a> production.
10539+
</p>
10540+
<p>
10541+
For compatibility with future versions of Unicode, the characters in this string may
1052610542
include Unicode codepoints that are unassigned as of the date of this publication (see
1052710543
[[[UAX31]]] [[UAX31]] section 4 Pattern Syntax). For productions with excluded character
1052810544
classes (for example <code>[^&lt;&gt;'{}|^`]</code>), the characters are excluded from the
10529-
range <code>#x0 - #x10FFFF</code>.</p>
10545+
range <code>#x0 - #x10FFFF</code>.
10546+
</p>
1053010547
</section>
1053110548

1053210549
<section id="codepointEscape">
1053310550
<h3>Codepoint Escape Sequences</h3>
10534-
<p>A SPARQL Query String is processed for codepoint escape sequences before parsing by the
10551+
<p>
10552+
A <a>SPARQL string</a> is processed for codepoint escape sequences before parsing by the
1053510553
grammar defined in EBNF below. The codepoint escape sequences for a SPARQL query string
10536-
are:</p>
10554+
are:
10555+
</p>
1053710556
<span class="doc-ref" id="table68"></span>
1053810557
<table title="Codepoint escapes">
1053910558
<colgroup>
@@ -10551,15 +10570,19 @@ <h3>Codepoint Escape Sequences</h3>
1055110570
<a href="#HEX">HEX</a> <a href="#HEX">HEX</a>
1055210571
</td>
1055310572
<td>A Unicode code point in the range U+0 to U+FFFF inclusive corresponding to the
10554-
encoded hexadecimal value.</td>
10573+
encoded hexadecimal value, excluding U+D800 to U+DFFF, the
10574+
<a data-cite="I18N-GLOSSARY#dfn-surrogate">surrogate code points</a>.
10575+
</td>
1055510576
</tr>
1055610577
<tr>
1055710578
<td>
1055810579
<span class="token">'\U'</span> <a href="#HEX">HEX</a> <a href="#HEX">HEX</a>
1055910580
<a href="#HEX">HEX</a> <a href="#HEX">HEX</a> <a href="#HEX">HEX</a> <a href="#HEX">HEX</a> <a href="#HEX">HEX</a> <a href="#HEX">HEX</a>
1056010581
</td>
1056110582
<td>A Unicode code point in the range U+0 to U+10FFFF inclusive corresponding to the
10562-
encoded hexadecimal value.</td>
10583+
encoded hexadecimal value, excluding U+D800 to U+DFFF, the
10584+
<a data-cite="I18N-GLOSSARY#dfn-surrogate">surrogate code points</a>.
10585+
1056310586
</tr>
1056410587
</tbody>
1056510588
</table>
@@ -10572,13 +10595,16 @@ <h3>Codepoint Escape Sequences</h3>
1057210595
&lt;ab\u00E9xy&gt; # Codepoint 00E9 is Latin small e with acute - é
1057310596
\u03B1:a # Codepoint x03B1 is Greek small alpha - α
1057410597
a\u003Ab # a:b -- codepoint x3A is colon</pre>
10575-
<p>Codepoint escape sequences can appear anywhere in the query string. They are processed
10598+
<p>
10599+
Codepoint escape sequences can appear anywhere in the query string. They are processed
1057610600
before parsing based on the grammar rules and so may be replaced by codepoints with
10577-
significance in the grammar, such as "<code>:</code>" marking a prefixed name.</p>
10601+
significance in the grammar, such as "<code>:</code>" marking a prefixed name.
10602+
</p>
1057810603
<p>These escape sequences are not included in the grammar below. Only escape sequences for
1057910604
characters that would be legal at that point in the grammar may be given. For example, the
1058010605
variable "<code>?x\u0020y</code>" is not legal (<code>\u0020</code> is a space and is not
10581-
permitted in a variable name).</p>
10606+
permitted in a variable name).
10607+
</p>
1058210608
</section>
1058310609
<section id="whitespace">
1058410610
<h3>White Space</h3>
@@ -10626,22 +10652,22 @@ <h3>Blank Nodes and Blank Node Identifiers</h3>
1062610652
<li><code><a href="#rDeleteData">DELETE DATA</a></code></li>
1062710653
<li>a <code><a href="#rDeleteClause">DeleteClause</a></code></li>
1062810654
</ul>
10629-
<p>in a <a data-cite="SPARQL11-UPDATE#terminology">SPARQL Update
10655+
<p>in a <a data-cite="SPARQL11-UPDATE#terminology">SPARQL update
1063010656
request</a>.
1063110657
</p>
1063210658
<p>
1063310659
<a data-cite="RDF12-CONCEPTS#dfn-blank-node-identifier">Blank node identifiers</a>
10634-
are scoped to the <a>SPARQL Request String</a> in which they occur.
10660+
are scoped to the <a>SPARQL string</a> in which they occur.
1063510661
Different uses of the same blank node identifier in a request
1063610662
string refer to the same blank node. Fresh blank nodes are generated for each request;
1063710663
blank nodes can not be referenced by identifier across requests.</p>
1063810664
<p>The same blank node identifier can not be used in:</p>
1063910665
<ul>
1064010666
<li>two separate basic graph patterns in a SPARQL Query</li>
10641-
<li>two <code><a href="#rModify">WHERE</a></code> clauses within a single SPARQL Update
10667+
<li>two <code><a href="#rModify">WHERE</a></code> clauses within a single SPARQL update
1064210668
request</li>
1064310669
<li>two <code><a href="#rInsertData">INSERT DATA</a></code> operations within a single
10644-
SPARQL Update request</li>
10670+
SPARQL update request</li>
1064510671
</ul>
1064610672
<p>Note that the same blank node identifier can occur in different
1064710673
<a href="#rQuadPattern">QuadPattern</a> clauses in a [[[SPARQL11-UPDATE]]] request.</p>
@@ -10720,8 +10746,8 @@ <h3>Grammar</h3>
1072010746
<li>Escape sequences are case sensitive.</li>
1072110747
<li>When tokenizing the input and choosing grammar rules, the longest match is chosen.</li>
1072210748
<li>The SPARQL grammar is LL(1) when the rules with uppercased names are used as terminals.</li>
10723-
<li>There are two entry points into the grammar: <code>QueryUnit</code> for SPARQL queries,
10724-
and <code>UpdateUnit</code> for SPARQL Update requests.</li>
10749+
<li>There are two entry points into the grammar: <code>QueryUnit</code> for the SPARQL query language
10750+
and <code>UpdateUnit</code> for the SPARQL update language.</li>
1072510751
<li>In signed numbers, no white space is allowed between the sign and the number.
1072610752
The <code><a href="#rAdditiveExpression">AdditiveExpression</a></code> grammar rule allows for this by
1072710753
covering the two cases of an expression followed by a signed number. These
@@ -12123,7 +12149,7 @@ <h3>Grammar</h3>
1212312149
<section id="conformance">
1212412150
<h2>Conformance</h2>
1212512151
<p>See Section <a href="#grammar">19 SPARQL Grammar</a> regarding conformance of
12126-
<a>SPARQL Query strings</a>, and section
12152+
<a>SPARQL query strings</a>, and section
1212712153
<a href="#QueryForms">16 Query Forms</a> for conformance of query results.
1212812154
See section <a href="#mediaType">22. Internet Media Type</a> for conformance
1212912155
to the application/sparql-query media type.</p>

0 commit comments

Comments
 (0)