Update flatten algorithm to not generate nodes containing only @id.
--- a/spec/latest/json-ld-api/index.html Sun Jul 21 15:26:49 2013 -0400
+++ b/spec/latest/json-ld-api/index.html Sun Jul 21 13:44:25 2013 -0700
@@ -2829,12 +2829,14 @@
<li>Add an <code>@graph</code> member to <i>entry</i> and set it to an
empty <tref>array</tref>.</li>
<li>For each <i>id</i>-<i>node</i> pair in <i>graph</i> ordered by <i>id</i>,
- add <i>node</i> to the <code>@graph</code> member of <i>entry</i>.</li>
+ add <i>node</i> to the <code>@graph</code> member of <i>entry</i>,
+ unless the only member of <i>node</i> is <code>@id</code>.</li>
</ol>
</li>
<li>Initialize an empty <tref>array</tref> <i>flattened</i>.</li>
<li>For each <i>id</i>-<i>node</i> pair in <i>default graph</i> ordered by <i>id</i>,
- add <i>node</i> to <i>flattened</i>.</li>
+ add <i>node</i> to <i>flattened</i>,
+ unless the only member of <i>node</i> is <code>@id</code>.</li>
<li>If <i>context</i> is <tref>null</tref>, return <i>flattened</i>.</li>
<li>Otherwise, return the result of compacting <i>flattened</i> according the
<a href="#compaction-algorithm">Compaction algorithm</a> passing <i>context</i>
@@ -2911,9 +2913,6 @@
<li>If <i>item</i> is a <tref>blank node identifier</tref>, replace it with a newly
<a href="#generate-blank-node-identifier">generated blank node identifier</a>
passing <i>item</i> for <i>identifier</i>.</li>
- <li>If <i>graph</i> has no member <i>item</i>, create one and initialize its
- value to a <tref>JSON object</tref> consisting of a single member <code>@id</code>
- whose value is <i>item</i>.</li>
</ol>
</li>
<li>If <i>element</i> has an <code>@value</code> member, perform the following steps: