Fixed merge conflicts in latest spec, added Compaction Algorithm section.
authorManu Sporny <msporny@digitalbazaar.com>
Thu, 04 Aug 2011 08:54:28 -0400
changeset 103 2ef62cb29d75
parent 100 0872ff171f11 (current diff)
parent 102 4539526bc736 (diff)
child 104 a3dea7fdba0a
Fixed merge conflicts in latest spec, added Compaction Algorithm section.
spec/latest/index.html
--- a/requirements/latest/index.html	Thu Aug 04 08:44:38 2011 -0400
+++ b/requirements/latest/index.html	Thu Aug 04 08:54:28 2011 -0400
@@ -265,7 +265,7 @@
     <dt>Structured Data</dt><dd>
       Structured Data describes general means of describing inter-relationships between entities in a way that can be
       described using a graph or tree structure. JSON is an example of a grammar for describing Structured Data. In
-      the context of JSON-LD, Structured Data refers to JSON objects in which the subject may not have a IRI, or
+      the context of JSON-LD, Structured Data refers to JSON objects in which the subject may not have an IRI, or
       where the IRI is not dereferencable, or does not retrieve a representation of the object to which it refers.
     </dd>
     <dt><tdef>JSON Object</tdef></dt><dd>
@@ -293,7 +293,7 @@
       <li><tdef>Linked Data</tdef> is a set of documents, each containing a representation of a linked data graph.</li>
       <li>A <tdef>linked data graph</tdef> is a labeled directed graph, where nodes are <tref>subject</tref>s or <tref>object</tref>s, and edges are properties.</li>
       <li>A <tdef>subject</tdef> is any node in a <tref>linked data graph</tref> with at least one outgoing edge.</li>
-      <li>A <tref>subject</tref> SHOULD be labeled with a IRI.</li>
+      <li>A <tref>subject</tref> SHOULD be labeled with an IRI.</li>
       <li>A <tdef>property</tdef> is an edge of the <tref>linked data graph</tref>.</li>
       <li>A <tref>property</tref> SHOULD be labeled with an IRI.</li>
       <li>An <tdef>object</tdef> is a node in a <tref>linked data graph</tref> with at least one incoming edge.</li>
@@ -315,30 +315,31 @@
     </p>
   </section>
   <section><h2>JSON-LD</h2>
-    <p>The following are taken to be requirements for creating <tref>Linked Data</tref> in JSON.</p>
+    <p>The following are taken to be requirements and principles for creating <tref>Linked Data</tref> in JSON.</p>
     <ol>
       <li>A JSON-LD document MUST be able to express a <tref>linked data graph</tref>.</li>
       <li>
         A JSON-LD document uses <trefs>JSON object</trefs>s, arrays, numbers, strings and
         other literal names to express semantic information.
       </li>
-      <li>
-        <trefs>JSON object</trefs>s, arrays, numbers, strings and literal names MUST resolve to nodes in
-        a <tref>linked data graph</tref>..
-      </li>
-      <li>A <tref>subject</tref> is represented with a <tref>JSON object</tref>.</li>
+      <li>A <tref>subject</tref> is defined using a designated name/value pair of a <tref>JSON object</tref>.</li>
       <li>There MUST be a way label a <tref>JSON object</tref> with an IRI.</li>
       <li>There MAY be a way to reference an un-labeled JSON object that does not have a direct child relationship.</li>
-      <li>JSON name/value pairs are used to describe property-object relationships.</li>
-      <li>There MUST be a way to associate a IRI with the name in a JSON name/value pair.</li>
-      <li>JSON strings MAY represent literals.</li>
-      <li>JSON strings MAY represent IRIs.</li>
-      <li>There MUST be a way to determine if a JSON value represents a IRI.</li>
+      <li>JSON name/value SHOULD be used to describe <tref>property</tref>-<tref>object</tref> relationships.</li>
+      <li>A <tref>property</tref> SHOULD resolve to an absolute IRI.</li>
+      <li>
+        An <tref>object</tref> is represented using
+        <trefs>JSON object</trefs>s, arrays, numbers, strings and literal names resolve to nodes in
+        a <tref>linked data graph</tref>.
+      </li>
+      <li>Uncoerced JSON strings represent literal <tref>object</tref>s.</li>
+      <li>Coerced JSON strings MAY represent IRIs.</li>
       <li>There SHOULD be a way to associate a datatype IRI with a literal JSON value.</li>
-      <li>JSON booleans, numbers and other literal values represent specific datatyped literals.</li>
+      <li>JSON booleans, numbers and other literal values MUST represent specific datatyped literals.
+        <span class="issue">what does null map to?</span></li>
       <li>A JSON array MAY be used to associate multiple <tref>object</tref>s with a <tref>subject</tref> through a common <tref>property</tref>.</li>
       <li>A JSON array MUST NOT be used to imply an order to the component entities.</li>
-      <li>A JSON-LD document SHOULD be able to express ordered object relationships.</li>
+      <li>A JSON-LD document SHOULD be able to express and ordered list objects.</li>
     </ol>
   </section>
 </section>
--- a/spec/latest/index.html	Thu Aug 04 08:44:38 2011 -0400
+++ b/spec/latest/index.html	Thu Aug 04 08:54:28 2011 -0400
@@ -1724,6 +1724,31 @@
 </section>
 
 <section>
+<h2>Compaction</h2>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>As stated previously, compaction is the process of taking a JSON-LD 
+input and compacting all IRIs using a given context. The output
+will contain a single top-level context declaration and will only use
+<tref>term</tref>s and <tref>prefix</tref>es and will ensure that all
+typed literals are fully compacted.
+</p>
+
+<section>
+<h3>Compaction Algorithm</h3>
+
+<ol class="algorithm">
+  <li>Perform the <a href="#compaction-algorithm">Compaction Algorithm</a> on 
+  the <tref>JSON-LD input</tref>.</li>
+  <li>Using the <tref>input context</tref>, compress each key/value pair.</li>
+</ol>
+</section>
+
+</section>
+
+
+<section>
 <h2>Framing</h2>
 <p class="issue">TBD: Explain framing algorithm.</p>
 </section>