--- a/spec/latest/json-ld-api/index.html Wed Mar 28 19:42:32 2012 +0800
+++ b/spec/latest/json-ld-api/index.html Wed Mar 28 20:37:53 2012 +0800
@@ -923,77 +923,72 @@
initializing the <tref>active context</tref> with the <tref>initial context</tref>.
If a <tref>local context</tref> is encountered,
information from the <tref>local context</tref> is merged into the <tref>active context</tref>.</p>
- <p>The <tref>active context</tref> is used for expanding keys and values of a <tref>JSON object</tref> (or elements
+ <p>The <tref>active context</tref> is used for expanding properties and values of a <tref>JSON object</tref> (or elements
of a list (see <span a="#list-processing">List Processing</span>)) using a <tdef>term mapping</tdef>.
It is also used to maintain
<tdef>coercion mapping</tdef>s from terms to datatypes, <tdef>language mapping</tdef>s from terms to language codes,
and <tdef>list mapping</tdef>s and <tdef>set mapping</tdef>s for terms. Processors MUST use the
- lexical form of the key when creating a mapping, as lookup is performed on lexical key representations, not
+ lexical form of the property when creating a mapping, as lookup is performed on lexical representations, not
expanded IRI representations.</p>
- <p>A <tref>local context</tref> is identified within a <tref>JSON object</tref> having a key of
- <code>@context</code> with <tref>string</tref>, <tref>array</tref> or a <tref>JSON object</tref> value.
+ <p>A <tref>local context</tref> is identified within a <tref>JSON object</tref> having a <code>@context</code>
+ property with a <tref>string</tref>, <tref>array</tref> or a <tref>JSON object</tref> value.
When processing a <tref>local context</tref>, special processing rules apply:</p>
<ol class="algorithm">
<li>Create a new, empty <tref>local context</tref>.</li>
- <li>Let <em>value</em> be the value of <code>@context</code>
- <ol id="process-context" class="algorithm">
- <li>If <em>value</em> equals <tref>null</tref>, reset the <tref>active context</tref> to the <tref>initial context</tref></li>
- <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>.</li>
- <li>If <em>value</em> is a simple <tref>string</tref>, it MUST have a lexical form of <tref>absolute IRI</tref>.
+ <li>Let <em>context</em> be the value of <code>@context</code>
+ <ol class="algorithm">
+ <li id="process-context">If <em>context</em> equals <tref>null</tref>, reset the <tref>active context</tref>
+ to the <tref>initial context</tref>.</li>
+ <li>If <em>context</em> is an <tref>array</tref>, process each element as <em>context</em> in order
+ by starting at <a href="#process-context">Step 2.1</a>.</li>
+ <li>If <em>context</em> is a <tref>string</tref>, it MUST have a lexical form of <tref>absolute IRI</tref>.
<ol class="algorithm">
- <li>Dereference <em>value</em>.</li>
+ <li>Dereference <em>context</em>.</li>
<li>If the resulting document is a JSON document, extract the top-level <code>@context</code>
- element using the JSON Pointer "/@context" as described in [[!JSON-POINTER]]. Set <em>value</em>
- to the extracted content, or an empty <tref>JSON Object</tref> if no value exists.</li>
- <li>Merge the of <tref>local context</tref> into the <tref>active context</tref>.</li>
+ element using the JSON Pointer "/@context" as described in [[!JSON-POINTER]]. Set <em>context</em>
+ to the extracted content and process it by starting at <a href="#process-context">Step 2.1</a>.</li>
</ol>
</li>
- <li>If <em>value</em> is a <tref>JSON object</tref>, perform the following steps:
+ <li>If <em>context</em> is a <tref>JSON object</tref>, perform the following steps:
<ol class="algorithm">
- <li>If <em>value</em> has a <code>@language</code> key, it MUST have a value of a
+ <li>If <em>context</em> has a <code>@language</code> property, it MUST have a value of a
simple <tref>string</tref> or <tref>null</tref>. Add the language to the <tref>local context</tref>.</li>
- <li id="object-context">Otherwise, for each key in <em>value</em> having the lexical form of an <cite><a
- href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite> (see [[XML-NAMES]]),
- <tref>compact IRI</tref>, absolute <tref>IRI</tref>,
- or being an empty string, perform the following steps:
+ <li id="object-context">Otherwise, for each property in <em>context</em> perform the following steps:
<ol class="algorithm">
- <li>If the key's value is a simple <tref>string</tref>, the value MUST have the form of
- <tref>term</tref>, <tref>compact IRI</tref>, <tref>absolute IRI</tref>. Determine the IRI mapping value by
+ <li>If the property's value is a simple <tref>string</tref>, determine the IRI mapping value by
performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. If the result of the IRI
- mapping is an <tref>absolute IRI</tref>, merge the key-value pair into the <tref>local context</tref>
+ mapping is an <tref>absolute IRI</tref>, merge the property into the <tref>local context</tref>
<tref>term mapping</tref>.</li>
- <li>Otherwise, the key's value MUST be a <tref>JSON object</tref>.
+ <li>Otherwise, the <em>property</em>'s <em>value</em> MUST be a <tref>JSON object</tref>.
<ol class="algorithm">
- <li>If the key has the form of <tref>term</tref>, the value MUST have a <code>@id</code>
- key with a string value, the value MUST have the
- form of <tref>term</tref>, <tref>compact IRI</tref>, <tref>absolute IRI</tref>.
- Determine the IRI mapping value
+ <li>If the <em>property</em> has the form of <tref>term</tref>, it's <em>value</em> MUST have an
+ <code>@id</code> property with a string value which MUST have the form of a <tref>term</tref>,
+ <tref>compact IRI</tref>, or <tref>absolute IRI</tref>. Determine the IRI mapping
by performing <a href="#iri-expansion">IRI Expansion</a> on the associated value.
If the result of the IRI mapping is an <tref>absolute IRI</tref>, merge the
- key-value pair into the <tref>local context</tref> <tref>term mapping</tref>.</li>
- <li>If the key has the form of <tref>compact IRI</tref> or <tref>absolute IRI</tref>,
- the value MAY have a <code>@id</code> key with a string value, this value MUST have the
- form of <tref>term</tref>, <tref>compact IRI</tref>, absolute <tref>IRI</tref>.
- Determine the IRI mapping value
- by performing <a href="#iri-expansion">IRI Expansion</a> on the associated value.
- If the result of the IRI mapping is an <tref>absolute IRI</tref>, merge the
- key-value pair into the <tref>local context</tref> <tref>term mapping</tref>.</li>
- <li>If the value has a <code>@type</code> key, the value MUST have the form of <tref>term</tref>,
- <tref>compact IRI</tref>, <tref>absolute IRI</tref> or the <tref>keyword</tref> <code>@id</code>. Determine the IRI by
- performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. If the result of the
- IRI mapping is an <tref>absolute IRI</tref> or <code>@id</code>, merge into the <tref>local context</tref>
- <tref>coercion mapping</tref> using the lexical value of the key..</li>
- <li>If the value has a <code>@container</code> key, the value MUST be
- <code>@list</code> or <code>@set</code>. Merge the <tref>list mapping</tref> or
- <tref>set mapping</tref> into the <tref>local context</tref> using the lexical value of the key..</li>
- <li>If the value has a <code>@language</code> key but no <code>@type</code> key, the value of the
- <code>@language</code> key MUST be a <tref>string</tref> or <tref>null</tref>.
- Merge the <tref>language mapping</tref> into the <tref>local context</tref> using the lexical value of the key..</li>
+ <em>property</em> into the <tref>local context</tref> <tref>term mapping</tref>.</li>
+ <li>If the <em>property</em> has the form of of a <tref>compact IRI</tref> or <tref>absolute IRI</tref>,
+ the <em>value</em> MAY have a <code>@id</code> property with a string value which MUST have the
+ form of a <tref>term</tref>, <tref>compact IRI</tref>, or absolute <tref>IRI</tref>.
+ Determine the IRI mapping by performing <a href="#iri-expansion">IRI Expansion</a> on the associated
+ value. If the result of the IRI mapping is an <tref>absolute IRI</tref>, merge the
+ <em>property</em> into the <tref>local context</tref> <tref>term mapping</tref>.</li>
+ <li>If the <em>value</em> has a <code>@type</code> property, it's value MUST have the form of a <tref>term</tref>,
+ <tref>compact IRI</tref>, <tref>absolute IRI</tref>, or the <tref>keyword</tref> <code>@id</code>.
+ Determine the IRI by performing <a href="#iri-expansion">IRI Expansion</a> on the associated value.
+ If the result of the IRI mapping is an <tref>absolute IRI</tref> or <code>@id</code>, merge into the
+ <tref>local context</tref> <tref>coercion mapping</tref> using the lexical value of the <em>property</em>.</li>
+ <li>If the <em>value</em> has a <code>@container</code> property, it's value MUST be <code>@list</code> or
+ <code>@set</code>. Merge the <tref>list mapping</tref> or <tref>set mapping</tref> into the
+ <tref>local context</tref> using the lexical value of the <em>property</em>.</li>
+ <li>If the <em>value</em> has a <code>@language</code> property but no <code>@type</code> property, the value of the
+ <code>@language</code> property MUST be a <tref>string</tref> or <tref>null</tref>.
+ Merge the <tref>language mapping</tref> into the <tref>local context</tref> using the lexical value of the
+ <em>property</em>.</li>
</ol>
</li>
<li>Merge the <tref>local context</tref> into the <tref>active context</tref>.</li>
- <li>Repeat <a href="#object-context">Step 3.3.2</a> until no entries are added to the <tref>local
+ <li>Repeat <a href="#object-context">Step 2.4.2</a> until no entries are added to the <tref>local
context</tref>.</li>
</ol>
</li>