--- a/spec/latest/json-ld-api/index.html Tue Jan 08 19:33:29 2013 +0100
+++ b/spec/latest/json-ld-api/index.html Thu Jan 10 10:26:34 2013 +0100
@@ -867,7 +867,8 @@
<ol class="algorithm">
<li>If <em>val</em> is not an array, transform it to one.</li>
<li>Expand <em>val</em> by recursively using this algorithm, passing copies of
- the <tref>active context</tref> and <tref>active property</tref>.</li>
+ the <tref>active context</tref> and <em>property</em> as
+ <tref>active property</tref>.</li>
<li>Add to each item of <em>val</em> a member <code>@annotation</code> set to
<em>key</em> if no such member exists yet and append the resulting
<tref>JSON object</tref> to <em>annotation map values</em>.</li>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0044-in.jsonld Thu Jan 10 10:26:34 2013 +0100
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "property": { "@id": "http://example.com/vocab/property", "@language": "de" },
+ "annotationMap": { "@id": "http://example.com/vocab/annotationMap", "@language": "en", "@container": "@annotation" }
+ },
+ "@id": "http://example.com/node",
+ "property": [
+ {
+ "@id": "http://example.com/propertyValueNode",
+ "annotationMap": {
+ "expands to english string": "simple string"
+ }
+ },
+ "einfacher String"
+ ]
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0044-out.jsonld Thu Jan 10 10:26:34 2013 +0100
@@ -0,0 +1,21 @@
+[
+ {
+ "@id": "http://example.com/node",
+ "http://example.com/vocab/property": [
+ {
+ "@id": "http://example.com/propertyValueNode",
+ "http://example.com/vocab/annotationMap": [
+ {
+ "@value": "simple string",
+ "@language": "en",
+ "@annotation": "expands to english string"
+ }
+ ]
+ },
+ {
+ "@value": "einfacher String",
+ "@language": "de"
+ }
+ ]
+ }
+]
--- a/test-suite/tests/expand-manifest.jsonld Tue Jan 08 19:33:29 2013 +0100
+++ b/test-suite/tests/expand-manifest.jsonld Thu Jan 10 10:26:34 2013 +0100
@@ -221,6 +221,11 @@
"name": "Keywords cannot be aliased to other keywords",
"input": "expand-0043-in.jsonld",
"expect": "expand-0043-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:ExpandTest"],
+ "name": "Ensure annotation maps use language mapping",
+ "input": "expand-0044-in.jsonld",
+ "expect": "expand-0044-out.jsonld"
}
]
}