--- a/trig/index.html Mon Sep 02 15:58:56 2013 +0100
+++ b/trig/index.html Mon Sep 02 21:20:39 2013 +0100
@@ -203,13 +203,13 @@
<p>A RDF Dataset may contain only a single graph.</p>
<pre class="example">
<script type="application/trig"># This document encodes one graph.
-@prefix ex: <http://www.example.org/vocabulary#> .
-@prefix : <http://www.example.org/exampleDocument#> .
+@prefix ex: <http://www.example.org/vocabulary#> .
+@prefix : <http://www.example.org/exampleDocument#> .
:G1 { :Monica a ex:Person ;
ex:name "Monica Murphy" ;
- ex:homepage <http://www.monicamurphy.org> ;
- ex:email <mailto:monica@monicamurphy.org> ;
+ ex:homepage <http://www.monicamurphy.org> ;
+ ex:email <mailto:monica@monicamurphy.org> ;
ex:hasSkill ex:Management ,
ex:Programming . }
</script>
@@ -218,27 +218,27 @@
<pre class="example">
<script type="application/trig"># This document contains a default graph and two named graphs.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix dc: <http://purl.org/dc/terms/> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix dc: <http://purl.org/dc/terms/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
# default graph
{
- <http://example.org/bob> dc:publisher "Bob" .
- <http://example.org/alice> dc:publisher "Alice" .
+ <http://example.org/bob> dc:publisher "Bob" .
+ <http://example.org/alice> dc:publisher "Alice" .
}
-<http://example.org/bob>
+<http://example.org/bob>
{
_:a foaf:name "Bob" .
- _:a foaf:mbox <mailto:bob@oldcorp.example.org> .
+ _:a foaf:mbox <mailto:bob@oldcorp.example.org> .
_:a foaf:knows _:b .
}
-<http://example.org/alice>
+<http://example.org/alice>
{
_:b foaf:name "Alice" .
- _:b foaf:mbox <mailto:alice@work.example.org> .
+ _:b foaf:mbox <mailto:alice@work.example.org> .
} </script>
</pre>
@@ -250,27 +250,27 @@
<script type="application/trig"># This document contains a same data as the
previous example.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix dc: <http://purl.org/dc/terms/> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix dc: <http://purl.org/dc/terms/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
# default graph - no {} used.
-<http://example.org/bob> dc:publisher "Bob" .
-<http://example.org/alice> dc:publisher "Alice" .
+<http://example.org/bob> dc:publisher "Bob" .
+<http://example.org/alice> dc:publisher "Alice" .
# GRAPH keyword to highlight a named graph
# Abbreviation of triples using ;
-GRAPH <http://example.org/bob>
+GRAPH <http://example.org/bob>
{
[] foaf:name "Bob" ;
- foaf:mbox <mailto:bob@oldcorp.example.org> ;
+ foaf:mbox <mailto:bob@oldcorp.example.org> ;
foaf:knows _:b .
}
-GRAPH <http://example.org/alice>
+GRAPH <http://example.org/alice>
{
_:b foaf:name "Alice" ;
- foaf:mbox <mailto:alice@work.example.org>
+ foaf:mbox <mailto:alice@work.example.org>
}</script>
</pre>
@@ -737,26 +737,12 @@
triples produced during parsing. If undefined, the default
graph is used.</p>
- <p>The following grammar production clauses set <code
-class="curGraph">curGraph</code>:</p>
- <ul>
- <li>
- The grammar production clause starting <tt>"GRAPH"</tt> in
- rule <tt><a href="#grammar-production-block">block</a></tt>.
- <code class="curGraph">curGraph</code> is set to
- the RDF term matched by <tt>(iri | BlankNode)</tt> in that
- grammar clause.
- </li>
-
- <li>
- The gramamr production clause <tt>(iri | BlankNode) wrappedGraph</tt>
- in rule
- <tt><a href="#grammar-production-triplesOrGraph">triplesOrGraph</a></tt>.
- <code class="curGraph">curGraph</code> is set to
- the RDF term matched by <tt>(iri | BlankNode)</tt> in that
- grammar clause.
- </li>
- </ul>
+ <p>The rule
+ <tt><a href="#grammar-production-labelOrSubject">labelOrSubject</a></tt>
+ sets both <code class="curGraph">curGraph</code>.
+ and <code class="curSubject">curSubject</code>
+ (only one of these will be used).
+ </p>
<p>The following grammar production clauses set
<code class="curGraph">curGraph</code> to be undefined, indicating the default
@@ -767,21 +753,27 @@
The grammar production clause <tt>wrappedGraph</tt> in rule <tt><a href="#grammar-production-block">block</a></tt>.
</li>
<li>
- The grammar production
- <tt>(iri | BlankNode) predicateObjectList '.'</tt>
- in rule <tt><a href="#grammar-production-triplesOrGraph">triplesOrGraph</a></tt>.
- </li>
-
- <li>
The grammar production in rule
<tt><a href="#grammar-production-triples2">triples2</a></tt>.
</li>
+ </ul>
+
+ <p>
+ The grammar production
+ <tt>labelOrSubject predicateObjectList '.'</tt>
+ unsets
+ <code class="curGraph">curGraph</code>
+ before handling <tt>predicateObjectLists</tt>
+ in rule <tt><a href="#grammar-production-triplesOrGraph">triplesOrGraph</a></tt>.
+ </li>
+
</section>
<section>
<h4>Triple Output</h4>
<p>
Each RDF triple produced is added to <code class="curGraph">curGraph</code>,
- or the default graph if <code class="curGraph">curGraph</code> is not set at that
+ or the default graph if <code class="curGraph">curGraph</code>
+ is not set at that
point in the parsing process.
</p>
<p>
--- a/trig/trig-bnf.html Mon Sep 02 15:58:56 2013 +0100
+++ b/trig/trig-bnf.html Mon Sep 02 21:20:39 2013 +0100
@@ -6,17 +6,17 @@
<td>::=</td>
<td>(<a href='#grammar-production-directive'>directive</a> <code>| </code> <a href='#grammar-production-block'>block</a>)<code class='grammar-star'>*</code></td>
</tr>
- <tr id="grammar-production-block" data-grammar-original="[2g] block ::= triplesOrGraph| wrappedGraph| triples2| "GRAPH" ( iri | BlankNode ) wrappedGraph" data-grammar-expression="('|', [('id', 'triplesOrGraph'), ('id', 'wrappedGraph'), ('id', 'triples2'), (',', [("'", 'GRAPH'), ('|', [('id', 'iri'), ('id', 'BlankNode')]), ('id', 'wrappedGraph')])])" >
+ <tr id="grammar-production-block" data-grammar-original="[2g] block ::= triplesOrGraph| wrappedGraph| triples2| "GRAPH" labelOrSubject wrappedGraph" data-grammar-expression="('|', [('id', 'triplesOrGraph'), ('id', 'wrappedGraph'), ('id', 'triples2'), (',', [("'", 'GRAPH'), ('id', 'labelOrSubject'), ('id', 'wrappedGraph')])])" >
<td>[2g]</td>
<td><code>block</code></td>
<td>::=</td>
- <td><a href='#grammar-production-triplesOrGraph'>triplesOrGraph</a> <code>|<br/> </code> <a href='#grammar-production-wrappedGraph'>wrappedGraph</a> <code>|<br/> </code> <a href='#grammar-production-triples2'>triples2</a> <code>|<br/> </code> "<code class='grammar-literal'>GRAPH</code>" (<a href='#grammar-production-iri'>iri</a> <code>| </code> <a href='#grammar-production-BlankNode'>BlankNode</a>) <a href='#grammar-production-wrappedGraph'>wrappedGraph</a></td>
+ <td><a href='#grammar-production-triplesOrGraph'>triplesOrGraph</a> <code>| </code> <a href='#grammar-production-wrappedGraph'>wrappedGraph</a> <code>| </code> <a href='#grammar-production-triples2'>triples2</a> <code>| </code> "<code class='grammar-literal'>GRAPH</code>" <a href='#grammar-production-labelOrSubject'>labelOrSubject</a> <a href='#grammar-production-wrappedGraph'>wrappedGraph</a></td>
</tr>
- <tr id="grammar-production-triplesOrGraph" data-grammar-original="[3g] triplesOrGraph ::=( iri | BlankNode ) ( wrappedGraph | predicateObjectList '.' )" data-grammar-expression="(',', [('|', [('id', 'iri'), ('id', 'BlankNode')]), ('|', [('id', 'wrappedGraph'), (',', [('id', 'predicateObjectList'), ("'", '.')])])])" >
+ <tr id="grammar-production-triplesOrGraph" data-grammar-original="[3g] triplesOrGraph ::=labelOrSubject ( wrappedGraph | predicateObjectList '.' )" data-grammar-expression="(',', [('id', 'labelOrSubject'), ('|', [('id', 'wrappedGraph'), (',', [('id', 'predicateObjectList'), ("'", '.')])])])" >
<td>[3g]</td>
<td><code>triplesOrGraph</code></td>
<td>::=</td>
- <td>(<a href='#grammar-production-iri'>iri</a> <code>| </code> <a href='#grammar-production-BlankNode'>BlankNode</a>) (<a href='#grammar-production-wrappedGraph'>wrappedGraph</a> <code>| </code> <a href='#grammar-production-predicateObjectList'>predicateObjectList</a> '<code class='grammar-literal'>.</code>')</td>
+ <td><a href='#grammar-production-labelOrSubject'>labelOrSubject</a> (<a href='#grammar-production-wrappedGraph'>wrappedGraph</a> <code>| </code> <a href='#grammar-production-predicateObjectList'>predicateObjectList</a> '<code class='grammar-literal'>.</code>')</td>
</tr>
<tr id="grammar-production-triples2" data-grammar-original="[4g] triples2 ::=( blankNodePropertyList | collection ) predicateObjectList? '.'" data-grammar-expression="(',', [('|', [('id', 'blankNodePropertyList'), ('id', 'collection')]), ('?', ('id', 'predicateObjectList')), ("'", '.')])" >
<td>[4g]</td>
@@ -36,6 +36,12 @@
<td>::=</td>
<td><a href='#grammar-production-triples'>triples</a> ('<code class='grammar-literal'>.</code>' <a href='#grammar-production-triplesBlock'>triplesBlock</a>?)?</td>
</tr>
+ <tr id="grammar-production-labelOrSubject" data-grammar-original="[7g] labelOrSubject ::=( iri | BlankNode )" data-grammar-expression="('|', [('id', 'iri'), ('id', 'BlankNode')])" >
+ <td>[7g]</td>
+ <td><code>labelOrSubject</code></td>
+ <td>::=</td>
+ <td><a href='#grammar-production-iri'>iri</a> <code>| </code> <a href='#grammar-production-BlankNode'>BlankNode</a></td>
+</tr>
<tr id="grammar-production-directive" data-grammar-original="[3] directive ::= prefixID| base | sparqlPrefix | sparqlBase" data-grammar-expression="('|', [('id', 'prefixID'), ('id', 'base'), ('id', 'sparqlPrefix'), ('id', 'sparqlBase')])" >
<td>[3]</td>
<td><code>directive</code></td>