Fix expansion algorithm to handle arrays of @type correctly
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 28 Mar 2012 21:32:08 +0800
changeset 415 25efa13e9c52
parent 414 c8a07014de73
child 416 63fa0b707804
Fix expansion algorithm to handle arrays of @type correctly
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Wed Mar 28 20:37:53 2012 +0800
+++ b/spec/latest/json-ld-api/index.html	Wed Mar 28 21:32:08 2012 +0800
@@ -1193,8 +1193,13 @@
             <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 value of <code>@set</code>.
-          <li>Otherwise, if the <em>property</em> is <code>@id</code> or <code>@type</code> and the <em>value</em> is a <tref>string</tref>,
+          <li>Otherwise, if the <em>property</em> is <code>@id</code> and the <em>value</em> is a <tref>string</tref>,
             expand the value according to <a href="#iri-expansion">IRI Expansion</a>.</li>
+          <li>Otherwise, if the <em>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>
+          <li>Otherwise, if the <em>property</em> is <code>@type</code> and the <em>value</em> is an <tref>array</tref>,
+            expand every item according to <a href="#iri-expansion">IRI Expansion</a>.</li>
           <li>Otherwise, if the <em>property</em> is <code>@value</code>, the value is not subject to further expansion.</li>
           <li>Otherwise, if the <em>property</em> is not a <tref>keyword</tref>, expand the <em>property</em> according to
             <a href="#iri-expansion">IRI Expansion</a> rules.</li>