Fix expansion algorithm to handle keyword aliases properly
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Fri, 30 Mar 2012 01:06:37 +0800
changeset 427 7b13a000831e
parent 426 e4e38c3475f9
child 428 23782cad332c
Fix expansion algorithm to handle keyword aliases properly
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Thu Mar 29 23:23:49 2012 +0800
+++ b/spec/latest/json-ld-api/index.html	Fri Mar 30 01:06:37 2012 +0800
@@ -1196,13 +1196,13 @@
           <li>If <em>value</em> is <tref>null</tref>, skip this property/value pair and remove
             <em>property</em> from <em>element</em></li>
           <li>Otherwise, if <em>value</em> is a <tref>JSON object</tref> having either a <code>@value</code>,
-            <code>@list</code>, or <code>@set</code> key with a <tref>null</tref> value, skip this
-            property/value pair and remove <em>property</em> from <em>element</em>.</li>
+            <code>@list</code>, or <code>@set</code> property (or an alias thereof) with a <tref>null</tref> value,
+            skip this property/value pair and remove <em>property</em> from <em>element</em>.</li>
           <li>Otherwise, if <em>value</em> is a <tref>JSON object</tref> having a <code>@set</code>
-            property with a non-<tref>null</tref> value, replace <em>value</em> with the
+            property (or an alias thereof) with a non-<tref>null</tref> value, replace <em>value</em> with the
             value of <code>@set</code>.</li>
-          <li>Otherwise, if <em>value</em> is a <tref>JSON object</tref> having a <code>@list</code> property,
-            that value MUST be an array. Process each entry of <em>value</em>
+          <li>Otherwise, if <em>value</em> is a <tref>JSON object</tref> having a <code>@list</code> property
+            (or an alias thereof), that value MUST be an array. Process each entry of <em>value</em>
             recursively using this algorithm, passing copies of the <tref>active context</tref> and
             <tref>active property</tref> removing all <tref>null</tref> entries.
             Add an entry in the output object for <em>expanded property</em> with value and continue to the
@@ -1214,10 +1214,9 @@
             is a <tref>string</tref>, expand the value according to
             <a href="#iri-expansion">IRI Expansion</a>.</li>
           <li>Otherwise, if the <em>expanded property</em> is <code>@type</code> and the <em>value</em>
-            is a <tref>string</tref> expand <em>value</em> according to
-            <a href="#iri-expansion">IRI Expansion</a>. If <em>element</em> has no
-            <code>@value</code> property, replace <em>value</em> with an array whose only value
-            is the expanded <em>value</em>.</li>
+            is a <tref>string</tref> expand <em>value</em> according to <a href="#iri-expansion">IRI Expansion</a>.
+            If <em>element</em> has no <code>@value</code> property (or an alias thereof), replace <em>value</em>
+            with an array whose only value is the expanded <em>value</em>.</li>
           <li>Otherwise, if the <em>expanded property</em> is <code>@type</code> and the
             <em>value</em> is an <tref>array</tref>, expand every entry according to
             <a href="#iri-expansion">IRI Expansion</a>.</li>