merged
authorStian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk>
Tue, 10 Jul 2012 16:30:39 +0100
changeset 3894 6fa4d54d5e61
parent 3893 d7c79463491d (current diff)
parent 3891 81ce31d1cae8 (diff)
child 3895 df4c869c3fe8
merged
--- a/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Attribution.ttl	Tue Jul 10 16:30:20 2012 +0100
+++ b/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Attribution.ttl	Tue Jul 10 16:30:39 2012 +0100
@@ -2,6 +2,7 @@
 @prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
 @prefix owl:  <http://www.w3.org/2002/07/owl#> .
 @prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex:   <http://example.com/vocab#> .
 @prefix :     <http://example.com/> .
 
 <http://dbpedia.org/resource/Fallingwater>
@@ -12,17 +13,17 @@
    prov:qualifiedAttribution [
       a prov:Attribution;
       prov:agent <http://dbpedia.org/resource/Edgar_J._Kaufmann>;
-      prov:hadRole :owner;
+      ex:hadRole :owner;
    ];
    prov:qualifiedAttribution [
       a prov:Attribution;
       prov:agent <http://dbpedia.org/resource/Frank_Lloyd_Wright>;
-      prov:hadRole :architect;
+      ex:hadRole :architect;
    ];
    prov:qualifiedAttribution [
       a prov:Attribution;
       prov:agent :western-Pennsylvania-Conservancy;
-      prov:hadRole :conserver;
+      ex:hadRole :conserver;
    ];
 .
 
--- a/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Communication.ttl	Tue Jul 10 16:30:20 2012 +0100
+++ b/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Communication.ttl	Tue Jul 10 16:30:39 2012 +0100
@@ -2,6 +2,7 @@
 @prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
 @prefix owl:  <http://www.w3.org/2002/07/owl#> .
 @prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex:   <http://example.com/vocab#> .
 @prefix :     <http://example.com/> .
 
 :writing-celebrity-gossip 
@@ -13,14 +14,7 @@
 :informing-the-journalist 
    a prov:Communication;
    prov:activity   :voicemail-interception;
-   prov:atLocation :unknown-location;
-   rdfs:comment    """The journalist was informed by the private 
-                      investigator, but we don't know how or what he was told."""@en;
+   ex:mediaType "email";
 .
 
 :voicemail-interception a prov:Activity .
-
-:unknown-location 
-   a prov:Location;
-   rdfs:label "Location unknown"@en;
-.
--- a/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Delegation.ttl	Tue Jul 10 16:30:20 2012 +0100
+++ b/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Delegation.ttl	Tue Jul 10 16:30:39 2012 +0100
@@ -2,10 +2,11 @@
 @prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
 @prefix owl:  <http://www.w3.org/2002/07/owl#> .
 @prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex:   <http://example.com/vocab#> .
 @prefix :     <http://example.com/> .
   
 :policySale
-   a prov:Actvity;
+   a prov:Activity;
    prov:wasAssociatedWith :insuranceAgent_Frank;
 .
 
@@ -14,7 +15,7 @@
    prov:actedOnBehalfOf :insuranceCompany_A;
    prov:qualifiedDelegation [
       a prov:Delegation;
-      prov:agent   :insuranceCompany_A;
-      prov:hadRole :guarantor; # The company is the guarantor of the policy
+      prov:agent        :insuranceCompany_A;
+      ex:rewardScheme   "commission";
    ];
 .
--- a/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Quotation.ttl	Tue Jul 10 16:30:20 2012 +0100
+++ b/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Quotation.ttl	Tue Jul 10 16:30:39 2012 +0100
@@ -2,20 +2,25 @@
 @prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
 @prefix owl:  <http://www.w3.org/2002/07/owl#> .
 @prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex:   <http://example.com/vocab#> .
 @prefix :     <http://example.com/> .
 
-:bl-dagstuhl
+:dagstuhl-quote
    a prov:Entity;
+   prov:value         "why would people record and share provenance in the first place?";
    prov:wasQuotedFrom <http://thinklinks.wordpress.com/2012/03/07/thoughts-from-the-dagstuhl-principles-of-provenance-workshop/>;
    prov:qualifiedQuotation [
       a prov:Quotation;
-      prov:entity    <http://thinklinks.wordpress.com/2012/03/07/thoughts-from-the-dagstuhl-principles-of-provenance-workshop/>;
-      prov:hadQuoter <http://data.semanticweb.org/person/luc-moreau>;
-      prov:hadQuoted <http://data.semanticweb.org/person/paul-groth>;
-   ] .
+      prov:entity     <http://thinklinks.wordpress.com/2012/03/07/thoughts-from-the-dagstuhl-principles-of-provenance-workshop/>;
+      ex:fromSection 2;
+   ];
+   prov:wasAttributedTo <http://data.semanticweb.org/person/luc-moreau>;
+.
 
 <http://thinklinks.wordpress.com/2012/03/07/thoughts-from-the-dagstuhl-principles-of-provenance-workshop/> 
-   a prov:Entity .
+   a prov:Entity;
+   prov:wasAttributedTo <http://data.semanticweb.org/person/paul-groth>;
+.
 
 <http://data.semanticweb.org/person/luc-moreau> a prov:Person, prov:Agent .
 <http://data.semanticweb.org/person/paul-groth> a prov:Person, prov:Agent .
