Implemented resolutions for ISSUE-169. Close #169.
authorManu Sporny <msporny@digitalbazaar.com>
Sun, 02 Dec 2012 19:21:44 -0500
changeset 970 db8f1c2bf84a
parent 969 e97983189716
child 971 d62290a499d7
Implemented resolutions for ISSUE-169. Close #169.
spec/latest/json-ld-api/index.html
spec/latest/json-ld-syntax/index.html
--- a/spec/latest/json-ld-api/index.html	Sun Dec 02 16:12:47 2012 -0500
+++ b/spec/latest/json-ld-api/index.html	Sun Dec 02 19:21:44 2012 -0500
@@ -515,15 +515,20 @@
       if a <tref>named graph</tref> is not specified.</dd>
     <dt><tdef>node</tdef></dt>
     <dd>A piece of information that is represented in a <tref>JSON-LD graph</tref>.</dd>
-    <dt><tdef>node definition</tdef></dt>
-    <dd>A <tref>JSON object</tref> used to represent a <tref>node</tref> and
-      one or more properties of that node. A <tref>JSON object</tref> is a
-      node definition if it does not contain the keys <code>@value</code>,
-      <code>@list</code> or <code>@set</code> and it has one or more keys
-      other than <code>@id</code>.</dd>
-    <dt><tdef>node reference</tdef></dt>
-    <dd>A <tref>JSON object</tref> used to reference a node having only the
-      <code>@id</code> key.</dd>
+    <dt><tdef>node object</tdef></dt>
+    <dd>A <tref>node object</tref> represents zero or more properties of a
+      <tref>node</tref> in the <tref>JSON-LD graph</tref> serialized by the
+      JSON-LD document.
+  
+      A <tref>JSON Object</tref> is a <tref>node object</tref> if
+      it exists outside of the JSON-LD Context and:</p>
+  
+      <ul>
+        <li>it does not contain the <code>@value</code>, <code>@list</code>, 
+        or <code>@set</code> keywords, or</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></dd>
     <dt><tdef>blank node</tdef></dt>
     <dd>A <tref>node</tref> in a <tref>JSON-LD graph</tref> that does not contain a de-referenceable
       identifier because it is either ephemeral in nature or does not contain information that needs to be
@@ -1332,7 +1337,7 @@
       <li>Otherwise, return the sum of the <tref>term rank</tref>s for every entry in the list.</li>
     </ol>
   </li>
-  <li>Otherwise, <em>value</em> MUST be a <tref>node definition</tref>, <tref>node reference</tref>,
+  <li>Otherwise, <em>value</em> MUST be a <tref>node object</tref>, <tref>node object</tref>,
     or a <tref>JSON object</tref> having a <code>@value</code>.
     <ol class="algorithm">
       <li>If <em>value</em> has a <code>@value</code> property:
@@ -1657,7 +1662,7 @@
     <code>true</code>, the compacted value is that item; otherwise the compacted value is <em>element</em>.</li>
   <li>Otherwise, if <em>element</em> is an object:
     <ol class="algorithm">
-      <li>If <em>element</em> has an <code>@value</code> property or element is a <tref>node reference</tref>,
+      <li>If <em>element</em> has an <code>@value</code> property or element is a <tref>node object</tref>,
         return the result of performing
         <a href="#value-compaction">Value Compaction</a> on <em>element</em> using <tref>active property</tref>.</li>
       <li>Otherwise, if the <tref>active property</tref> has a <code>@container</code> mapping to <code>@list</code>
@@ -1818,7 +1823,7 @@
     otherwise set it to a <tref>blank node</tref> identifier created by the
     <a href="#generate-blank-node-identifier">Generate Blank Node Identifier</a>
     algorithm.</li>
-  <li>If <em>list</em> is not <tref>null</tref>, append a new <tref>node reference</tref> to <em>list</em> using
+  <li>If <em>list</em> is not <tref>null</tref>, append a new <tref>node object</tref> to <em>list</em> using
     <em>id</em> as the value for <code>@id</code>.</li>
   <li>Let <em>nodes</em> be the value in <em>nodeMap</em> where the key is <em>graph</em>; if no such
     value exists, insert a new <tref>JSON object</tref> for the key <em>graph</em>. If <em>id</em> is not in
@@ -1834,13 +1839,13 @@
         <code>value</code> into <code>node</code> and then continue.</li>
       <li>For each value <em>v</em> in the array <em>value</em>:
         <ol class="algorithm">
