Make sure value is converted to array form in the expansion algorithm
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sun, 08 Apr 2012 14:40:38 +0800
changeset 472 3c9c1ab0f954
parent 471 b0efa2159af1
child 473 ebd3ce22e39a
Make sure value is converted to array form in the expansion algorithm
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Sat Apr 07 17:07:40 2012 +0800
+++ b/spec/latest/json-ld-api/index.html	Sun Apr 08 14:40:38 2012 +0800
@@ -1209,11 +1209,13 @@
             <em>value</em> is not an <tref>array</tref>, convert it to an <tref>array</tref>.</li>
           <li>Otherwise, expand <em>value</em> recursively using this algorithm, passing copies of the <tref>active context</tref> and
             <tref>active property</tref>.</li>
-          <li>If the expanded <em>value</em> is not <tref>null</tref> and the <tref>active property</tref> has a <code>@container</code>
-            set to <code>@list</code>, convert <em>value</em> to an <tref>object</tref> with an <code>@list</code> property whose value is
+          <li>If the <tref>active property</tref> has a <code>@container</code> set to <code>@list</code> and the expanded <em>value</em>
+            is not <tref>null</tref>, convert <em>value</em> to an <tref>object</tref> with an <code>@list</code> property whose value is
             set to <em>value</em> (unless <em>value</em> is already in that form).</li>
-          <li>If <em>element</em> already contains a <em>property</em> property, append <em>value</em> to the existing value.</li>
-          <li>Otherwise, create a <em>property</em> property with <em>value</em> as value.</li>
+          <li>Convert <em>value</em> to <tref>array</tref> form unless <em>value</em> is <tref>null</tref> or <em>property</em> is
+            <code>@id</code>, <code>@type</code>, <code>@value</code>, or <code>@language</code>.</li>
+          <li>If <em>value</em> is not <tref>null</tref>, either merge <em>value</em> into an existing <em>property</em> property of
+            <em>element</em> or create a new <em>property</em> property with <em>value</em> as value.</li>
         </ol>
       </li>
       <li>If the processed <em>element</em> has an <code>@value</code> property