--- a/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Revision.ttl	Tue Jul 10 16:30:20 2012 +0100
+++ b/examples/eg-24-prov-o-html-examples/rdf/create/rdf/class_Revision.ttl	Tue Jul 10 16:30:39 2012 +0100
@@ -2,6 +2,7 @@
 @prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
 @prefix owl:  <http://www.w3.org/2002/07/owl#> .
 @prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex:   <http://example.com/vocab#> .
 @prefix :     <http://example.com/> .
 
 :draft2 
@@ -10,18 +11,19 @@
    prov:qualifiedRevision [
       a prov:Revision;
       prov:entity        :draft1;
+      ex:peerReviewed     false;
    ];
 
-   prov:wasAttributedTo :edward;
+   prov:wasAssociatedWith :edward;
    prov:qualifiedAssociation [
       a prov:Association;
-      prov:agent        :edward;
-      prov:hadRole      :editor;
+      prov:agent          :edward;
+      prov:hadRole        :editor;
    ];
 .
 
 :draft1 a prov:Entity .
 
 :edward 
-   a prov:Person, prov:Agent, prov:Entity;
+   a prov:Person, prov:Agent;
 .
--- a/examples/eg-24-prov-o-html-examples/rdf/create/rdf/property_hadGeneration.ttl	Tue Jul 10 16:30:20 2012 +0100
+++ b/examples/eg-24-prov-o-html-examples/rdf/create/rdf/property_hadGeneration.ttl	Tue Jul 10 16:30:39 2012 +0100
@@ -5,9 +5,10 @@
 @prefix :     <http://example.com/> .
 
 :bar_chart   
-   prov:wasDerivedFrom :aggregatedByRegions;
+   prov:wasDerivedFrom   :aggregatedByRegions;
    prov:qualifiedDerivation [
       a prov:Derivation;
+      prov:entity        :aggregatedByRegions;
       prov:hadGeneration :illustration;
    ];
 .
--- a/examples/eg-24-prov-o-html-examples/rdf/create/rdf/property_qualifiedAttribution.ttl	Tue Jul 10 16:30:20 2012 +0100
+++ b/examples/eg-24-prov-o-html-examples/rdf/create/rdf/property_qualifiedAttribution.ttl	Tue Jul 10 16:30:39 2012 +0100
@@ -2,6 +2,7 @@
 @prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
 @prefix owl:  <http://www.w3.org/2002/07/owl#> .
 @prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex:   <http://example.com/vocab#> .
 @prefix :     <http://example.com/> .
 
 ## When the role of the agent is not known or does not matter:
@@ -19,9 +20,7 @@
    a prov:Entity;
    prov:qualifedAttribution [
       a prov:Attribution;
-      prov:agent   :civil_action_group;
-      prov:hadRole :owner;
+      prov:agent :civil_action_group;
+      ex:hadRole :owner;
    ]
 .
-
-:owner a prov:Role .
--- a/examples/eg-24-prov-o-html-examples/rdf/create/rdf/property_qualifiedDelegation.ttl	Tue Jul 10 16:30:20 2012 +0100
+++ b/examples/eg-24-prov-o-html-examples/rdf/create/rdf/property_qualifiedDelegation.ttl	Tue Jul 10 16:30:39 2012 +0100
@@ -2,6 +2,7 @@
 @prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
 @prefix owl:  <http://www.w3.org/2002/07/owl#> .
 @prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex:   <http://example.com/vocab#> .
 @prefix :     <http://example.com/> .
 
 :traffic-stop
@@ -10,13 +11,13 @@
                           :traffic-officer-34;
    prov:qualifiedAssociation [
       a prov:Association;
-      prov:agent   :chauffeur;
-      prov:hadRole :violator; # The chauffeur was the one violating traffic rules.
+      prov:agent :chauffeur;
+      ex:hadRole :violator; # The chauffeur was the one violating traffic rules.
    ];
    prov:qualifiedAssociation [
       a prov:Association;
-      prov:agent   :traffic-officer-34;
-      prov:hadRole :enforcer; # The officer was the one enforcing the traffic rules.
+      prov:agent :traffic-officer-34;
+      ex:hadRole :enforcer; # The officer was the one enforcing the traffic rules.
    ];
 .
 
@@ -25,8 +26,8 @@
    prov:actedOnBehalfOf :celebrity-in-car;
    prov:qualifiedDelegation [
       a prov:Delegation;
-      prov:agent   :celebrity-in-car;
-      prov:hadRole :employer; # The celebrity employed the chauffeur during the enforcement.
+      prov:agent :celebrity-in-car;
+      ex:hadRole :employer; # The celebrity employed the chauffeur during the enforcement.
    ];
 .
 
@@ -35,7 +36,7 @@
    prov:actedOnBehalfOf :city-of-Paris;
    prov:qualifiedDelegation [
       a prov:Delegation;
-      prov:agent   :city-of-Paris;
-      prov:hadRole :employer; # The city of Paris employed the officer during the enforcement.
+      prov:agent :city-of-Paris;
+      ex:hadRole :employer; # The city of Paris employed the officer during the enforcement.
    ];
 .
--- a/model/comments/issue-438-stian.txt	Tue Jul 10 16:30:20 2012 +0100
+++ b/model/comments/issue-438-stian.txt	Tue Jul 10 16:30:39 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 16:30:20 2012 +0100
+++ b/model/prov-n.html	Tue Jul 10 16:30:39 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">