definition of qualified name in prov-n
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Fri, 11 May 2012 09:40:50 +0100
changeset 2763 ce37d930ecd1
parent 2762 1896f153d4fc
child 2764 9b7a997712a5
definition of qualified name in prov-n
model/extra.css
model/prov-n.html
--- a/model/extra.css	Fri May 11 00:41:37 2012 +0100
+++ b/model/extra.css	Fri May 11 09:40:50 2012 +0100
@@ -424,3 +424,8 @@
     content:    "Structural constraint: ";
     font-weight:    bold;
 }
+
+
+code {
+    color:  black;
+}
--- a/model/prov-n.html	Fri May 11 00:41:37 2012 +0100
+++ b/model/prov-n.html	Fri May 11 09:40:50 2012 +0100
@@ -1627,7 +1627,7 @@
  refers to the <a title="default namespace declaration">default namespace</a>.</p>
 
 <div class='grammar'>
-<span class="nonterminal">identifier</span>&nbsp;::=  <span class="nonterminal">qualifiedName</span><br/>
+<span class="nonterminal">identifier</span>&nbsp;::=  <span class="nonterminal">QUALNAME</span><br/>
 <span class="nonterminal">eIdentifier</span>&nbsp;::=  <span class="nonterminal">identifier</span>  <em>(intended to denote an entity)</em><br/>
 <span class="nonterminal">aIdentifier</span>&nbsp;::=  <span class="nonterminal">identifier</span>  <em>(intended to denote an activity)</em><br/>
 <span class="nonterminal">agIdentifier</span>&nbsp;::=  <span class="nonterminal">identifier</span>  <em>(intended to denote an agent)</em><br/>
@@ -1635,20 +1635,86 @@
 <span class="nonterminal">uIdentifier</span>::=  <span class="nonterminal">identifier</span> <em>(intended to denote a usage)</em><br/>
 <span class="nonterminal">nIdentifier</span>::=  <span class="nonterminal">identifier</span> <em>(intended to denote a note)</em><br/>
 <span class="nonterminal">cIdentifier</span>::=  <span class="nonterminal">identifier</span> <em>(intended to denote a collection)</em><br/>
-<br/>
-<br/>
-<span class="nonterminal">qualifiedName</span> &nbsp;::= 
-<span class="optional">
-<span class="nonterminal">prefix</span> <span class="name">:</span>
-</span> <span class="nonterminal">localPart</span>  | <span class="name">:</span> <span class="nonterminal">localPart</span><br/>
-<span class="nonterminal">prefix</span> &nbsp;::= <em>a name without colon compatible with the <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NC_NAME</a> production [[!XML-NAMES]]</em><br/>
-<span class="nonterminal">localPart</span> &nbsp;::= <em>a name compatible with the
-<a href="http://www.w3.org/TR/rdfa-core/#P_reference">reference</a> production [[!RDFA-CORE]]</em>
 </div>
 
 
 
