Updated Context processing algorithm to allow resetting @id: null.
authorManu Sporny <msporny@digitalbazaar.com>
Sat, 22 Dec 2012 13:48:23 -0500
changeset 1086 60f91fb1270c
parent 1085 487ce97a62bf
child 1087 dd3046227fc0
Updated Context processing algorithm to allow resetting @id: null.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Sat Dec 22 12:53:38 2012 -0500
+++ b/spec/latest/json-ld-api/index.html	Sat Dec 22 13:48:23 2012 -0500
@@ -1023,15 +1023,29 @@
                 <li>If <tref>term definition</tref> for <em>key</em> exists in the
                   <tref>active context</tref>, remove it.</li>
                 <li>Initialize a new, empty <tref>term definition</tref> <em>definition</em>.</li>
-                <li>If <em>value</em> has an <code>@id</code> member with a value <em>val</em>
+                <li>If <em>value</em> has an <code>@id</code> member with a value <em>val</em>:
                   <ol class="algorithm">
-                    <li>and <em>val</em> is an <tref>array</tref>, expand each item according the
-                      <a href="#iri-expansion">IRI Expansion algorithm</a>. If an item is not a <tref>string</tref>,
-                      raise an <code class="error">INVALID_PROPERTY_GENERATOR</code> error; otherwise sort
-                      <em>val</em> and store it as <tref>IRI mapping</tref> in <em>definition</em>.</li>
-                    <li>Otherwise, if <em>val</em> is a <tref>string</tref>, expand it according the
-                      <a href="#iri-expansion">IRI Expansion algorithm</a>. Set the <tref>IRI mapping</tref> of
-                      <em>definition</em> to the expanded <em>val</em>.</li>
+                    <li>if <em>val</em> is <tref>null</tref>, set 
+                    <em>definition</em> to <em>val</em>.
+                    <li>if <em>val</em> is an <tref>array</tref>, process each 
+                      <em>item</em> in the array:
+                      <ol class="algorithm">
+                        <li>if <em>item</em> is a <tref>string</tref> expand it
+                          according the <a href="#iri-expansion">IRI Expansion algorithm</a>.
+                        </li>
+                        <li>otherwise, raise an 
+                          <code class="error">INVALID_PROPERTY_GENERATOR</code> 
+                          error.
+                        </li>
+                      </ol>
+                    <li>if <em>val</em> is an <tref>array</tref>, 
+                      lexicographically sort <em>val</em> and set
+                      <em>definition</em> to <em>val</em>.</li>
+                    <li>Otherwise, if <em>val</em> is a <tref>string</tref>, 
+                      expand it according the
+                      <a href="#iri-expansion">IRI Expansion algorithm</a> and
+                      set <em>definition</em> to <em>val</em>. 
+                    </li>
                   </ol>
                 </li>
                 <li>If the <tref>IRI mapping</tref> of <em>definition</em> is set to <tref>null</tref> or a