--- a/model/grammar/ll.html Tue Jul 10 13:20:24 2012 +0100
+++ b/model/grammar/ll.html Tue Jul 10 14:08:42 2012 +0100
@@ -579,8 +579,7 @@
<td><a id="term-prov_n_LL-PN_CHARS_OTHERS" name="term-prov_n_LL-PN_CHARS_OTHERS"></a>[<span class="prodNo">64</span>] </td>
<td><<code class="production term">PN_CHARS_OTHERS</code>></td>
<td> ::= </td>
-<td><code class="content"><span class="prod"><a class="grammarRef" href="#prod-prov_n_LL-PERCENT">PERCENT</a></span><br/>
-| "/"<br/>
+<td><code class="content">"/"<br/>
| "@"<br/>
| "~"<br/>
| "&"<br/>
@@ -590,6 +589,7 @@
| "#"<br/>
| "$"<br/>
| "!"<br/>
+| <span class="prod"><a class="grammarRef" href="#prod-prov_n_LL-PERCENT">PERCENT</a></span><br/>
| <span class="prod"><a class="grammarRef" href="#prod-prov_n_LL-PN_CHARS_ESC">PN_CHARS_ESC</a></span></code></td>
</tr>
</tbody>
--- a/model/grammar/ll.js Tue Jul 10 13:20:24 2012 +0100
+++ b/model/grammar/ll.js Tue Jul 10 14:08:42 2012 +0100
@@ -580,8 +580,7 @@
'<td><a id="prod-PN_CHARS_OTHERS" name="prod-PN_CHARS_OTHERS"></a>[<span class="prodNo">64</span>] </td> ' +
'<td><<code class="production term">PN_CHARS_OTHERS</code>></td> ' +
'<td> ::= </td> ' +
-'<td><code class="content"><span class="prod"><a class="grammarRef" href="#prod-PERCENT">PERCENT</a></span><br/> ' +
-'| "/"<br/> ' +
+'<td><code class="content">"/"<br/> ' +
'| "@"<br/> ' +
'| "~"<br/> ' +
'| "&"<br/> ' +
@@ -591,6 +590,7 @@
'| "#"<br/> ' +
'| "$"<br/> ' +
'| "!"<br/> ' +
+'| <span class="prod"><a class="grammarRef" href="#prod-PERCENT">PERCENT</a></span><br/> ' +
'| <span class="prod"><a class="grammarRef" href="#prod-PN_CHARS_ESC">PN_CHARS_ESC</a></span></code></td> ' +
'</tr> ' +
'</tbody> ' +
--- a/model/grammar/yack/prov-n-LL.bnf Tue Jul 10 13:20:24 2012 +0100
+++ b/model/grammar/yack/prov-n-LL.bnf Tue Jul 10 14:08:42 2012 +0100
@@ -194,7 +194,7 @@
[100s] PN_LOCAL ::= ( PN_CHARS_U | [0-9] | PN_CHARS_OTHERS ) ( ( PN_CHARS | '.' | PN_CHARS_OTHERS )* ( PN_CHARS | PN_CHARS_OTHERS ) ) ?
-[160s] PN_CHARS_OTHERS ::= PERCENT | '/' | '@' | '~' | '&' | '+' | '*' | '?' | '#' | '$' | '!' | PN_CHARS_ESC
+[160s] PN_CHARS_OTHERS ::= '/' | '@' | '~' | '&' | '+' | '*' | '?' | '#' | '$' | '!' | PERCENT | PN_CHARS_ESC
PN_CHARS_ESC ::= '\\' ('=' | '\'' | '(' | ')' | ',' | '-'| ':'| ';' | '[' | ']' | '.')
--- a/model/grammar/yack/prov-n-LL.bnf.html Tue Jul 10 13:20:24 2012 +0100
+++ b/model/grammar/yack/prov-n-LL.bnf.html Tue Jul 10 14:08:42 2012 +0100
@@ -578,8 +578,7 @@
<td><a id="term-prov_n_LL-PN_CHARS_OTHERS" name="term-prov_n_LL-PN_CHARS_OTHERS"></a>[<span class="prodNo">64</span>] </td>
<td><<code class="production term">PN_CHARS_OTHERS</code>></td>
<td> ::= </td>
-<td><code class="content"><span class="prod"><a class="grammarRef" href="#prod-prov_n_LL-PERCENT">PERCENT</a></span><br/>
-| "/"<br/>
+<td><code class="content">"/"<br/>
| "@"<br/>
| "~"<br/>
| "&"<br/>
@@ -589,6 +588,7 @@
| "#"<br/>
| "$"<br/>
| "!"<br/>
+| <span class="prod"><a class="grammarRef" href="#prod-prov_n_LL-PERCENT">PERCENT</a></span><br/>
| <span class="prod"><a class="grammarRef" href="#prod-prov_n_LL-PN_CHARS_ESC">PN_CHARS_ESC</a></span></code></td>
</tr>
</tbody>
--- a/model/prov-n.html Tue Jul 10 13:20:24 2012 +0100
+++ b/model/prov-n.html Tue Jul 10 14:08:42 2012 +0100
@@ -2105,7 +2105,8 @@
<p>
A <dfn id="dfn-qualifiedName">qualified name</dfn> is a name subject to <a>namespace</a> interpretation. It consists of a <a>namespace</a>, denoted by an optional prefix, and a local name.
The PROV data model stipulates that a qualified name can be mapped into an IRI
- by concatenating the IRI associated with the prefix and the local part.
+ by concatenating the IRI associated with the prefix and the local part. This section provides the exact details of this procedure for qualified names supported by PROV-N. </p>
+
<p>A qualified name's prefix is OPTIONAL. If a prefix occurs in a
qualified name, it MUST refer to a <a>namespace</a> declared in a namespace declaration. In the absence of prefix, the qualified name
refers to the <a title="default namespace declaration">default namespace</a>.</p>
@@ -2129,10 +2130,18 @@
-->
-<p>A PROV qualified name <code class="content"><a class="grammarRef" href="#prod-QUALIFIED_NAME">QUALIFIED_NAME</a></code> has a more permissive syntax then XML's <code class="content"><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-QName">QName</a></code> [[!XML-NAMES]]
+<p>A PROV-N qualified name <code class="content"><a class="grammarRef" href="#prod-QUALIFIED_NAME">QUALIFIED_NAME</a></code> has a more permissive syntax then XML's <code class="content"><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-QName">QName</a></code> [[!XML-NAMES]]
and SPARQL <code class="content"><a href="http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115/#rPrefixedName">PrefixedName</a></code> [[!RDF-SPARQL-QUERY]].
-
-<p>It is a PROV requirement that the concatenation of the namespace with the local part results in a valid IRI [[!IRI]].
+A PROV-N qualified name <code class="content"><a class="grammarRef" href="#prod-QUALIFIED_NAME">QUALIFIED_NAME</a></code> consists of a prefix and a local part. Prefixes follow the production <code class="content"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_PREFIX">PN_PREFIX</a></code> defined by SPARQL [[!RDF-SPARQL-QUERY]]. Local parts have to be conformant with <code class="content"><a class="grammarRef" href="#prod-PN_LOCAL">PN_LOCAL</a></code>, which extends the original SPARQL <code class="content"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_LOCAL">PN_LOCAL</a></code> definition
+by allowing further characters (see <code class="content"><a class="grammarRef" href="#prod-PN_CHARS_OTHERS">PN_CHARS_OTHERS</a></code>):</p>
+<ul>
+<li> an extra set of characters commonly encountered in IRIs;
+<li> %-escaped charaters (see <code class="content"><a class="grammarRef" href="#prod-PERCENT">PERCENT</a></code>) to be interpreted as per
+ Section 3.1. Mapping of IRIs to URIs in [[!RFC3987]];</li>
+<li> and \-escaped characters (see <code class="content"><a class="grammarRef" href="#prod-PN_CHARS_ESC">PN_CHARS_ESC</a></code>).</li>
+</ul>
+
+
<p>Given that
'=' (equal),
@@ -2144,14 +2153,13 @@
';' (semi-colon),
'"' (double quote),
'[' (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 using the '\' (backslash character) as per production <code class="content"><a class="grammarRef" href="#prod-PN_CHARS_ESC">PN_CHARS_ESC</a></code>
-</p>
-
-
-<p>Qualified names <code class="content"><a class="grammarRef" href="#prod-QUALIFIED_NAME">QUALIFIED_NAME</a></code> consist of a prefix and a local part. Prefixes follow the production <code class="content"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_PREFIX">PN_PREFIX</a></code> defined by SPARQL [[!RDF-SPARQL-QUERY]]. Local parts have to be conformant with <code class="content"><a class="grammarRef" href="#prod-PN_LOCAL">PN_LOCAL</a></code>, which extends the original SPARQL <code class="content"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_LOCAL">PN_LOCAL</a></code> definition by allowing further characters (see <code class="content"><a class="grammarRef" href="#prod-PN_CHARS_OTHERS">PN_CHARS_OTHERS</a></code>) and %-escaped charaters (see <code class="content"><a class="grammarRef" href="#prod-PERCENT">PERCENT</a></code>). %-escaped characters are to be interpreted as per
- section 3.1. Mapping of IRIs to URIs in [[!RFC3987]].</p>
-
-
+']' (right square bracket) are used by the PROV notation as delimiters, they are not allowed in local parts.
+Instead, those characters permitted in SPARQL
+<code class="content"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rIRI_REF">IRI_REF</a></code>, are also allowed in <code class="content"><a class="grammarRef" href="#prod-PN_LOCAL">PN_LOCAL</a></code> if they are escaped by the '\' (backslash character) as per production <code class="content"><a class="grammarRef" href="#prod-PN_CHARS_ESC">PN_CHARS_ESC</a></code>. Furthermore, '.' (dot), ':' (colon), '-' (hyphen) can also be \-escaped.</p>
+
+
+
+<p>A PROV-N qualified name <code class="content"><a class="grammarRef" href="#prod-QUALIFIED_NAME">QUALIFIED_NAME</a></code> can be mapped to a valid IRI [[!IRI]] by concatenating the namespace denoted its local name <code class="content"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_PREFIX">PN_PREFIX</a></code> to the local name <code class="content"><a class="grammarRef" href="#prod-PN_LOCAL">PN_LOCAL</a></code>, whose \-escaped characters have been unescaped by dropping the character '\' (backslash).</p>
<table class="grammar">
@@ -2204,6 +2212,24 @@
</div>
+<div class="anexample" id="anexample-qualified-name3">
+<p>Examples of \-escaped characters.</p>
+<pre class="codeexample">
+bundle
+ prefix ex <http://example.org/>
+ default <http://example.org/default>
+
+ entity(ex:foo?a\=1) // corresponds to IRI http://example.org/foo?a=1
+ entity(ex:\-) // corresponds to IRI http://example.org/-
+ entity(ex:?fred\=fish%20soup) // corresponds to IRI http://example.org/?fred=fish%20soup
+
+ used(-;a1,e1,-) // identifier not specified for usage
+ used(\-;a1,e1,-) // usage identifier corresponds to http://example.org/default-
+endBundle
+</pre>
+</div>
+
+
<p><b>Note:</b>The productions for <code class="content"><a class="grammarRef" href="#prod-QUALIFIED_NAME">QUALIFIED_NAME</a></code> and <code class="content"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_PREFIX">PN_PREFIX</a></code> are conflicting. In the context of a <code class="content"><a class="grammarRef" href="#prod-namespaceDeclaration">namespaceDeclaration</a></code>, a parser should give precedence to the production for <code class="content"><a class="grammarRef" href="http://www.w3.org/TR/rdf-sparql-query/#rPN_PREFIX">PN_PREFIX</a></code>.
</p>