issue-438
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Tue, 10 Jul 2012 16:19:30 +0100
changeset 3891 81ce31d1cae8
parent 3890 f4d75343a6fd
child 3894 6fa4d54d5e61
issue-438
model/comments/issue-438-stian.txt
model/prov-n.html
--- a/model/comments/issue-438-stian.txt	Tue Jul 10 11:12:09 2012 -0400
+++ b/model/comments/issue-438-stian.txt	Tue Jul 10 16:19:30 2012 +0100
@@ -8,9 +8,21 @@
    > Of my comments below, the following SHOULD be addressed before
    > publishing as Last Call draft:
    > * introduce "nonterminal"
+
+Section 2.2 introduces it, and was all reformatted.
+
    > * fix syntax errors
    > * memberOf -> hasMember
+
+hadMembers is now defined.
+
    > * clarify/remote  % encoding in local part of QUALIFIED_NAME
+
+Section 3.7.1 rewritten.
+In short:
+- %-encoding used as per IRI spec
+- new \-encoding captured by PN_CHARS_ESC
+
    > * clarifications about namespace scoping/overwrite
    > 
    > Given a minimum of the above are addressed, then yes, the document can
@@ -421,6 +433,9 @@
    > > > 3.7.2 Attribute
    > > > The reserved attributes in the PROV namespace are the following.
    > add "Their meaning is explained by [PROV-DM]".
+
+DONE.
+
    > 
    > 
    > 	<INT_LITERAL>	   ::=   	("-")? (DIGIT)+
@@ -470,7 +485,7 @@
    > equivalences.
 
 
-TODO: revisit example 33, and make the conveninence notation clearer.
+Done, added an example to make the convenience notation clearer.
 
    > 
    > 
@@ -480,6 +495,8 @@
    > Add "Their meaning is defined by [PROV-DM].
    > 
    > 
+
+DONE
    > 
    > 
    > 
@@ -580,6 +597,9 @@
    > in the first place, if still only a selection of possibly local names
    > (given a general prefix) is valid - I think it just adds potential
    > complexity.
+
+This is issue is now solved by the \-escape mechanism in PN_CHARS_ESC.
+
    > 
    > Of course the reason why this happens is because we don't have a
    > <URIREF> syntax allowed together with QUALIFIED_NAME - so the Sparql
@@ -638,6 +658,10 @@
    > namespaceDeclarations is optional in both bundle and namedBundle - but
    > "prefix" is not a valid expression, and can thus I don't see any
    > conflict here.
+
+
+Text has been rewritten to make it clear the potential conflict is for the tokenizer.
+
    > 
    > 
    > 
@@ -654,7 +678,8 @@
 
 Added:
 
-<p>A PROV-N document MUST not re-declare the same prefix.</p>
+
+A set of namespace declarations namespaceDeclarations MUST NOT re-declare the same prefix.
 
    > 
    > 
--- a/model/prov-n.html	Tue Jul 10 11:12:09 2012 -0400
+++ b/model/prov-n.html	Tue Jul 10 16:19:30 2012 +0100
@@ -1764,22 +1764,32 @@
 <section id="component4"> 
 <h3>Component 4: Bundles</h3>
 
-<section id="expression-bundle-declaration"> 
-<h4>Bundle Declaration</h4>
+<section id="expression-bundle-constructor"> 
+<h4>Bundle Constructor</h4>
 
 <table class="grammar">
 <tbody class="grammar-ref" data-ref="prod-namedBundle"></tbody>
 </table>
 
+<p>Named bundles cannot be nested because <a class="grammarRef" href="#prod-namedBundle">namedBundle</a> is not an <a class="grammarRef" href="#prod-expression">expression</a>, and therefore cannot occurs inside another <a class="grammarRef" href="#prod-namedBundle">namedBundle</a>.</p>
+
+<p>Named bundles are self-contained: each identifier occuring in a named bundle, including the bundle identifier itself, MUST be interpreted with respect to the namespace declarations of that bundle. In other words, for every identifier with a prefix <code>p</code> within a named bundle, there MUST be a namespace declaration for <code>p</code> in this named bundled; for every identifier  without prefix, there MUST be a default namespace declaration  in this named bundled.</p>
+
 <div class="anexample">
     <pre class="codeexample">
 bundle ex:author-view
