Changed "string representation" to either "canonical lexical form" or "expanded form".
authorGregg Kellogg <gregg@kellogg-assoc.com>
Fri, 09 Nov 2012 16:03:12 -0800
changeset 941 504a4a31e79d
parent 940 d334176ef23e
child 942 d88905f128b0
Changed "string representation" to either "canonical lexical form" or "expanded form".
Defined "compacted form" and "expanded IRI form" (which also includes named blank nodes.
This addresses issue #192
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Thu Nov 08 20:54:32 2012 +0100
+++ b/spec/latest/json-ld-api/index.html	Fri Nov 09 16:03:12 2012 -0800
@@ -254,8 +254,8 @@
 context could change as well. To ensure that the data can be given a more
 uniform structure, JSON-LD introduces the notion of expansion.
 <tdef>Expansion</tdef> performs two important operations. The first is to
-expand all values that are <tref>IRI</tref>s to their fully expanded form.
-The second is to express all values in <tdef>expanded form</tdef>. To
+expand all values that are <tref title="IRI">IRIs</tref> to be <tref title="absolute IRI">absolute IRIs</tref>.
+The second is to express all values in <tref>expanded form</tref>. To
 transform both inputs above to the same representation, the developer could
 do the following:
   </p>
@@ -497,7 +497,7 @@
       optional <em>query</em> and fragment segments.</dd>
     <dt><tdef>Relative IRI</tdef></dt>
     <dd>A relative IRI is an IRI that is relative some other <tref>absolute IRI</tref>;
-      in the case of JSON-LD this is the base location of the document.</dt>
+      in the case of JSON-LD this is the base location of the document.</dd>
     <dt><tdef>Linked Data</tdef></dt>
     <dd>A technique for creating a network of inter-connected data across different documents and Web sites.</dd>
     <dt><tdef>JSON-LD graph</tdef></dt>
@@ -539,7 +539,7 @@
     <dd>A piece of information that contains four items; a <tref>subject</tref>, a <tref>property</tref>,
       an <tref>object</tref>, and a <tref>graph name</tref>.</dd>
     <dt><tdef>literal</tdef></dt>
-    <dd>An <tref>object</tref> expressed as a value such as a string, number or in expanded form.</dd>
+    <dd>An <tref>object</tref> expressed as a value such as a <tref>string</tref>, <tref>number</tref> or in <tref>expanded form</tref>.</dd>
   </dl>
  </section>
 
@@ -826,9 +826,9 @@
 
     <section>
     <h3>IRI</h3>
-    <p>The <a>IRI</a> datatype is a string representation of an <tref>IRI</tref>.</p>
+    <p>The <a>IRI</a> datatype is a represents an <tref>IRI</tref>.</p>
     <div title="typedef DOMString IRI" class="idl">
-      This datatype indicates that the <em>string</em> is interpreted as an Internationalized
+      This datatype indicates that <em>IRI</em> is interpreted as an Internationalized
       Resource Identifier [[!RFC3987]] identifying a document, which when parsed as JSON yields
       either a <tref>JSON object</tref> or <tref>array</tref>.
     </div>
@@ -1203,16 +1203,18 @@
 <section>
   <h2>IRI Expansion</h2>
   <p>Keys and some values are evaluated to produce an <tref>IRI</tref>. This section defines an algorithm for
-    transforming a value representing an IRI into an actual IRI. If <tref>IRI</tref> expansion
+    transforming a value representing an IRI into an <tref>absolute IRI</tref>. If <tref>IRI</tref> expansion
     occurs during context processing, the <tref>local context</tref> that is being processed
-    is passed to this algorithm.</p>
+    is passed to this algorithm. After application of this algorithm, values processed by this
+    algorithm are said to be in <tdef>expanded IRI form</tdef>, although this may also include
+    named <tref title="blank node">blank nodes</tref>.</p>
 
   <p>The algorithm for generating an IRI is:
     <ol class="algorithm">
       <li>If a <tref>local context</tref> is being processed and the value is in the
         <tref>local context</tref> but the value's processing state is not <em>finished</em>, then
         process the value using <a href="#context-process-property">step 2.4.3.1</a> of the
-        <a href="#context">Context Processing algorithm</a>.
+        <a href="#context">Context Processing algorithm</a>.</li>
       <li>If the <tref>active context</tref> contains a <tref>term</tref> mapping for the value using
         a case-sensitive comparison, use the mapped value as an IRI, unless a <tref>local context</tref>
         is being processed, in which case, return the result of recursing to expand the mapped value.</li>
@@ -1221,7 +1223,7 @@
       <li>If a <tref>local context</tref> is being processed and the <em>prefix</em> is in the
         <tref>local context</tref> but it's processing state is not <em>finished</em>, then
         process the <em>prefix</em> using <a href="#context-process-property">step 2.4.3.1</a> of the
-        <a href="#context">Context Processing algorithm</a>.
+        <a href="#context">Context Processing algorithm</a>.</li>
       <li>If the <tref>active context</tref> contains a <tref>term</tref> mapping for <em>prefix</em> using
         a case-sensitive comparison, and <em>suffix</em> does not does not begin with '//'
         (i.e., it does not match a <em>hier-part</em> including
@@ -1373,8 +1375,10 @@
 
 <section>
   <h2>Value Expansion</h2>
-  <p>Some values in JSON-LD can be expressed in a compact form. These values
-    are required to be expanded at times when processing JSON-LD documents.</p>
+  <p>Some values in JSON-LD can be expressed in a <tref>compacted form</tref>. These values
+    are required to be expanded at times when processing JSON-LD documents.
+    A value is said to be in <tdef>expanded form</tdef> after
+    the application of this algorithm.</p>
 
   <p>The algorithm for expanding a <em>value</em> takes an <tref>active property</tref>
     and <tref>active context</tref>. It is implemented as follows:</p>
@@ -1401,11 +1405,12 @@
 <section>
   <h2>Value Compaction</h2>
   <p>Some values, such as <tref title="IRI">IRIs</tref> and <tref title="typed literal">typed literals</tref>, may be expressed in an
-    expanded form (<tdef>expanded value</tdef>) in JSON-LD. These values are required to be compacted at
-    times when processing JSON-LD documents.
+    <tref>expanded form</tref> (<tdef>expanded value</tdef>) in JSON-LD. These values are required to be compacted at
+    times when processing JSON-LD documents. A value is said to be in <tdef>compacted form</tdef> after
+    the application of this algorithm on an <tref>expanded value</tref>.
   </p>
 
-  <p>The algorithm for compacting an expanded value <em>value</em> takes an <tref>active property</tref>
+  <p>The algorithm for compacting an <tref>expanded value</tref> <em>value</em> takes an <tref>active property</tref>
     and <tref>active context</tref>. It is implemented as follows:</p>
   <ol class="algorithm">
     <li>If <em>value</em> only has one property and the <tref>active context</tref> has no default language,
@@ -2062,14 +2067,14 @@
           If <em>element</em> has a <code>@value</code> property:
           <ol class="algorithm">
             <li>If the value of <code>@value</code> is a <tref>number</tref>, set the
-              <tref>active object</tref> to a <tref>typed literal</tref> using a string representation
+              <tref>active object</tref> to a <tref>typed literal</tref> using a <tref>canonical lexical form</tref>
               of the value as defined in the section <a href="#data-round-tripping">Data Round Tripping</a>.
               Set datatype to the value of the <code>@type</code> property if it exists, otherwise
               either <code>xsd:integer</code> or <code>xsd:double</code>, depending
               on if the value contains a fractional and/or an exponential component.</li>
             <li>Otherwise, if the value of <code>@value</code> is <strong>true</strong> or <strong>false</strong>,
               set the <tref>active object</tref> to a <tref>typed literal</tref> created from the
-              string representation of the value. Set datatype to the value of the <code>@type</code>
+              <tref>canonical lexical form</tref> of the value. Set datatype to the value of the <code>@type</code>
               property if it exists, otherwise <code>xsd:boolean</code>.</li>
             <li>
               Otherwise, if <em>element</em> contains a <code>@type</code> property, set the
@@ -2101,7 +2106,7 @@
         </li>
         <li id="processing-step-subject">If <em>element</em> has a <code>@id</code> property,
           the value MUST be a <tref>string</tref>, set the <tref>active subject</tref> to the previously
-          expanded value (either a <tref>blank node</tref> or an <ldtref>IRI</ldtref>).</li>
+          <tref>expanded value</tref> (either a <tref>blank node</tref> or an <ldtref>IRI</ldtref>).</li>
         <li>
           Otherwise, if <em>element</em> does not have a <code>@id</code> property, set the <tref>active
           subject</tref> to newly generated <tref>blank node</tref>.</li>
@@ -2212,7 +2217,7 @@
         <li>If <em>property</em> is <code>rdf:first</code>,
           use the entry in <em>graph.listMap</em> indexed by <em>subject</em>,
           initializing it to a new <tref>JSON object</tref> if nesessary. Represent
-          <em>object</em> in expanded form, as described in
+          <em>object</em> in <tref>expanded form</tref>, as described in
           <a href="#value-expansion">Value Expansion</a>. Add the
           resulting <em>object representation</em> to the entry indexed by
           <em>first</em>, and skip to the next quad.</li>
@@ -2230,16 +2235,16 @@
           does not contain an entry for <em>name</em>,
           create a new entry for <em>name</em> from a new
           <tref>JSON object</tref> with key/value pair of <code>@id</code> and
-          a string representation of <em>name</em>.</li>
+          <em>name</em> represented in <tref>expanded IRI form</tref>.</li>
         <li>Set <em>value</em> as the entry from <em>graph.nodes</em> for
           <em>subject</em>, initializing it to a new
           <tref>JSON object</tref> with key/value pair of <code>@id</code> and
-          a string representation of <em>subject</em> if necessary.</li>
+          <em>subject</em> represented in <tref>expanded IRI form</tref> if necessary.</li>
         <li>If <em>property</em> is <code>rdf:type</code> and the
           <code class="idlMemberName"><a href="#widl-JsonLdOptions-useRdfType">useRdfType</a></code>
           option is not present or <tref>false</tref>:
           <ol class="algorithm">
-            <li>Append the string representation of <em>object</em> to the array value for the
+            <li>Append <em>object</em> represented in <tref>expanded IRI form</tref> to the array value for the
               key <code>@type</code>, creating an entry in <em>value</em> if necessary.</li>
           </ol>
         </li>
@@ -2270,16 +2275,16 @@
 
         <li>Otherwise, if <em>object</em> is <code>rdf:nil</code>:
           <ol class="algorithm">
-            <li>Let <em>key</em> be the string representation of <em>property</em>.</li>
+            <li>Let <em>key</em> be <em>property</em> expressed in <tref>expanded IRI form</tref>.</li>
             <li>Append an empty <code>@list</code> representation to the array value for
               <em>key</em>, creating an entry in <em>value</em> if necessary.</li>
           </ol>
         </li>
         <li>Otherwise,
           <ol class="algorithm">
-            <li>Let <em>key</em> be the string representation of <em>property</em> and let
+            <li>Let <em>key</em> be <em>property</em> expressed in <tref>expanded IRI form</tref> and let
               <em>object representation</em>
-              be <em>object</em> represented in expanded form as described in
+              be <em>object</em> represented in <tref>expanded form</tref> as described in
               <a href="#value-expansion">Value Expansion</a>.</li>
             <li>If <em>object</em> is a <tref>blank node</tref>,
               use the entry in <em>graph.listMap</em> indexed by <em>object</em>,
@@ -2333,11 +2338,11 @@
 <p>When <a href="#rdf-conversion">converting JSON-LD to RDF</a> JSON-native types such as
   <em>numbers</em> and <em>booleans</em> are automatically coerced to <strong>xsd:integer</strong>,
   <strong>xsd:double</strong>, or <strong>xsd:boolean</strong>. Implementers MUST ensure that the
-  result is a canonical lexical form in the form of a <tref>string</tref>. A
+  result is in <tref>canonical lexical form</tref>. A
   <tdef>canonical lexical form</tdef> is a set of literals from among the valid set of literals for
-  a datatype such that there is a one-to-one mapping between the canonical lexical form and a value
+  a datatype such that there is a one-to-one mapping between the <tref>canonical lexical form</tref> and a value
   in the value space as defined in [[!XMLSCHEMA11-2]]. In other words, every value MUST be converted
-  to a deterministic string representation.</p>
+  to a deterministic <tref>string</tref> representation.</p>
 
 <p>The canonical lexical form of an <em>integer</em>, i.e., a number without fractions
   or a number coerced to <strong>xsd:integer</strong>, is a finite-length sequence of decimal