Skip to content

Commit

Permalink
Add missing steps to Hash N-Degree Quads.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed May 18, 2015
1 parent aff5607 commit 5420d49
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions spec/latest/rdf-dataset-normalization/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ <h3>Algorithm</h3>

<p>The inputs to this algorithm are the <tref>normalization state</tref>,
the <i>identifier</i> for the <tref>RDF blank node</tref> to
recursively hash quads for, and <i>path identifier issuer</i> which is
recursively hash quads for, and path identifier <i>issuer</i> which is
an <tref>identifier issuer</tref> that issues temporary
<tref>RDF blank node identifier</tref>s. The output from this algorithm
will be a <tref>hash</tref> and the <tref>identifier issuer</tref> used
Expand Down Expand Up @@ -682,10 +682,12 @@ <h3>Algorithm</h3>
</li>
</ol>
</li>
<li>Create an empty string, <i>data to hash</i>.</li>
<li>For each <i>related hash</i> to <i>blank node list</i> mapping in
<i>hash to related blank nodes map</i>, sorted lexicographically
by <i>related hash</i>:
<ol class="algorithm">
<li>Append the <i>related hash</i> to the <i>data to hash</i>.</li>
<li>Create a <tref>string</tref> <i>chosen path</i>.</li>
<li>Create an unset <i>chosen issuer</i> variable.</li>
<li>For each <i>permutation</i> of <i>blank node list</i>:
Expand Down Expand Up @@ -733,8 +735,7 @@ <h3>Algorithm</h3>
of <i>path</i> is greater than or equal to the length
of <i>chosen path</i> and <i>path</i> is lexicographically
greater than <i>chosen path</i>, then skip to the next
<i>permutation</i>.
</li>
<i>permutation</i>.</li>
</ol>
</li>
<li>If <i>chosen path</i> is empty or <i>path</i> is
Expand All @@ -743,13 +744,14 @@ <h3>Algorithm</h3>
to <i>issuer copy</i>.</li>
</ol>
</li>
<li>Return the <i>chosen issuer</i> and the <tref>hash</tref> that
results from passing the lexicographically-sorted
<i>related hash</i>es in <i>hash to related blank nodes map</i>
and the joined <i>chosen path</i> through the
<tref>hash algorithm</tref>.</li>
<li>Append <i>chosen path</i> to <i>data to hash</i>.</li>
<li>Replace <i>issuer</i>, by reference, with
<i>chosen issuer</i>.</li>
</ol>
</li>
<li>Return <i>issuer</i> and the <tref>hash</tref> that results from
passing <i>data to hash</i> through the
<tref>hash algorithm</tref>.</li>
</ol>
</section>
</section>
Expand Down

0 comments on commit 5420d49

Please sign in to comment.