-          <li>If <em>v</em> is a <tref>node definition</tref> or <tref>node reference</tref>:
+          <li>If <em>v</em> is a <tref>node object</tref> or <tref>node object</tref>:
             <ol class="algorithm">
               <li>If the property <code>@id</code> is not an <tref>IRI</tref> or it does not exist,
                 map <em>v</em> to a <a
                 href="#generate-blank-node-identifier">new blank node
                 identifier</a> <em>name</em> to avoid collisions. If one does
-                not already exist, add a <tref>node reference</tref> for
+                not already exist, add a <tref>node object</tref> for
                 <em>v</em> into <em>node</em> for <em>property</em>.</li>
               <li>Recursively call this algorithm passing <em>v</em> for <em>value</em>, <em>nodeMap</em>,
                 <em>graph</em>, <tref>null</tref> for <em>list</em>, and <em>name</em> for <em>id</em>.</li>
@@ -1986,12 +1991,12 @@
 </pre>
 
   <p>The process of translating this to RDF then operates over each
-    <tref>node definition</tref> to find a subject,
+    <tref>node object</tref> to find a subject,
     each <tref>property</tref> to find an <tref>RDF predicate</tref>,
     and each value of that property to find an <tref>object</tref>.
     In this case, each property has just a single object:
     <code>foaf:name</code> identifies a <tref>literal</tref>, and
-    <code>foaf:knows</code> identifies a second <tref>node definition</tref>
+    <code>foaf:knows</code> identifies a second <tref>node object</tref>
     similar to Turtle's <code>blankNodePropertyList</code>.</p>
 
   <p>After expansion, JSON-LD <tref title="number">numbers</tref>,
--- a/spec/latest/json-ld-syntax/index.html	Sun Dec 02 16:12:47 2012 -0500
+++ b/spec/latest/json-ld-syntax/index.html	Sun Dec 02 19:21:44 2012 -0500
@@ -580,7 +580,7 @@
 -->
 </pre>
 
-<p>Contexts may be used at any time a <tref>node definition</tref> is defined.
+<p>Contexts may be used at any time a <tref>node object</tref> is defined.
   In particular, a <tref>JSON-LD document</tref> may define more than one context,
   as in the following example:</p>
 <pre class="example" data-transform="updateExample"
@@ -612,7 +612,7 @@
   mechanism.</p>
 
 <pre class="example" data-transform="updateExample"
