Fix definition of node objects in JSON-LD grammar
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Fri, 28 Dec 2012 17:17:35 +0100
changeset 1100 a13341a551ed
parent 1099 6e8941290d56
child 1101 86285cad4fab
Fix definition of node objects in JSON-LD grammar

This addresses #114 and #196.
spec/latest/json-ld-syntax/index.html
--- a/spec/latest/json-ld-syntax/index.html	Thu Dec 27 15:43:04 2012 +0100
+++ b/spec/latest/json-ld-syntax/index.html	Fri Dec 28 17:17:35 2012 +0100
@@ -2752,20 +2752,20 @@
 
 <ul>
   <li>it does not contain the <code>@value</code>, <code>@list</code>,
-    or <code>@set</code> keywords, or</li>
+    or <code>@set</code> keywords, and</li>
   <li>it does not contain the <code>@graph</code> keyword and is
     the top-most <tref>JSON object</tref> in the JSON-LD document.
 </ul>
 
 <p>The <tref title="property">properties</tref> of a <tref>node</tref> in
-  the <tref>JSON-LD graph</tref> may be spread among different
+  a <tref>JSON-LD graph</tref> may be spread among different
   <tref title="node object">node objects</tref> within a document. When
   that happens, the keys of the different
   <tref title="node object">node objects</tref> are merged to create the
   properties of the resulting <tref>node</tref>.</p>
 
-<p>A <tref>node object</tref> MUST be a <tref>JSON object</tref> that contains
-  one or more key-value pairs. All keys which are not <tref title="IRI">IRIs</tref>,
+<p>A <tref>node object</tref> MUST be a <tref>JSON object</tref>. All keys
+  which are not <tref title="IRI">IRIs</tref>,
   <tref title="compact IRI">compact IRIs</tref>, <tref title="term">terms</tref>
   valid in the <tref>active context</tref>, or one of the following
   <tref title="keyword">keywords</tref> MUST be ignored when processed:</p>
@@ -2773,22 +2773,23 @@
 <ul>
   <li><code>@context</code>,</li>
   <li><code>@graph</code>,</li>
-  <li><code>@id</code>, or</li>
-  <li><code>@type</code></li>
+  <li><code>@id</code>,</li>
+  <li><code>@type</code>, or</li>
+  <li><code>@annotation</code></li>
 </ul>
 
 <p>If the <tref>node object</tref> contains the <code>@context</code>
   key, its value MUST be one of the following:</p>
 <ul>
+  <li><tref>null</tref>,</li>
   <li>an <tref>IRI</tref>,</li>
   <li>a <tref>context definition</tref>, or</li>
   <li>an <tref>array</tref> composed of any number of the previous two expressions.</li>
 </ul>
 
 <p>If the <tref>node object</tref> contains the <code>@id</code> key,
-  its value MUST be
-  an <tref>IRI</tref>,
-  a <tref>compact IRI</tref> (including <tref title="blank node identifier">blank node identifiers</tref>), or
+  its value MUST be an <tref>IRI</tref>, a <tref>compact IRI</tref>
+  (including <tref title="blank node identifier">blank node identifiers</tref>), or
   a <tref>term</tref> defined in the <tref>active context</tref> expanding
   into an <tref>IRI</tref> or a <tref>blank node identifier</tref>.
   See <a href="#node-identifiers"></a>, <a href="#compact-iris"></a>,
@@ -2811,10 +2812,8 @@
   If the <tref>node object</tref> contains an <code>@id</code> keyword,
   its value is used as the label of a named graph.
   See <a href="#named-graphs"></a> for further discussion on
-  <code>@graph</code> values.</p>
-
-<p class="note">As a special case, if a <tref>JSON object</tref> contains no
-  keys other than <code>@graph</code> and <code>@context</code>, and the
+  <code>@graph</code> values. As a special case, if a <tref>JSON object</tref>
+  contains no keys other than <code>@graph</code> and <code>@context</code>, and the
   <tref>JSON object</tref> is the root of the JSON-LD document, the
   <tref>JSON object</tref> is not treated as a <tref>node object</tref>; this
   is used as a way of defining <tref title="node object">node
@@ -2822,6 +2821,12 @@
   <tref>context</tref> to be defined which is shared by all of the constituent
   <tref title="node object">node objects</tref>.</p>
 
+<p>If the <tref>node object</tref> contains the <code>@annotation</code> key,
+  its value MUST be a <tref>string</tref>. See section
+  <a href="#data-annotations"></a> for further discussion on <code>@annotation</code>
+  values.</p>
+
+
 <p>Keys in a <tref>node object</tref> that are not
   <tref title="keyword">keywords</tref> MUST expand to an <tref>absolute IRI</tref>
   using the <tref>active context</tref>. The values associated with these keys