diff --git a/spec/index.html b/spec/index.html index 99422cc..2c08e7d 100644 --- a/spec/index.html +++ b/spec/index.html @@ -8924,28 +8924,6 @@
Expand Syntax Forms

Expand abbreviations for IRIs and triple patterns given in section 4.

-
-
Collect FILTER Elements
-

FILTER expressions apply to the whole group graph pattern in which they - appear. The algebra operators to perform filtering are added to the group after - translation of each group element. We collect the filters together here and remove them - from group, then apply them to the whole translated group - graph pattern.

-

In this step, we also translate graph patterns within FILTER expressions - EXISTS and - NOT EXISTS.

- -
-Let FS := empty set
-For each form FILTER(expr) in the group graph pattern
-    In expr, replace NOT EXISTS{P} with fn:not(exists(translate(P))) 
-    In expr, replace EXISTS{P} with exists(translate(P))
-    FS := FS ∪ {expr}
-    End
-
-

The set of filter expressions FS is used - later.

-
Translate Property Path Expressions

The following table gives the translation @@ -9137,15 +9115,18 @@

Translate Graph Patterns
If the form is GRAPH Var GroupGraphPattern The result is Graph(Var, Translate(GroupGraphPattern)) -
-

If the form is GroupGraphPattern:

+

If the form is GroupGraphPattern with child P:

+
+
The result is Translate(P).
+
+

If the form is GroupGraphPatternSub:

-Let FS := the empty set
+Let FS := the empty sequence
 Let G := the empty pattern, a basic graph pattern which is the empty set.
 
-For each element E in the sequence of elements in the GroupGraphPattern
+For each element E in the sequence of elements that are the GroupGraphPattern's TriplesBlock children and the children of its other children, in order:
 
     If E is of the form OPTIONAL{P} 
         Let A := Translate(P)
@@ -9160,6 +9141,12 @@ 
Translate Graph Patterns
G := Minus(G, Translate(P)) End + If E is of the form FILTER(expr) + In expr, replace NOT EXISTS{P} with fn:not(exists(translate(P))) + In expr, replace EXISTS{P} with exists(translate(P)) + FS := FS + expr + End + If E is of the form BIND(expr AS var) G := Extend(G, var, expr) End @@ -9171,6 +9158,11 @@
Translate Graph Patterns
End +If FS is not empty + Let X := Conjunction of expressions in FS + G := Filter(X, G) + End + The result is G.
@@ -9190,17 +9182,6 @@
Translate Graph Patterns
The result is ToMultiset(Translate(SubSelect))
-
-
Filters of Group
-

After the group has been translated, the filter expressions are added so they wil - apply to the whole of the rest of the group:

-
-If FS is not empty
-    Let G := output of preceding step
-    Let X := Conjunction of expressions in FS
-    G := Filter(X, G)
-End
-
Simplification step

Some groups of one graph pattern become join(Z, A), where Z is the empty