+  prefix ex  &lt;http://example.org/&gt;
   agent(ex:Paolo,   [ prov:type='prov:Person' ])
   agent(ex:Simon,   [ prov:type='prov:Person' ])
   ...
 endBundle
   </pre>
-<p> Here  <span class="name">ex:author-view</span> is the name of the bundle.
+<p> Here  <span class="name">ex:author-view</span> is the name of the bundle. 
+</p>
+
+
+
+
 </div>
 
 </section>
@@ -2292,7 +2302,9 @@
 </table>
 
 
-<p>The  reserved attributes in the PROV namespace are the following.</p>
+<p>The  reserved attributes in the PROV namespace are the following.
+Their meaning is explained by [[PROV-DM]] (see <a href="http://www.w3.org/TR/prov-dm/#term-attribute">Section 5.7.2: Attribute</a>).
+</p>
 
 <ol>
 <li>  <span class="name">prov:label</span>
@@ -2360,6 +2372,32 @@
 <code class="content"><a class="grammarRef" href="#prod-INT_LITERAL">INT_LITERAL</a></code>. 
 </p>
 
+<div class="anexample" id="anexample-convenience">
+<p>
+The following examples illustrate convenience notations.</p>
+
+<p>The two following expressions are strings; if <code class="content"><a class="grammarRef" href="#prod-datatype">datatype</a></code> is not specified, it is <code>xsd:string</code>.</p>
+<pre class="codeexample">
+  "abc" %% xsd:string
+  "abc"
+</pre>
+
+
+<p>The two following expressions are integers. For convenience, numbers, expressed as digits optionally preceded by a minus sign, can occur without quotes.</p>
+<pre class="codeexample">
+  "1234" %% xsd:integer
+  1234
+  "-1234" %% xsd:integer
+  -1234
+</pre>
+
+<p>The two following expressions are qualified names. Values of type qualified name can be conveniently expressed within single quotes.</p>
+<pre class="codeexample">
+  "ex:value" %% prov:QUALIFIED_NAME
+  'ex:value'
+</pre>
+</div>
+
 <div class="anexample" id="anexample-value">
 <p>
 The following examples respectively are the string "abc", the string (in French) "bonjour", the integer number 1, and the IRI "http://example.org/foo".
@@ -2369,17 +2407,6 @@
   "1" %% xsd:integer
   "http://example.org/foo" %% xsd:anyURI
 </pre>
-<p>The following example shows a value of type <span class="name">prov:QUALIFIED_NAME</span> (see
-<span class="name"><a href="#prod-QUALIFIED_NAME">prov:QUALIFIED_NAME</a></span>).
-The prefix <span class="name">ex</span>  MUST be bound to a <a>namespace</a> declared in a <a>namespace declaration</a>.</p>
-<pre class="codeexample"> 
-  "ex:value" %% prov:QUALIFIED_NAME
-</pre>
-Alternatively, the same value can be expressed using the following convenience notation.
-<pre class="codeexample"> 
-  'ex:value'
-</pre>
-
 </div>
 
 
@@ -2387,7 +2414,9 @@
 <section id="expression-types">
 <h4>Reserved Type Values</h4>
 
-<p>The  reserved type values in the PROV namespace are the following.</p>
+<p>The  reserved type values in the PROV namespace are the following.
+Their meaning is defined [[PROV-DM]] (see <a href="http://www.w3.org/TR/prov-dm/#term-attribute-type">Section 5.7.2.4: prov:type</a>).
+</p>
 
 <ol>
 <li>  <span class="name">prov:Bundle</span>
@@ -2457,17 +2486,20 @@
 
 </table>
 
-<p>A <a class="grammarRef" href="#prod-namespaceDeclaration">namespaceDeclaration</a> consists of a binding between a prefix and a namespace. Every qualified name with this prefix in the scope of this declaration refers to this namespace. The scope of a namespace declaration is the <a class="grammarRef" href="#prod-namedBundle">namedBundle</a> or <a class="grammarRef" href="#prod-bundle">toplevel bundle</a> in which it directly occurs.</p>
-
-<p>A PROV-N document MUST not re-declare the same prefix.</p>
-
-<p>In PROV-N, the following prefixes are reserved:
+<p>A <a class="grammarRef" href="#prod-namespaceDeclaration">namespaceDeclaration</a> consists of a binding between a prefix and a namespace. Every qualified name with this prefix in the scope of this declaration refers to this namespace.
+A <a class="grammarRef" href="#prod-defaultNamespaceDeclaration">defaultNamespaceDeclaration</a> consists of a namespace. Every qualified name without prefix in the scope of this declaration refers to this namespace. Scope of a declaration is specified as follows:</p>
 <ul>