-<p>A PROV qualified name has a more permissive syntax then XML's <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-QName">QName</a> [[!XML-NAMES]] since it allows any syntax for its local part provided that the concatenation with the namespace results in a valid IRI [[!IRI]]. </p>
+<p>A PROV qualified name <a class="grammarRef" href="#term-prov_n_LL-QUALNAME">QUALNAME</a> has a more permissive syntax then XML's <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-QName">QName</a> [[!XML-NAMES]]
+and SPARQL <a href="http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115/#rPrefixedName">PrefixedName</a> [[!RDF-SPARQL-QUERY]]. It is a PROV requirement that the concatenation of the namespace with the local part results in a valid IRI [[!IRI]]. Given that 
+',' (comma),
+';' (semi-colon),
+'=' (equal),
+'(' (left bracket),
+')' (right bracket),
+'[' (left square bracket),
+']' (right square bracket) are used by the PROV notation as delimiters, they are not allowed in local parts. Instead, they can be %-escaped or incorporated in the IRI denoted by a prefix.
+</p>
+
+
+<p>Qualified names <a class="grammarRef" href="#term-prov_n_LL-QUALNAME">QUALNAME</a> consist of a prefix and a local part. Prefixes follow the production <a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_PREFIX">PN_PREFIX</a> defined by SPARQL [[!RDF-SPARQL-QUERY]]. Local parts have to be conformant with <a class="grammarRef" href="#term-prov_n_LL-PN_LOCAL">PN_LOCAL</a>, which extends the original SPARQL <a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_LOCAL">PN_LOCAL</a> definition by allowing further characters and %-escaped charaters (see <a class="grammarRef" href="#term-prov_n_LL-PN_CHARS_OTHERS">PN_CHARS_OTHERS</a>).</p>
+
+<table class="grammar">
+<tbody class="prod">
+<tr valign="baseline">
+<td><a id="prod-prov_n_LL-identifier" name="prod-prov_n_LL-identifier"></a>[<span class="prodNo">31</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><code class="production prod">identifier</code></td>
+<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+<td><code class="content"><span class="prod"><a class="grammarRef" href="#term-prov_n_LL-QUALNAME">QUALNAME</a></span></code></td>
+</tr>
+</tbody>
+<tbody class="term">
+<tr valign="baseline">
+<td><a id="term-prov_n_LL-QUALNAME" name="term-prov_n_LL-QUALNAME"></a>[<span class="prodNo">39</span>]&nbsp;&nbsp;&nbsp;</td>
+<td>&lt;<code class="production term">QUALNAME</code>&gt;</td>
+<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+<td><code class="content">( <span class="prod"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_PREFIX">PN_PREFIX</a></span> ":" )? <span class="prod"><a class="grammarRef" href="#term-prov_n_LL-PN_LOCAL">PN_LOCAL</a></span><br/>
+| <span class="prod"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_PREFIX">PN_PREFIX</a></span> ":"</code></td>
+</tr>
+</tbody>
+<tbody class="term">
+<tr valign="baseline">
+<td><a id="term-prov_n_LL-PN_LOCAL" name="term-prov_n_LL-PN_LOCAL"></a>[<span class="prodNo">57</span>]&nbsp;&nbsp;&nbsp;</td>
+<td>&lt;<code class="production term">PN_LOCAL</code>&gt;</td>
+<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+<td><code class="content">( <span class="prod"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_CHARS_U">PN_CHARS_U</a></span> | [0-9] | <span class="prod"><a class="grammarRef" href="#term-prov_n_LL-PN_CHARS_OTHERS">PN_CHARS_OTHERS</a></span> ) ( ( <span class="prod"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_CHARS">PN_CHARS</a></span> | "." | <span class="prod"><a class="grammarRef" href="#term-prov_n_LL-PN_CHARS_OTHERS">PN_CHARS_OTHERS</a></span> )* ( <span class="prod"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_CHARS">PN_CHARS</a></span> | <span class="prod"><a class="grammarRef" href="#term-prov_n_LL-PN_CHARS_OTHERS">PN_CHARS_OTHERS</a></span> ) )?</code></td>
+</tr>
+</tbody>
+<tbody class="term">
+<tr valign="baseline">
+<td><a id="term-prov_n_LL-PN_CHARS_OTHERS" name="term-prov_n_LL-PN_CHARS_OTHERS"></a>[<span class="prodNo">58</span>]&nbsp;&nbsp;&nbsp;</td>
+<td>&lt;<code class="production term">PN_CHARS_OTHERS</code>&gt;</td>
+<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+<td><code class="content"><span class="prod"><a class="grammarRef" href="#term-prov_n_LL-PERCENT">PERCENT</a></span><br/>
+| "/"<br/>
+| "@"<br/>
+| "~"<br/>
+| "&amp;"<br/>
+| "+"<br/>
+| "?"<br/>
+| "#"<br/>
+| "$"</code></td>
+</tr>
+</tbody>
+<tbody class="term">
+<tr valign="baseline">
+<td><a id="term-prov_n_LL-PERCENT" name="term-prov_n_LL-PERCENT"></a>[<span class="prodNo">59</span>]&nbsp;&nbsp;&nbsp;</td>
+<td>&lt;<code class="production term">PERCENT</code>&gt;</td>
+<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+<td><code class="content">"%" <span class="prod"><a class="grammarRef" href="#term-prov_n_LL-HEX">HEX</a></span> <span class="prod"><a class="grammarRef" href="#term-prov_n_LL-HEX">HEX</a></span></code></td>
+</tr>
+</tbody>
+
+<tbody class="term">
+<tr valign="baseline">
+<td><a id="term-prov_n_LL-HEX" name="term-prov_n_LL-HEX"></a>[<span class="prodNo">60</span>]&nbsp;&nbsp;&nbsp;</td>
+<td>&lt;<code class="production term">HEX</code>&gt;</td>
+<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
+<td><code class="content">[0-9]<br/>
+| [A-F]<br/>
+| [a-f]</code></td>
+</tr>
+</tbody>
+</table>
 
 <div class="anexample" id="anexample-qualified-name">
 <p>Examples of articles on the BBC Web site seen as  entities.</p>
@@ -1667,6 +1733,7 @@
 </pre>
 </div>
 
+
 <div class="anexample" id="anexample-qualified-name2">
 <p>Examples of entities with declared and default namespace.</p>
 <pre class="codeexample">
@@ -1684,13 +1751,11 @@
 </pre>
 </div>
 
+
 <p><b>Note:</b>The productions for <span class="nonterminal">qualifiedName</span> and <span class="nonterminal">prefix</span> are conflicting.  In the context of a <span class="nonterminal">namespaceDeclaration</span>, a parser should give precedence to the production for <span class="nonterminal">prefix</span>.
 </p>
 
 
-<div class="note">We need to explicitly disallow '<span class="name">-</span>' as first and only character of local part. Instead, it should be encoded as <span class="name">pct-encoded</span> [[!RFC3987]].
-</div>
-
 </section>
 
 <section id="expression-attribute">