Fix compact-0021: If a prefix is defined it has precedence over @vocab
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sat, 08 Dec 2012 13:49:20 +0100
changeset 999 1371f1e9446c
parent 998 80f8941d998a
child 1000 bc5e4a37c3a9
Fix compact-0021: If a prefix is defined it has precedence over @vocab
test-suite/tests/compact-0021-context.jsonld
test-suite/tests/compact-0021-out.jsonld
--- a/test-suite/tests/compact-0021-context.jsonld	Fri Dec 07 02:09:45 2012 +0100
+++ b/test-suite/tests/compact-0021-context.jsonld	Sat Dec 08 13:49:20 2012 +0100
@@ -1,8 +1,6 @@
 {
   "@context": {
-    "@vocab": "http://example.com/",
-    "sub": "http://example.com/subdir/",
-    "date": { "@id": "sub:vocab/date", "@type": "subdir/vocab/dateTime" },
-    "embed": "subdir/vocab/embed"
+    "@vocab": "http://example.com/subdir/",
+    "vocab/date": { "@type": "vocab/dateTime" }
   }
 }
--- a/test-suite/tests/compact-0021-out.jsonld	Fri Dec 07 02:09:45 2012 +0100
+++ b/test-suite/tests/compact-0021-out.jsonld	Sat Dec 08 13:49:20 2012 +0100
@@ -1,18 +1,16 @@
 {
   "@context": {
-    "@vocab": "http://example.com/",
-    "sub": "http://example.com/subdir/",
-    "date": { "@id": "sub:vocab/date", "@type": "subdir/vocab/dateTime" },
-    "embed": "subdir/vocab/embed"
+    "@vocab": "http://example.com/subdir/",
+    "vocab/date": { "@type": "vocab/dateTime" }
   },
-  "@id": "sub:id/1",
-  "@type": "subdir/vocab/test",
-  "date": "2011-01-25T00:00:00Z",
-  "embed": {
-    "@id": "sub:id/2",
-    "subdir/vocab/expandedDate": {
+  "@id": "http://example.com/subdir/id/1",
+  "@type": "vocab/test",
+  "vocab/date": "2011-01-25T00:00:00Z",
+  "vocab/embed": {
+    "@id": "http://example.com/subdir/id/2",
+    "vocab/expandedDate": {
       "@value": "2012-08-01T00:00:00Z",
-      "@type": "subdir/vocab/dateTime"
+      "@type": "vocab/dateTime"
     }
   }
 }