-<li>  <span class="name">prov</span>  denotes the PROV namespace with URI <span class="name">http://www.w3.org/ns/prov#</span></li>
-<li>  <span class="name">xsd</span> denotes the XML Schema namespace with URI  <span class="name">http://www.w3.org/2001/XMLSchema#</span>.
-</li>
+<li> 
+The scope of a namespace declaration directly occurring in a <a class="grammarRef" href="#prod-namedBundle">namedBundle</a> is the <a class="grammarRef" href="#prod-namedBundle">namedBundle</a> itself;</li>
+<li>
+the scope of a namespace declaration directly occurring in a <a class="grammarRef" href="#prod-bundle">toplevel bundle</a> is the <a class="grammarRef" href="#prod-bundle">toplevel bundle</a> itself, except and <a class="grammarRef" href="#prod-namedBundle">namedBundle</a> it may contain.</li>
 </ul>
-<p>A PROV-N document MUST NOT redeclare prefixes <span class="name">prov</span> and <span class="name">xsd</span>.</p>
+
+<p>A set of namespace declarations <a class="grammarRef" href="#prod-namespaceDeclarations">namespaceDeclarations</a> MUST NOT re-declare the same prefix.</p>
+
+<p>A namespace declaration <a class="grammarRef" href="#prod-namespaceDeclaration">namespaceDeclaration</a> MUST NOT declare prefixes <span class="name">prov</span> and <span class="name">xsd</span>  (see <a href="#namespace-table">Table 1</a> for their IRI).</p>
+
+
 
 <div class="anexample" id="anexample-namespace">
 <p>The following example declares three namespaces, one default, and two with explicit prefixes <span class="name">ex1</span> and <span class="name">ex2</span>.</p>
@@ -2482,6 +2514,27 @@
 </div>
 
 
+<div class="anexample" id="anexample-namespace-scope">
+<p>In the following example, a toplevel bundle declares a default namespace and the occurrence of
+<code>e001</code> directly occurring in the toplevel bundle refers to that namespace.
+A nested named bundle also declares a default namespace, but with a different IRI.
+In that named bundle, the occurrences of
+<code>e001</code>, including for the bundle name, refer to the latest default namespace.</p>
+<pre class="codeexample">
+bundle
+  default &lt;http://example.org/1/&gt;
+  entity(e001)                             // IRI: http://example.org/1/e001
+
+  bundle e001                              // IRI: http://example.org/2/e001
+    default &lt;http://example.org/2/&gt;
+    entity(e001)                           // IRI: http://example.org/2/e001
+  endBundle
+endBundle
+</pre>
+</div>
+
+
+
 
 </section>
 
@@ -2508,6 +2561,8 @@
 <p> Given its status of house keeping construct for the purpose of exchanging provenance expressions,  a toplevel bundle is not defined as a PROV-N expression (production <code class="content"><a class="grammarRef" href="#prod-expression">expression</a></code>).</p> 
 
 
+
+
 <p>A toplevel bundle, written <span class="name">bundle decls exprs bundles endBundle</span> in PROV-N, contains:
 <ul>
 <li><em>namespaceDeclarations</em>: a set <span class="name">decls</span> of namespace declarations, declaring namespaces and associated prefixes, which can be used in <a
@@ -2523,6 +2578,10 @@
 <tbody class="grammar-ref" data-ref="prod-bundle"></tbody>
 </table>
 
+<p>Thus, named bundles can occur inside a toplevel bundle. 
+Named bundles are self-contained: each identifier occuring in a named bundle, including the bundle identifier itself, MUST be interpreted with respect to the namespace declarations of that named bundle. In other words, named bundles do not inherit namespaces declarations from the toplevel bundle.
+</p>
+
 
 
 <div class="anexample">