Add missing step to IRI compaction. Update to latest jsonld.js.
authorDave Longley <dlongley@digitalbazaar.com>
Mon, 11 Feb 2013 10:38:06 -0500
changeset 1210 e20d2b450020
parent 1209 f6a73f039d75
child 1211 6b63e82320a0
Add missing step to IRI compaction. Update to latest jsonld.js.
playground/jsonld.js
spec/latest/json-ld-api/alternate2.html
--- a/playground/jsonld.js	Mon Feb 11 16:14:01 2013 +0100
+++ b/playground/jsonld.js	Mon Feb 11 10:38:06 2013 -0500
@@ -3827,6 +3827,9 @@
             itemLanguage = '@null';
           }
         }
+        else {
+          itemType = '@id';
+        }
         if(commonLanguage === null) {
           commonLanguage = itemLanguage;
         }
@@ -3866,7 +3869,7 @@
           typeOrLanguageValue = value['@type'];
         }
       }
-      else if(_isObject(value)) {
+      else {
         typeOrLanguage = '@type';
         typeOrLanguageValue = '@id';
       }
--- a/spec/latest/json-ld-api/alternate2.html	Mon Feb 11 16:14:01 2013 +0100
+++ b/spec/latest/json-ld-api/alternate2.html	Mon Feb 11 10:38:06 2013 -0500
@@ -3058,6 +3058,9 @@
                 </ol>
               </li>
               <li>
+                Otherwise, set <em>itemType</em> to <code>@id</code>.
+              </li>
+              <li>
                 If <em>commonLanguage</em> is <tref>null</tref>, set it
                 to <em>itemLanguage</em>.
               </li>