Skip to content

Commit f4977ce

Browse files
hartigTallTed
andauthored
Apply @TallTed's edit suggestions (mainly adding line breaks)
Co-authored-by: Ted Thibodeau Jr <[email protected]>
1 parent 10a3019 commit f4977ce

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

spec/index.html

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8617,13 +8617,14 @@ <h3>Algebraic Syntax</h3>
86178617
<span id="sparqlQuery"><!-- obsolete id --></span>
86188618
<h3>Translation to the Algebraic Syntax</h3>
86198619
<p>This section defines the process of converting graph patterns and solution modifiers in a
8620-
SPARQL query string into an <a href="#defn_AlgebraicQueryExpression">algebraic query expression</a>. The process described converts one
8620+
SPARQL query string into an <a href="#defn_AlgebraicQueryExpression">algebraic
8621+
query expression</a>. The process described converts one
86218622
level of query nesting, as formed by subqueries using the nested <code>SELECT</code> syntax and
86228623
is applied recursively on subqueries. Each level consists of graph pattern matching and
86238624
filtering, followed by the application of solution modifiers.</p>
86248625
<p>The SPARQL query string is parsed and the abbreviations for IRIs and triple patterns given
8625-
in Section&nbsp;<a href="#sparqlSyntax" class="sectionRef"></a> are applied. At this point the abstract syntax tree
8626-
is composed of:</p>
8626+
in Section&nbsp;<a href="#sparqlSyntax" class="sectionRef"></a> are applied.
8627+
At this point, the abstract syntax tree is composed of the following:</p>
86278628
<table class="plain">
86288629
<tbody>
86298630
<tr>
@@ -8708,12 +8709,13 @@ <h3>Translation to the Algebraic Syntax</h3>
87088709
</table>
87098710
<section id="variableScope">
87108711
<h4>Variable Scope</h4>
8711-
<p>We define a variable to be <i>in-scope</i> if there is a way for a variable to be in the
8712-
domain of a solution mapping at that point in the evaluation of the <a href="#defn_AlgebraicQueryExpression">algebraic expression</a> for the
8713-
query. The definition below provides a way of determining this from the abstract syntax tree of a
8714-
query.</p>
8712+
<p>We define a variable to be <i>in-scope</i> if there is a way for the variable to be in the
8713+
domain of a solution mapping at that point in the evaluation of the
8714+
<a href="#defn_AlgebraicQueryExpression">algebraic expression</a> of the
8715+
query. The definition below provides a way of determining this from the
8716+
abstract syntax tree of a query.</p>
87158717
<p>Note that a subquery with a projection can hide variables; use of a variable in
8716-
<code>FILTER</code>, or in <code>MINUS</code> does not cause a variable to be in-scope
8718+
<code>FILTER</code>, or in <code>MINUS</code> does not cause the variable to be in-scope
87178719
outside of those forms.</p>
87188720
<p>Let <b>P</b>, <b>P1</b>, <b>P2</b> be graph patterns and <b>E</b>,
87198721
<b>E1</b>,...<b>En</b> be expressions. A variable <code>v</code> is in-scope if:</p>
@@ -8792,9 +8794,12 @@ <h4>Variable Scope</h4>
87928794
</section>
87938795
<section id="convertGraphPattern">
87948796
<h4>Converting Graph Patterns</h4>
8795-
<p>This section describes the process for translating a SPARQL graph pattern into an <a href="#defn_AlgebraicQueryExpression">algebraic query expression</a>. This process is applied to the group graph pattern (the unit between
8796-
<code>{...}</code> delimiters) forming the <code>WHERE</code> clause of a query, and
8797-
recursively to each syntactic element within the group graph pattern. The result of the
8797+
<p>This section describes the process for translating a SPARQL graph pattern into an
8798+
<a href="#defn_AlgebraicQueryExpression">algebraic query expression</a>. This
8799+
process is applied to the group graph pattern (the unit between brace
8800+
("<code>{&nbsp}</code>") delimiters) forming the <code>WHERE</code> clause of a
8801+
query, and recursively to each syntactic element within the group graph pattern.
8802+
The result of the
87988803
translation is an <a href="#defn_AlgebraicQueryExpression">algebraic query expression</a>.</p>
87998804
<p>In summary, the steps are applied as follows:</p>
88008805
<ul>
@@ -9134,9 +9139,10 @@ <h5>Filters of Group</h5>
91349139
</section>
91359140
<section id="sparqlSimplification">
91369141
<h5>Simplification step</h5>
9137-
<p>Some groups of one graph pattern become <a href="#defn_absJoin" class="absOp">Join</a>(|Z|, |A|), where |Z| is the empty
9138-
basic graph pattern (which is the empty set). These are replaced by |A|. The empty graph
9139-
pattern |Z| is the identity for join:</p>
9142+
<p>Some groups of one graph pattern become <a href="#defn_absJoin"
9143+
class="absOp">Join</a>(|Z|, |A|), where |Z| is the empty basic graph
9144+
pattern (which is the empty set). These are replaced by |A|. The empty
9145+
graph pattern |Z| is the identity for join:</p>
91409146
<pre class="code nohighlight">
91419147
Replace <a href="#defn_absJoin" class="absOp">Join</a>(<var>Z</var>, <var>A</var>) by <var>A</var>
91429148
Replace <a href="#defn_absJoin" class="absOp">Join</a>(<var>A</var>, <var>Z</var>) by <var>A</var>
@@ -9417,7 +9423,8 @@ <h5>Grouping and Aggregation</h5>
94179423
<var>P</var> := <a href="#defn_absAggregateJoin" class="absOp">AggregateJoin</a>(<var>A</var>)
94189424
</pre>
94199425
<p>
9420-
The list <var>E</var> will be used when translating SELECT expressions in Section&nbsp;<a href="#sparqlSelectExpressions" class="sectionRef"></a>.
9426+
The list <var>E</var> will be used when translating SELECT expressions in
9427+
Section&nbsp;<a href="#sparqlSelectExpressions" class="sectionRef"></a>.
94219428
</p>
94229429
</section>
94239430
<section id="sparqlHavingClause">

0 commit comments

Comments
 (0)