Added @language to @context.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Thu, 20 Oct 2011 22:10:13 -0700
changeset 231 ee39abe49fc3
parent 230 49d5f3db06c4
child 232 e2e07fe8eae7
Added @language to @context.
spec/latest/json-ld-api/index.html
spec/latest/json-ld-syntax/index.html
--- a/spec/latest/json-ld-api/index.html	Thu Oct 20 20:33:42 2011 -0400
+++ b/spec/latest/json-ld-api/index.html	Thu Oct 20 22:10:13 2011 -0700
@@ -753,6 +753,10 @@
           performing <a href="#iri-expansion">IRI Expansion</a> on the associated value(s).
         </li>
         <li>
+          If the <tref>JSON object</tref> has a <code>@language</code> key, it MUST have a value of a
+          simple <tref>string</tref> or <code>null</code>. Add the language to the <tref>local context</tref>.
+        </li>
+        <li>
           Otherwise, the key MUST have the lexical form of <cite><a
           href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite> and
           MUST have the value of a simple <tref>string</tref> with the lexical form of IRI. Merge the key-value
@@ -2461,8 +2465,9 @@
           the string and the coercion key as the datatype IRI.
         </li>
         <li>
-          Otherwise, set the <tref>active object</tref> to a <tref>plain literal</tref> value created from
-          the string.
+          Otherwise, set the <tref>active object</tref> to a <tref>plain literal</tref> value created from the string.
+          If the <tref>active context</tref> contains a <code>language</code> key with a non-<code>null</code> value,
+          use it's value to set the language of the <tref>plain literal</tref>.
         </li>
       </ol>
       Generate a
--- a/spec/latest/json-ld-syntax/index.html	Thu Oct 20 20:33:42 2011 -0400
+++ b/spec/latest/json-ld-syntax/index.html	Thu Oct 20 22:10:13 2011 -0700
@@ -933,6 +933,21 @@
 <em>花澄</em> and associate the <code>ja</code> language code with the triple
 that is generated. Languages MUST be expressed in [[!BCP47]] format.</p>
 
+<p>It is also possible to set a language to use within a <code>@context</code>, to allow specify a language
+to apply to all <tref>plain literal</tref>s within the scope of the context</p>
+
+<pre class="example" data-transform="updateExample">
+<!--
+{
+  ****"@context:" {
+    "@language": "ja"
+  },****
+...
+  "name": ****"花澄"****
+...
+}
+-->
+</pre>
 </section>
 
 <section>