Skip to content

Commit

Permalink
Improve description of the namespaces map.
Browse files Browse the repository at this point in the history
Fixes #59.
  • Loading branch information
gkellogg committed Oct 31, 2024
1 parent c91c04b commit b4b3879
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,10 @@ <h3>Parser State</h3>
in the <a href="#grammar-production-prefixID"><code>prefixID</code></a> production
assign a namespace name (<a href="#grammar-production-IRIREF"><code>IRIREF</code></a>) for the prefix
(<a href="#grammar-production-PNAME_NS"><code>PNAME_NS</code></a>).
Outside of a <a href="#grammar-production-prefixID"><code>prefixID</code></a> production,
any <a href="#grammar-production-PNAME_NS"><code>PNAME_NS</code></a> is substituted with the namespace.
Outside of a
<a href="#grammar-production-prefixID"><code>prefixID</code></a> or
<a href="#grammar-production-sparqlPrefix"><code>sparqlPrefix</code></a> production,
any <a href="#grammar-production-PNAME_NS"><code>PNAME_NS</code></a> is substituted with the namespace from the current state of the <a href="#namespaces">namespaces map</a>.
<!--
<span class="testrefs">(test: <a href="tests/#prefix1">prefix1</a>
<a href="tests/#escapedNamespace1">escapedNamespace1</a>)</span>
Expand Down Expand Up @@ -1774,8 +1776,8 @@ <h3>RDF Term Constructors</h3>
</thead>
<tbody>
<tr id="handle-IRIREF" ><td style="text-align:left;" ><a class="type IRI" href="#grammar-production-IRIREF" >IRIREF </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-iri"> IRI </a></td><td>The characters between <a href="#cp-less-than"><code title="less-than sign">&lt;</code></a> and <a href="#cp-greater-than"><code title="greater-than sign">&gt;</code></a> are taken, with the <a href="#numeric">numeric escape sequences</a> unescaped, to form the IRI. <a data-cite="RDF12-CONCEPTS#dfn-relative-iri">Relative IRI reference</a> resolution is performed per <a href="#sec-iri-references" class="sectionRef">Section 6.3</a>.</td></tr>
<tr id="handle-PNAME_NS" ><td style="text-align:left;" rowspan="2"><a class="type string" href="#grammar-production-PNAME_NS" >PNAME_NS </a></td><td><a href="#prefix"> prefix </a></td><td>When used in a <a href="#grammar-production-prefixID"><code>prefixID</code></a> or <a href="#grammar-production-sparqlPrefix"><code>sparqlPrefix</code></a> production, the <code>prefix</code> is the potentially empty <a data-cite="RDF12-CONCEPTS#dfn-rdf-string">RDF string</a> matching the first argument of the rule is a key into the <a href="#namespaces">namespaces map</a>.</td></tr>
<tr id="handle-PNAME_NS2" > <td><a data-cite="RDF12-CONCEPTS#dfn-iri"> IRI </a></td><td>When used in a <a href="#grammar-production-PrefixedName"><code>PrefixedName</code></a> production, the <code>iri</code> is the value in the <a href="#namespaces">namespaces map</a> corresponding to the first argument of the rule.</td></tr>
<tr id="handle-PNAME_NS" ><td style="text-align:left;" rowspan="2"><a class="type string" href="#grammar-production-PNAME_NS" >PNAME_NS </a></td><td><a href="#prefix"> prefix </a></td><td>When used in a <a href="#grammar-production-prefixID"><code>prefixID</code></a> or <a href="#grammar-production-sparqlPrefix"><code>sparqlPrefix</code></a> production, the <code>prefix</code> is the potentially empty <a data-cite="RDF12-CONCEPTS#dfn-rdf-string">RDF string</a> matching the first argument of the rule is a key into the <a href="#namespaces">namespaces map</a> into which the expanded second argument is stored for future lookup.</td></tr>
<tr id="handle-PNAME_NS2" > <td><a data-cite="RDF12-CONCEPTS#dfn-iri"> IRI </a></td><td>When used in a <a href="#grammar-production-PrefixedName"><code>PrefixedName</code></a> production; the <a href="#namespaces">namespaces map</a> MUST have a corresponding <code>namespace</code>, which forms the <a data-cite="RDF12-CONCEPTS#dfn-rdf-string">RDF string</a> of the IRI.</td></tr>
<tr id="handle-PNAME_LN" ><td style="text-align:left;" ><a class="type IRI" href="#grammar-production-PNAME_LN" >PNAME_LN </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-iri"> IRI </a></td><td>A potentially empty <a href="#prefix">prefix</a> is identified by the first sequence, <a href="#grammar-production-PNAME_NS"><code>PNAME_NS</code></a>. The <a href="#namespaces">namespaces map</a> <em class="rfc2119">MUST</em> have a corresponding <code>namespace</code>. The <a data-cite="RDF12-CONCEPTS#dfn-rdf-string">RDF string</a> of the IRI is formed by unescaping the <a href="#reserved">reserved characters</a> in the second argument, <a href="#grammar-production-PN_LOCAL"><code>PN_LOCAL</code></a>, and concatenating this onto the <code>namespace</code>.</td></tr>
<!-- tr id="handle-PrefixedName" ><td style="text-align:left;" ><a class="type IRI" href="#grammar-production-PrefixedName" >PrefixedName </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-iri"> IRI </a></td><td>.</td></tr -->
<tr id="handle-STRING_LITERAL_SINGLE_QUOTE" ><td style="text-align:left;" ><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE" >STRING_LITERAL_SINGLE_QUOTE </a></td><td><a data-cite="RDF12-CONCEPTS#dfn-lexical-form"> lexical form </a></td><td>The characters between the outermost <a href="#cp-apostrophe"><code title="apostrophe">'</code></a>s are taken, after <a href="#numeric">numeric</a> and <a href="#string">string</a> escape sequences are replaced with the characters that they represent, to form the <a data-cite="RDF12-CONCEPTS#dfn-rdf-string">RDF string</a> of a lexical form.</td></tr>
Expand Down

0 comments on commit b4b3879

Please sign in to comment.