--- a/spec/latest/json-ld-api/index.html Tue Dec 20 00:07:26 2011 -0500
+++ b/spec/latest/json-ld-api/index.html Sun Dec 25 22:40:35 2011 -0800
@@ -2,7 +2,7 @@
<html>
<head>
<title>The JSON-LD API 1.0</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<!--
=== NOTA BENE ===
For the three scripts below, if your spec resides on dev.w3 you can check them
@@ -12,7 +12,6 @@
src="http://dev.w3.org/2009/dap/ReSpec.js/js/respec.js" class="remove">
</script>
<script type="text/javascript" class="remove">
-
var preProc = {
apply: function(c) {
// extend the bibliography entries
@@ -690,7 +689,8 @@
<dl>
<dt><tdef>initial context</tdef></dt>
<dd>
- a context that is specified to the algorithm before processing begins.
+ a context that is specified to the algorithm before processing begins. The contents of the
+ initial context is defined in <a href="#appendix-a">Appendix A</a>.
</dd>
<dt><tdef>active subject</tdef></dt>
<dd>
@@ -780,11 +780,11 @@
<li>Let <em>value</em> be the value of <code>@context</code>
<ol id="process-context" class="algorithm">
<li>If <em>value</em> is an <tref>array</tref>, process
- each element as <em>value</em>, in order using <a href="#process-context">Step 2</a>.
+ each element as <em>value</em>, in order using <a href="#process-context">Step 2</a>.</li>
<li>If <em>value</em> is a simple <tref>string</tref>, it MUST have a lexical form of IRI.
<ol class="algorithm">
<li>Set <em>value</em> to the result of performing <a href="#iri-expansion">IRI Expansion</a>
- on <em>value</em>.
+ on <em>value</em></li>.
<li>If <em>value</em> is not an absolute IRI, abort this processing step.
Otherwise, Dereference <em>value</em>.</li>
<li>If the resulting document is a JSON document, extract the top-level <code>@context</code>
@@ -1002,6 +1002,7 @@
according to the <a href="#value-expansion">Value Expansion</a> rules.
If the value does not need to be coerced, leave the value as-is.</li>
</ol>
+ </li>
<li>Remove the context from the object.</li>
</ol>
</li>
@@ -1377,10 +1378,12 @@
</li>
</ol></li>
</ol>
+ </li>
<li>If the <tref>JSON-LD output</tref> is <code>null</code> set it to
the item, otherwise, append the item to the
<tref>JSON-LD output</tref>.</li>
</ol>
+ </li>
<li>Return the <tref>JSON-LD output</tref>.</li>
</ol>
@@ -1679,14 +1682,15 @@
key-value pair into the <tref>node state map</tref> where the key is the
key from the <tref>map of flattened nodes</tref> and the value is a
<tref>node state</tref> where its <tref>node reference</tref> refers to
- the value from the <tref>map of flattened nodes</tref>.
+ the value from the <tref>map of flattened nodes</tref>.</li>
<li>Populate the <tref>incoming list</tref> for each <tref>node state</tref>
by iterating over every node in the graph and adding its <tref>label</tref>
to the <tref>incoming list</tref> associated with each node found in its
properties.</li>
<li>For every entry in the <tref>node state map</tref> that has a
<tref>label</tref> that begins with <code>_:c14n</code>, relabel the node using the
- <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. <li>Label all
+ <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>.</li>
+ <li>Label all
of the nodes that contain a <code>@id</code> key associated with a value
starting with <code>_:</code> according to the steps in the <a
href="#deterministic-labeling-algorithm">Deterministic Labeling Algorithm</a>.</li>
@@ -1701,7 +1705,7 @@
in the <tref>node state map</tref>. The <tdef>old label</tdef> and the
<tref>normalization state</tref> must be given as an input to the
algorithm. The <tref>old label</tref> is the current <tref>label</tref> of
-the node that is to be relabeled.
+the node that is to be relabeled.</p>
<p>The node relabeling algorithm is as follows:</p>
@@ -1733,7 +1737,7 @@
<p>The deterministic labeling algorithm takes the
<tref>normalization state</tref>
and produces a <tdef>list of finished nodes</tdef> that is sorted and
-contains deterministically named and expanded nodes from the graph.
+contains deterministically named and expanded nodes from the graph.</p>
<ol class="algorithm">
<li>Set the <tref>labeling prefix</tref> to <code>_:c14n</code>, the
@@ -1839,38 +1843,37 @@
at the offset against the item at the same offset in the
<tref>beta list</tref> according to the
<a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
- The node associated with the lesser item is first.
- </ol></li>
+ The node associated with the lesser item is first.</li>
+ </ol>
+ </li>
<li>Process the <tref>incoming list</tref>s associated with each node to
determine order:
<ol class="algorithm">
<li>The node with the shortest <tref>incoming list</tref> is first.</li>
<li>Sort the <tref>incoming list</tref>s according to incoming property
- and then incoming <tref>label</tref>.
+ and then incoming <tref>label</tref>.</li>
<li>The node associated with the fewest number of incoming nodes is
first.</li>
<li>For each offset into the <tref>incoming list</tref>s,
compare the associated properties and <tref>label</tref>s:
<ol class="algorithm">
<li>The node associated with a <tref>label</tref> that does not begin with
- <code>_:</code> is first.
- </li>
+ <code>_:</code> is first.</li>
<li>If the nodes' <tref>label</tref>s do not begin with
<code>_:</code>, then the node associated with the
lexicographically lesser <tref>label</tref> is first.</li>
- </li>
<li>The node associated with the lexicographically lesser associated
- property is first.
- </li>
+ property is first.</li>
<li>The node with the <tref>label</tref> that does not begin with
- <code>_:c14n</code> is first.
- </li>
+ <code>_:c14n</code> is first.</li>
<li>The node with the lexicographically lesser <tref>label</tref>
- is first.
- </li>
+ is first.</li>
</ol>
- </ol></li>
+ </li>
+ </ol>
+ </li>
<li>Otherwise, the nodes are equivalent.</li>
+</ol>
</section>
<section>
@@ -1997,13 +2000,13 @@
<a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
Provide <tref>alpha</tref>'s <tref>node state</tref>, a new
<tref>mapping state</tref>,
- <code>outgoing direction</code> to the algorithm as inputs.
+ <code>outgoing direction</code> to the algorithm as inputs.</li>
<li>If the <tref>outgoing serialization map</tref> for <tref>beta</tref>
is empty, generate the serialization according to the
<a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
Provide <tref>beta</tref>'s <tref>node state</tref>, a new
<tref>mapping state</tref>, and
- <code>outgoing direction</code> to the algorithm as inputs.
+ <code>outgoing direction</code> to the algorithm as inputs.</li>
<li>If <tref>alpha</tref>'s <tref>outgoing serialization</tref> is
lexicographically less than <tref>beta</tref>'s, then
<tref>alpha</tref> is first. If it is greater, then <tref>beta</tref>
@@ -2015,7 +2018,7 @@
<tref>mapping state</tref> with its <tref>serialized labels map</tref>
set to a copy of <tref>alpha</tref>'s
<tref>outgoing serialization map</tref>, and
- <code>incoming direction</code> to the algorithm as inputs.
+ <code>incoming direction</code> to the algorithm as inputs.</li>
<li>If the <tref>incoming serialization map</tref> for <tref>beta</tref>
is empty, generate the serialization according to the
<a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
@@ -2023,7 +2026,7 @@
<tref>mapping state</tref> with its <tref>serialized labels map</tref>
set to a copy of <tref>beta</tref>'s
<tref>outgoing serialization map</tref>, and
- <code>incoming direction</code> to the algorithm as inputs.
+ <code>incoming direction</code> to the algorithm as inputs.</li>
<li>If <tref>alpha</tref>'s <tref>incoming serialization</tref> is
lexicographically less than <tref>beta</tref>'s, then
<tref>alpha</tref> is first. If it is greater, then <tref>beta</tref>
@@ -2383,6 +2386,7 @@
<li>Append the <tref>object string</tref> to the
<tref>label serialization</tref>.</li>
</ol>
+ </li>
</ol>
</li>
<li>Append the <code>]</code> character to the
@@ -2399,13 +2403,14 @@
incoming reference and <strong>REFERER</strong> is either the subject of
the node referring to the <tref>label</tref> in the incoming reference
or <code>_:</code> if <strong>REFERER</strong> begins with
- <code>_:</code>.
+ <code>_:</code>.</li>
<li>If this is the second iteration of the loop,
append a <code>|</code> separator character to the
<tref>label serialization</tref>.</li>
<li>Append the <tref>reference string</tref> to the
<tref>label serialization</tref>.</li>
</ol>
+ </li>
<li>Append the <code>]</code> character to the
<tref>label serialization</tref>.</li>
<li>Append all <tref>adjacent node labels</tref> to the
@@ -2416,7 +2421,7 @@
<li>Push the <tref>adjacent node labels</tref> onto the
<tref>key stack</tref> and append the result of the
<a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>
- to the <tref>label serialization</tref>.
+ to the <tref>label serialization</tref>.</li>
</ol>
</section>
@@ -2761,6 +2766,8 @@
</li>
</ol>
</section>
+</section>
+</section>
<section class="appendix">
<h1>Acknowledgements</h1>