--- a/spec/latest/json-ld-api/index.html Mon Apr 16 23:41:50 2012 +0200
+++ b/spec/latest/json-ld-api/index.html Mon Apr 16 23:54:26 2012 +0200
@@ -1399,10 +1399,11 @@
<h3>Compaction Algorithm</h3>
<p>The algorithm takes three input variables: an <tref>active context</tref>, an <tref>active property</tref>,
- and an <em>element</em> to be compacted. To begin, the <tref>active property</tref> is set to <tref>null</tref>,
- and <em>element</em> is set to the result of performing the <a href="#expansion-algorithm">Expansion Algorithm</a>
- on the <tref>JSON-LD input</tref>. This removes any existing context to allow the given <tref>active context</tref>
- to be cleanly applied.</p>
+ and an <em>element</em> to be compacted. To begin, the <tref>active context</tref> is
+ set to the result of performing <a href="#context-processing">Context Processing</a> on the passed <em>context</em>,
+ <tref>active property</tref> is set to <tref>null</tref>, and <em>element</em> is set to the result of performing the
+ <a href="#expansion-algorithm">Expansion Algorithm</a> on the <tref>JSON-LD input</tref>. This removes any existing
+ context to allow the given <tref>active context</tref> to be cleanly applied.</p>
<ol class="algorithm">
<li>If <em>element</em> is an <tref>array</tref>, process each entry in <em>element</em> recursively
@@ -1451,6 +1452,11 @@
</li>
<li>Otherwise, the compacted <em>element</em> is <em>element</em>.</li>
</ol>
+
+<p>If, after the algorithm outlined above is run, the resulting <em>element</em> is an <tref>array</tref>, put <em>element</em> into the
+ <code>@graph</code> property of a new <tref>JSON object</tref> and then set <em>element</em> to that <tref>JSON object</tref>.
+ Finally, add a <code>@context</code> property to <em>element</em> and set it to the initially passed <em>context</em>.</p>
+
</section>
</section>