@@ -10510,30 +10510,49 @@ <h4>Notes</h4>
10510
10510
<h2>SPARQL Grammar</h2>
10511
10511
<p>The SPARQL grammar covers both SPARQL Query and [[[SPARQL11-UPDATE]]].</p>
10512
10512
<section id="queryString">
10513
- <h3>SPARQL Request String</h3>
10513
+ <h3>SPARQL String</h3>
10514
10514
<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>
10519
10528
<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>
10522
10534
<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
10526
10542
include Unicode codepoints that are unassigned as of the date of this publication (see
10527
10543
[[[UAX31]]] [[UAX31]] section 4 Pattern Syntax). For productions with excluded character
10528
10544
classes (for example <code>[^<>'{}|^`]</code>), the characters are excluded from the
10529
- range <code>#x0 - #x10FFFF</code>.</p>
10545
+ range <code>#x0 - #x10FFFF</code>.
10546
+ </p>
10530
10547
</section>
10531
10548
10532
10549
<section id="codepointEscape">
10533
10550
<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
10535
10553
grammar defined in EBNF below. The codepoint escape sequences for a SPARQL query string
10536
- are:</p>
10554
+ are:
10555
+ </p>
10537
10556
<span class="doc-ref" id="table68"></span>
10538
10557
<table title="Codepoint escapes">
10539
10558
<colgroup>
@@ -10551,15 +10570,19 @@ <h3>Codepoint Escape Sequences</h3>
10551
10570
<a href="#HEX">HEX</a> <a href="#HEX">HEX</a>
10552
10571
</td>
10553
10572
<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>
10555
10576
</tr>
10556
10577
<tr>
10557
10578
<td>
10558
10579
<span class="token">'\U'</span> <a href="#HEX">HEX</a> <a href="#HEX">HEX</a>
10559
10580
<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>
10560
10581
</td>
10561
10582
<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
+
10563
10586
</tr>
10564
10587
</tbody>
10565
10588
</table>
@@ -10572,13 +10595,16 @@ <h3>Codepoint Escape Sequences</h3>
10572
10595
<ab\u00E9xy> # Codepoint 00E9 is Latin small e with acute - é
10573
10596
\u03B1:a # Codepoint x03B1 is Greek small alpha - α
10574
10597
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
10576
10600
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>
10578
10603
<p>These escape sequences are not included in the grammar below. Only escape sequences for
10579
10604
characters that would be legal at that point in the grammar may be given. For example, the
10580
10605
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>
10582
10608
</section>
10583
10609
<section id="whitespace">
10584
10610
<h3>White Space</h3>
0 commit comments