-     title="Scoped contexts within node definitions">
+     title="Scoped contexts within node objects">
 <!--
 {
   ****"@context":
@@ -643,8 +643,8 @@
   the <tref>term</tref> is effectively removed from the list of
   <tref title="term">terms</tref> defined in the <tref>active context</tref>.</p>
 
-<p>A <tref>node definition</tref> may specify multiple contexts, using an
-  <tref>array</tref>, processed in order. The set of contexts defined within a specific <tref>node definition</tref> are
+<p>A <tref>node object</tref> may specify multiple contexts, using an
+  <tref>array</tref>, processed in order. The set of contexts defined within a specific <tref>node object</tref> are
   referred to as <tdef title="local context">local contexts</tdef>. Setting the context to <code>null</code>
   effectively resets the <tref>active context</tref> to an empty context. The
   <tdef>active context</tdef> refers to the accumulation of <tref title="local context">local contexts</tref>
@@ -707,9 +707,9 @@
 intended to be linked to from other data sets.</p>
 
 <p>A <tref>JSON object</tref> used to define property values is called a
-  <tref>node definition</tref>. <tref title="node definition">Node definitions</tref>
+  <tref>node object</tref>. <tref title="node object">node objects</tref>
   do not require an <code>@id</code>.
-  <tref title="node definition">Node definitions</tref> that do not
+  <tref title="node object">node objects</tref> that do not
   contain an <code>@id</code> are known as <tref title="unlabeled node">unlabeled nodes</tref>.</p>
 
 </section>
@@ -842,8 +842,8 @@
 <p>Specifying a <tref>JSON object</tref> with an
   <code>@id</code> key is used to identify that <tref>node</tref> using an
   <tref>IRI</tref>. When the object has only the <code>@id</code>, it
-  is called a <tref>node reference</tref>. This facility may also be used to link to another
-  <tref>node definition</tref> using a mechanism called
+  is called a <tref>node object</tref>. This facility may also be used to link to another
+  <tref>node object</tref> using a mechanism called
   <tref>embedding</tref>, which is covered in the section titled
   <a href="#embedding"></a>.</p>
 
@@ -921,14 +921,14 @@
   <code>http://example.org/people#joebob</code>.</p>
 
 <p>A <tref>JSON object</tref> used to define property values of a <tref>node</tref> is called a
-  <tref>node definition</tref>. <tref title="node definition">Node definitions</tref>
-  do not require an <code>@id</code>. A <tref>node definition</tref>
+  <tref>node object</tref>. <tref title="node object">node objects</tref>
+  do not require an <code>@id</code>. A <tref>node object</tref>
   that does not contain an <code>@id</code> property defines properties of an
   <tref>unlabeled node</tref>.</p>
 
 <p>Once defined, the <tref>node</tref>'s unique identifier can be used to refer to
   it from other parts of the document or from external documents, using
-  a <tref>node definition</tref> that only contains an <code>@id</code> key:</p>
+  a <tref>node object</tref> that only contains an <code>@id</code> key:</p>
 
 <pre class="example" data-transform="updateExample"
      title="Referencing a node using its unique identifier">
@@ -1122,7 +1122,7 @@
     describes a specific syntax to use for expressing Linked Data. This
     includes the use of specific keywords, as identified in <a
     href="#syntax-tokens-and-keywords"></a> for
-    expressing <a title="node definition">node definitions</a>, values,
+    expressing <a title="node object">node objects</a>, values,
     and the <a>context</a>. See <a
     href="#json-ld-grammar"></a> for authoring
     guidelines.</p>
@@ -1481,10 +1481,10 @@
 MUST specify an <tref>IRI</tref> to a valid <tref>JSON-LD document</tref> in an HTTP Link
 Header [[!RFC5988]] using the <code>http://www.w3.org/ns/json-ld#context</code> link relation.
 
-The referenced document MUST have a top-level <tref>node definition</tref>. The
+The referenced document MUST have a top-level <tref>node object</tref>. The
 <code>@context</code> subtree within that object is added to the top-level
-<tref>node definition</tref> of the referencing document. If an <tref>array</tref> is at the top-level of the
-referencing document and its items are <tref title="node definition">node definitions</tref>, the <code>@context</code>
+<tref>node object</tref> of the referencing document. If an <tref>array</tref> is at the top-level of the
+referencing document and its items are <tref title="node object">node objects</tref>, the <code>@context</code>
 subtree is added to all <tref>array</tref> items. All extra information located outside
 of the <code>@context</code> subtree in the referenced document MUST be
 discarded.
@@ -2139,14 +2139,14 @@
   <h2>Embedding</h2>
 
   <p><tdef>Embedding</tdef> is a JSON-LD feature that allows an author to
-    use <tref title="node definition">node definitions</tref> as
+    use <tref title="node object">node objects</tref> as
     <tref>property</tref> values. This is a commonly used mechanism for
     creating a parent-child relationship between two <tref title="node">nodes</tref>.</p>
 
   <p>The example shows two nodes related by a property from the first node:</p>
 
   <pre class="example" data-transform="updateExample"
-       title="Embedding a node definition as property value of another node definition">
+       title="Embedding a node object as property value of another node object">
   <!--
   {
   ...
@@ -2162,7 +2162,7 @@
   </pre>
 
   <p>
-    A <tref>node definition</tref>, like the one used above, may be used in
+    A <tref>node object</tref>, like the one used above, may be used in
     any value position in the body of a JSON-LD document.</p>
 </section>
 
@@ -2309,13 +2309,13 @@
   -->
   </pre>
 
-  <p>In this case, embedding doesn't work as each <tref>node definition</tref>
+  <p>In this case, embedding doesn't work as each <tref>node object</tref>
     references the other. Using the <code>@graph</code> <tref>keyword</tref>
     allows multiple <tref title="node">nodes</tref> to be defined within an
     <tref>array</tref>, and allows the use of a shared <tref>context</tref>.
     This is equivalent to using multiple
-    <tref title="node definition">node definitions</tref> in array and defining
-    the <code>@context</code> within each <tref>node definition</tref>:</p>
+    <tref title="node object">node objects</tref> in array and defining
+    the <code>@context</code> within each <tref>node object</tref>:</p>
 
   <pre class="example" data-transform="updateExample"
     title="Context needs to be duplicated if @graph is not used">
@@ -2599,28 +2599,34 @@
 <p>A <tref>JSON-LD document</tref> MUST be a valid JSON document as described
   in [[!RFC4627]].</p>
 
-<p>A <tref>JSON-LD document</tref> MUST be a single <tref>node definition</tref>
+<p>A <tref>JSON-LD document</tref> MUST be a single <tref>node object</tref>
   or a JSON <tref>array</tref> containing a set of one or more
-  <tref title="node definition">node definitions</tref>.</p>
-
-<section id="grammar-node-definition">
-<h3>Node Definition</h3>
-
-<p>A <tdef>node definition</tdef> represents one or more properties of a
+  <tref title="node object">node objects</tref>.</p>
+
+<section id="grammar-node-object">
+<h3>Node Object</h3>
+
+<p>A <tdef>node object</tdef> represents zero or more properties of a
   <tref>node</tref> in the <tref>JSON-LD graph</tref> serialized by the
   <tref>JSON-LD document</tref>.
+  
+  A <tref>JSON Object</tref> is a <tref>node object</tref> if
+  it exists outside of the JSON-LD Context and:</p>
+  
+  <ul>
+    <li>it does not contain the <code>@value</code>, <code>@list</code>, 
+    or <code>@set</code> keywords, or</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>
+
   The properties of a <tref>node</tref> in the <tref>JSON-LD graph</tref>
-  may be spread among different <tref title="node definition">node definitions</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 definition">node definitions</tref>
+  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>In a JSON-LD document, a <tref>JSON object</tref> is a
-  <tref>node definition</tref> if it does not contain the keys
-  <code>@value</code>, <code>@list</code> or <code>@set</code>
-  and it has one or more keys other than <code>@id</code>.</p>
-
-<p>A <tref>node definition</tref> MUST be a <tref>JSON object</tref> that contains
+<p>A <tref>node object</tref> MUST be a <tref>JSON object</tref> that contains
   one or more key-value pairs. Keys MUST either be
   <tref title="IRI">IRIs</tref>,
   <tref title="compact IRI">compact IRIs</tref>,
@@ -2632,7 +2638,7 @@
   <li><code>@id</code>, or</li>
   <li><code>@type</code></li>
 </ul>
-<p>If the <tref>node definition</tref> contains the <code>@context</code>
+<p>If the <tref>node object</tref> contains the <code>@context</code>
   key, its value MUST be one of the following:</p>
 <ul>
   <li>an <tref>IRI</tref>,</li>
@@ -2640,7 +2646,7 @@
   <li>an <tref>array</tref> composed of any number of the previous two expressions.</li>
 </ul>
 
-<p>If the <tref>node definition</tref> contains the <code>@id</code>
+<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>unlabeled node</tref> identifiers), or
@@ -2650,7 +2656,7 @@
   and <a href="#identifying-unlabeled-nodes"></a> for further discussion on
   <code>@id</code> values.</p>
 
-<p>If the <tref>node definition</tref> contains the <code>@type</code>
+<p>If the <tref>node object</tref> contains the <code>@type</code>
   key, its value MUST be either
   an <tref>absolute IRI</tref>,
   a <tref>compact IRI</tref> (excluding <tref>unlabeled node</tref> identifiers),
@@ -2659,11 +2665,11 @@
   See <a href="#specifying-the-type"></a> for further discussion on
   <code>@type</code> values.</p>
 
-<p>If the <tref>node definition</tref> contains the <code>@graph</code>
+<p>If the <tref>node object</tref> contains the <code>@graph</code>
   key, its value MUST be
-  a <tref>node definition</tref> or
-  an <tref>array</tref> of zero or more <tref title="node definition">node definitions</tref>.
-  If the <tref>node definition</tref> contains an <code>@id</code> keyword,
+  a <tref>node object</tref> or
+  an <tref>array</tref> of zero or more <tref title="node object">node objects</tref>.
+  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>
@@ -2671,17 +2677,17 @@
 <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
   <tref>JSON object</tref> is the root of the JSON-LD document, the
-  <tref>JSON object</tref> is not treated as a <tref>node definition</tref>; this
-  is used as a way of defining <tref title="node definition">node
+  <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
   definitions</tref> that may not form a connected graph. This allows a
   <tref>context</tref> to be defined which is shared by all of the constituent
-  <tref title="node definition">node definitions</tref>.</p>
+  <tref title="node object">node objects</tref>.</p>
 
 <p>A <tref>JSON-LD document</tref> MUST NOT contain any <tref>keyword</tref> or
   alias that expands to another keyword.</p>
 <!-- tidoust: clarify? -->
 
-<p>Keys in a <tref>node definition</tref> that are not
+<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
   MUST be one of the following:</p>
@@ -2692,8 +2698,7 @@
   <li><tref>true</tref>,</li>
   <li><tref>false</tref>,</li>
   <li><tref>null</tref>,</li>
-  <li><tref>node reference</tref>,</li>
-  <li><tref>node definition</tref>,</li>
+  <li><tref>node object</tref>,</li>
   <li><tref>expanded typed value</tref>,</li>
   <li><tref>expanded language-tagged string</tref>,</li>
   <li><tref>list</tref> or <tref>set</tref>,</li>
@@ -2703,28 +2708,6 @@
 
 </section>
 
-<section id="grammar-node-reference">
-<h2>Node Reference</h2>
-
-<p>A <tdef>node reference</tdef> allows authors to reference a <tref>node</tref>
-  in the graph by its unique identifier.</p>
-
-<p>A <tref>node reference</tref> MUST be a <tref>JSON object</tref> that contains a
-  single key-value pair where the key is <code>@id</code> (or an alias for
-  <code>@id</code>, see <a href="#aliasing-keywords"></a>).</p>
-
-<p>The value of the <code>@id</code> key in a <tref>node reference</tref> MUST be
-  an <tref>IRI</tref>,
-  a <tref>compact IRI</tref> (including <tref>unlabeled node</tref> identifiers), or
-  a <tref>term</tref> defined in the <tref>active context</tref> expanding
-  into an <tref>IRI</tref> or an <tref>unlabeled node</tref> identifier.</p>
-
-<p>See <a href="#node-identifiers"></a>, <a href="#compact-iris"></a>,
-  and <a href="#identifying-unlabeled-nodes"></a> for further discussion on
-  <code>@id</code> values.</p>
-
-</section>
-
 <section id="grammar-term-reference">
   <h2>Term</h2>
   <p>A <tdef>term</tdef> is a short-hand <tref>string</tref> that expands
@@ -2749,7 +2732,7 @@
   way that allows easy programmatic access.</p>
 
 <p>A <tref>language map</tref> may be used as a term value within a
-  <tref>node definition</tref> if the term is defined with
+  <tref>node object</tref> if the term is defined with
   <code>@container</code> set to <code>@language</code>.</p>
 
 <p>The keys of a <tref>language map</tref> MUST be [[BCP47]] <tref title="string">strings</tref>
@@ -2760,8 +2743,7 @@
   <li><tref>true</tref>,</li>
   <li><tref>false</tref>,</li>
   <li><tref>null</tref>,</li>
-  <li><tref>node reference</tref>,</li>
-  <li><tref>node definition</tref>,</li>
+  <li><tref>node object</tref>,</li>
   <li><tref>expanded typed value</tref>,</li>
   <li><tref>list</tref> or <tref>set</tref>, or</li>
   <li>an <tref>array</tref> zero or more of these</li>
@@ -2825,8 +2807,7 @@
   <li><tref>true</tref>,</li>
   <li><tref>false</tref>,</li>
   <li><tref>null</tref>,</li>
-  <li><tref>node reference</tref>,</li>
-  <li><tref>node definition</tref>,</li>
+  <li><tref>node object</tref>,</li>
   <li><tref>expanded typed value</tref>, or</li>
   <li><tref>expanded language-tagged string</tref></li>
 </ul>
@@ -2836,7 +2817,7 @@
 
 <section id="grammar-context">
 <h2>Context Definition</h2>
-<p>A <tdef>context definition</tdef> defines a <tref>local context</tref> in a <tref>node definition</tref>.</p>
+<p>A <tdef>context definition</tdef> defines a <tref>local context</tref> in a <tref>node object</tref>.</p>
 
 <p>A <tref>context definition</tref> MUST be a <tref>JSON object</tref>
   containing one or more key-value pairs. Keys MUST either be
@@ -2853,7 +2834,7 @@
 <p>An <tdef>expanded term definition</tdef> is used to describe the mapping
   between a <tref>term</tref> and its expanded identifier, as well as other
   properties of the value associated with the <tref>term</tref> when it is
-  used as key in a <tref>node definition</tref>.</p>
+  used as key in a <tref>node object</tref>.</p>
 
 <p>An <tref>expanded term definition</tref> MUST be a <tref>JSON object</tref>
   composed of zero or more keys from <code>@id</code>,
@@ -3063,7 +3044,7 @@
 described below.</p>
 
 <pre class="example" data-transform="updateExample"
-     title="Same description in JSON-LD (context shared among node definitions)">
+     title="Same description in JSON-LD (context shared among node objects)">
 <!--
 {
   "@context":