Set the value space of @type to string(s)
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 01 Aug 2012 15:59:44 +0200
changeset 792 7122a0f509d7
parent 791 cc45c2a94ab8
child 793 914d30452b7a
Set the value space of @type to string(s)

The value of @type must be a string or an array of strings (or an empty object to support framing). Also updated the relevant test.

This closes #120.
spec/latest/json-ld-api/index.html
test-suite/tests/expand-0026-in.jsonld
--- a/spec/latest/json-ld-api/index.html	Wed Aug 01 15:33:10 2012 +0200
+++ b/spec/latest/json-ld-api/index.html	Wed Aug 01 15:59:44 2012 +0200
@@ -1566,13 +1566,10 @@
           <li>Otherwise, if the <em>property</em> is <code>@type</code>:
             <ol class="algorithm">
               <li>If <em>value</em> is a <tref>string</tref>, expand according to <a href="#iri-expansion">IRI Expansion</a>.</li>
-              <li>Otherwise, if <em>value</em> is a <tref>subject reference</tref>, the expanded value
-                is the result of performing <a href="#iri-expansion">IRI Expansion</a> on the value of <code>@id</code>.</li>
               <li>Otherwise, if <em>value</em> is a <tref>JSON Object</tref>, it must be empty (used for
                 <cite><a href="../json-ld-framing/#framing">Framing</a></cite>).</li>
-              <li>Otherwise, if <em>value</em> is an <tref>array</tref>, all elements must be either a
-                <tref>string</tref> or <tref>subject reference</tref>. Expand <em>value</em> for each
-                of its entries using the previous three steps.</li>
+              <li>Otherwise, if <em>value</em> is an <tref>array</tref>, all elements must be <tref>string</tref>s.
+                Expand <em>value</em> for each of its entries according to <a href="#iri-expansion">IRI Expansion</a>.</li>
             </ol>
           </li>
           <li>Otherwise, if the <em>property</em> is <code>@value</code> or <code>@language</code> the <em>value</em> MUST NOT be a
--- a/test-suite/tests/expand-0026-in.jsonld	Wed Aug 01 15:33:10 2012 +0200
+++ b/test-suite/tests/expand-0026-in.jsonld	Wed Aug 01 15:59:44 2012 +0200
@@ -10,11 +10,11 @@
       "@id": "http://example.com/c",
       "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": [
         "http://example.com/d",
-        {"@id": "http://example.com/e"}
+        "http://example.com/e"
       ]
     }, {
       "@id": "http://example.com/f",
-      "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {"@id": "http://example.com/g"}
+      "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": "http://example.com/g"
     }
-  ]  
+  ]
 }