--- a/spec/latest/json-ld-api/index.html Tue Dec 13 23:04:17 2011 +0800
+++ b/spec/latest/json-ld-api/index.html Wed Dec 14 16:01:01 2011 -0800
@@ -676,17 +676,16 @@
in all algorithms described in this section:</p>
<dl>
+ <dt><code>@base</code></dt><dd>Used to set the base <tref>IRI</tref> for all object IRIs affected by the <tref>active context</tref>.</dd>
+ <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
<dt><code>@context</code></dt><dd>Used to set the <tref>local context</tref>.</dd>
- <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected by the <tref>active context</tref>.</dd>
- <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <tref>active context</tref>.</dd>
- <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
+ <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
+ <dt><code>@id</code></dt><dd>Sets the active subject.</dd>
+ <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
<dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
- <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
- <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
- <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
+ <dt><code>@type</code></dt><dd>Used to set the type of the active subject.</dd>
+ <dt><code>@vocab</code></dt><dd>Used to set the base <tref>IRI</tref> for all property IRIs affected by the <tref>active context</tref>.</dd>
<dt><code>:</code></dt><dd>The separator for JSON keys and values that use the <tref>prefix</tref> mechanism.</dd>
- <dt><code>@subject</code></dt><dd>Sets the active subject.</dd>
- <dt><code>@type</code></dt><dd>Used to set the type of the active subject.</dd>
</dl>
</section>
@@ -857,14 +856,14 @@
<li><code>@base</code> is set using <cite><a href="http://www.ietf.org/rfc/rfc2396.txt">section 5.1 Establishing a
Base URI</a></cite> of [[RFC3986]]. Processors MAY provide a means
of setting the base IRI programatically.</li>
- <li><code>@coerce</code> is set with a single mapping from <code>@iri</code> to <code>@type</code>.</li>
+ <li><code>@coerce</code> is set with a single mapping from <code>@id</code> to <code>@type</code>.</li>
</ul>
<pre class="example" data-transform="updateExample">
<!--
{
"@base": ****document-location****,
"@coerce": {
- "@iri": "@type"
+ "@id": "@type"
}
}
--></pre>
@@ -939,8 +938,8 @@
coercion entry in the <tref>local context</tref>, the resulting
expansion is an object populated according to the following steps:
<ol class="algorithm">
- <li>If the coercion target is <code>@iri</code>, expand the value
- by adding a new key-value pair where the key is <code>@iri</code>
+ <li>If the coercion target is <code>@id</code>, expand the value
+ by adding a new key-value pair where the key is <code>@id</code>
and the value is the expanded IRI according to the
<a href="#iri-expansion">IRI Expansion</a> rules.</li>
<li>If the coercion target is a typed literal, expand the value
@@ -968,8 +967,8 @@
key that is associated with the value, compact the value using the
following steps:
<ol class="algorithm">
- <li>If the coercion target is an <code>@iri</code>, the compacted
- value is the value associated with the <code>@iri</code> key,
+ <li>If the coercion target is an <code>@id</code>, the compacted
+ value is the value associated with the <code>@id</code> key,
processed according to the
<a href="#iri-compaction">IRI Compaction</a> steps.</li>
<li>If the coercion target is a typed literal, the compacted
@@ -1002,7 +1001,7 @@
"homepage": "http://xmlns.com/foaf/0.1/homepage",
"@coerce":
{
- "@iri": "homepage"
+ "@id": "homepage"
}
},
"name": "Manu Sporny",
@@ -1020,7 +1019,7 @@
"http://xmlns.com/foaf/0.1/name": "Manu Sporny",
"http://xmlns.com/foaf/0.1/homepage":
{
- "@iri": "http://manu.sporny.org/"
+ "@id": "http://manu.sporny.org/"
}
}
-->
@@ -1078,7 +1077,7 @@
"http://xmlns.com/foaf/0.1/name": "Manu Sporny",
"http://xmlns.com/foaf/0.1/homepage":
{
- "@iri": "http://manu.sporny.org/"
+ "@id": "http://manu.sporny.org/"
}
}
-->
@@ -1093,7 +1092,7 @@
"homepage": "http://xmlns.com/foaf/0.1/homepage",
"@coerce":
{
- "@iri": "homepage"
+ "@id": "homepage"
}
}
-->
@@ -1112,7 +1111,7 @@
"homepage": "http://xmlns.com/foaf/0.1/homepage",
"@coerce":
{
- "@iri": "homepage"
+ "@id": "homepage"
}
},
"name": "Manu Sporny",
@@ -1183,24 +1182,24 @@
"title": "http://purl.org/dc/terms/title",
"@coerce":
{
- "@iri": "contains"
+ "@id": "contains"
},
},
- "@subject":
+ "@id":
[{
- "@subject": "http://example.com/library",
+ "@id": "http://example.com/library",
"@type": "Library",
"contains": "http://example.org/library/the-republic"
},
{
- "@subject": "http://example.org/library/the-republic",
+ "@id": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": "http://example.org/library/the-republic#introduction"
},
{
- "@subject": "http://example.org/library/the-republic#introduction",
+ "@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
@@ -1253,15 +1252,15 @@
"Library": "http://example.org/vocab#Library",
"title": "http://purl.org/dc/terms/title"
},
- "@subject": "http://example.org/library",
+ "@id": "http://example.org/library",
"@type": "Library",
"contains": {
- ****"@subject": "http://example.org/library/the-republic",****
+ ****"@id": "http://example.org/library/the-republic",****
"@type": "Book",
****"creator": "Plato",****
****"title": "The Republic",****
"contains": {
- ****"@subject": "http://example.org/library/the-republic#introduction",****
+ ****"@id": "http://example.org/library/the-republic#introduction",****
"@type": "Chapter",
****"description": "An introductory chapter on The Republic.",****
****"title": "The Introduction"****
@@ -1376,30 +1375,30 @@
<code>true</code> or <code>false</code>, set the associated flag to
<code>true</code>.</li>
<li>If the <tref>object embed flag</tref> is cleared and the item has
- the <code>@subject</code> property, replace the item with the value
- of the <code>@subject</code> property.</li>
+ the <code>@id</code> property, replace the item with the value
+ of the <code>@id</code> property.</li>
<li>If the <tref>object embed flag</tref> is set and the item has
- the <code>@subject</code> property, and its IRI is in the
+ the <code>@id</code> property, and its IRI is in the
<tref>map of embedded subjects</tref>, throw a
<code>Duplicate Embed</code> exception.</li>
<li>If the <tref>object embed flag</tref> is set and the item has
- the <code>@subject</code> property and its IRI is not in the
+ the <code>@id</code> property and its IRI is not in the
<tref>map of embedded subjects</tref>:
<ol class="algorithm">
<li>If the <tref>explicit inclusion flag</tref> is set,
then delete any key from the item that does not exist in the
- <tref>match frame</tref>, except <code>@subject</code>.</li>
+ <tref>match frame</tref>, except <code>@id</code>.</li>
<li>For each key in the <tref>match frame</tref>, except for
keywords and <code>rdf:type</code>:
<ol class="algorithm">
<li>If the key is in the item, then build a new
<tdef>recursion input list</tdef> using the object or objects
associated with the key. If any object contains an
- <code>@iri</code> value that exists in the
+ <code>@id</code> value that exists in the
<strong>normalized input</strong>, replace the object in the
<tref>recursion input list</tref> with a new object containing
- the <code>@subject</code> key where the value is the value of
- the <code>@iri</code>, and all of the other key-value pairs for
+ the <code>@id</code> key where the value is the value of
+ the <code>@id</code>, and all of the other key-value pairs for
that subject. Set the <tdef>recursion match frame</tdef> to the
value associated with the <tref>match frame</tref>'s key. Replace
the value associated with the key by recursively calling this
@@ -1484,7 +1483,7 @@
"xsd": "http://www.w3.org/2001/XMLSchema#",
"@coerce":
{
- "@iri": ["homepage"]
+ "@id": ["homepage"]
}
},
"name": "Manu Sporny",
@@ -1502,13 +1501,10 @@
<pre class="example" data-transform="updateExample">
<!--
[{
- "@subject":
- {
- "@iri": "_:c14n0"
- },
+ "@id": "_:c14n0",
"http://xmlns.com/foaf/0.1/homepage":
{
- "@iri": "http://manu.sporny.org/"
+ "@id": "http://manu.sporny.org/"
},
"http://xmlns.com/foaf/0.1/name": "Manu Sporny"
}]
@@ -1533,8 +1529,8 @@
<dd>
The subject <tref>IRI</tref> associated with a graph node. The subject IRI is expressed
using a key-value pair in a <tref>JSON object</tref> where the key is
- <code>@subject</code> and the value is a string that is an IRI or
- a <tref>JSON object</tref> containing the key <code>@iri</code> and
+ <code>@id</code> and the value is a string that is an IRI or
+ a <tref>JSON object</tref> containing the key <code>@id</code> and
a value that is a string that is an IRI.
</dd>
<dt><tdef>list of expanded nodes</tdef></dt>
@@ -1707,7 +1703,7 @@
<ol class="algorithm">
<li>If the <tref>expanded node</tref> is an unlabeled node, add a
new key-value pair to the <tref>expanded node</tref>
- where the key is <code>@subject</code> and the value is the
+ where the key is <code>@id</code> and the value is the
concatenation of the <tref>labeling prefix</tref>
and the string value of the <tref>labeling counter</tref>.
Increment the <tref>labeling counter</tref>.</li>
@@ -1731,8 +1727,8 @@
</li>
<li>After exiting the recursive step, replace the reference to the
<tref>expanded node</tref> with an object containing a single
- key-value pair where the key is <code>@iri</code> and the value is
- the value of the <code>@subject</code> key in the node.</li>
+ key-value pair where the key is <code>@id</code> and the value is
+ the value of the <code>@id</code> key in the node.</li>
</ol>
</li>
<li>For every entry in the <tref>map of flattened nodes</tref>, insert a
@@ -1747,7 +1743,7 @@
<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
- of the nodes that contain a <code>@subject</code> key associated with a value
+ 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>
</ol>
@@ -1965,7 +1961,7 @@
</ol>
</li>
<li>If both values are expanded <tref>IRI</tref>s, the
- lexicographically lesser string associated with <code>@iri</code>
+ lexicographically lesser string associated with <code>@id</code>
is first.</li>
<li>Otherwise, the two values are equivalent.</li>
</ol>
@@ -2397,7 +2393,7 @@
<li>Append all properties to the <tref>label serialization</tref> by
processing each key-value pair in the <tref>node reference</tref>,
excluding the
- <code>@subject</code> property. The keys should be processed in
+ <code>@id</code> property. The keys should be processed in
lexicographical order and their associated values should be processed
in the order produced by the
<a href="#object-comparison-algorithm">Object Comparison Algorithm</a>:
@@ -2409,7 +2405,7 @@
Process all of the objects that are associated with the key, building
an <tdef>object string</tdef> for each item:
<ol class="algorithm">
- <li>If the object contains an <code>@iri</code> key with a
+ <li>If the object contains an <code>@id</code> key with a
value that starts
with <code>_:</code>, set the <tref>object string</tref> to
the value <code>_:</code>. If the value does not
@@ -2417,7 +2413,7 @@
using the pattern
<code><</code><strong>IRI</strong><code>></code>
where <strong>IRI</strong> is the value associated with the
- <code>@iri</code> key.</li>
+ <code>@id</code> key.</li>
<li>If the object contains a <code>@literal</code> key and a
<code>@datatype</code> key, build the <tref>object string</tref>
using the pattern
@@ -2643,13 +2639,6 @@
with those keywords. Use the new <tref>JSON object</tref> in subsequent steps.
</li>
<li>
- If the <tref>JSON object</tref> has an <code>@iri</code> key, set the <tref>active object</tref> by
- performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. Generate a
- triple representing the <tref>active subject</tref>, the <tref>active property</tref> and the
- <tref>active object</tref>. Return the <tref>active object</tref> to the calling location.
- <p class="issue"><code>@iri</code> really just behaves the same as <code>@subject</code>, consider consolidating them.</p>
- </li>
- <li>
If the <tref>JSON object</tref> has a <code>@literal</code> key, set the <tref>active object</tref>
to a literal value as follows:
<ol class="algorithm">
@@ -2673,7 +2662,7 @@
process the value as a list starting at <a href="#processing-step-list">Step 3.1</a> as if the
<tref>active property</tref> is the target of a <code>@list</code> coercion.
</li>
- <li id="processing-step-subject">If the <tref>JSON object</tref> has a <code>@subject</code> key:
+ <li id="processing-step-subject">If the <tref>JSON object</tref> has a <code>@id</code> key:
<ol class="algorithm">
<li>
If the value is a <tref>string</tref>, set the <tref>active object</tref> to the result of performing
@@ -2695,7 +2684,7 @@
</ol>
</li>
<li>
- If the <tref>JSON object</tref> does not have a <code>@subject</code> key, set the <tref>active
+ If the <tref>JSON object</tref> does not have a <code>@id</code> key, set the <tref>active
object</tref> to newly generated <tref>blank node</tref>. Generate a triple
representing the <tref>active subject</tref>, the <tref>active property</tref> and the
<tref>active object</tref>. Set the <tref>active subject</tref> to the <tref>active
@@ -2792,7 +2781,7 @@
If a <tref>string</tref> is detected:
<ol class="algorithm">
<li>
- If the <tref>active property</tref> is the target of a <code>@iri</code> coercion,
+ If the <tref>active property</tref> is the target of a <code>@id</code> coercion,
set the <tref>active object</tref> by
performing <a href="#iri-expansion">IRI Expansion</a> on the string.
</li>
@@ -2844,6 +2833,7 @@
including the normalization algorithm which was a monumentally difficult
design challenge.
</p>
+<p class="issue">Dave is an editor, and probably shouldn't also be in acknowledgments.</p>
</section>
</body>
--- a/spec/latest/json-ld-syntax/index.html Tue Dec 13 23:04:17 2011 +0800
+++ b/spec/latest/json-ld-syntax/index.html Wed Dec 14 16:01:01 2011 -0800
@@ -412,17 +412,16 @@
in all algorithms described in this section:</p>
<dl>
- <dt><code>@context</code></dt><dd>Used to set the <tref>local context</tref>.</dd>
<dt><code>@base</code></dt><dd>Used to set the base <tref>IRI</tref> for all object IRIs affected by the <tref>active context</tref>.</dd>
- <dt><code>@vocab</code></dt><dd>Used to set the base <tref>IRI</tref> for all property IRIs affected by the <tref>active context</tref>.</dd>
<dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
+ <dt><code>@context</code></dt><dd>Used to set the <tref>local context</tref>.</dd>
+ <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
+ <dt><code>@id</code></dt><dd>Sets the active subject.</dd>
+ <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
<dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
- <dt><code>@iri</code></dt><dd>Used to specify an <tref>IRI</tref> value.</dd>
- <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
- <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
+ <dt><code>@type</code></dt><dd>Used to set the type of the active subject.</dd>
+ <dt><code>@vocab</code></dt><dd>Used to set the base <tref>IRI</tref> for all property IRIs affected by the <tref>active context</tref>.</dd>
<dt><code>:</code></dt><dd>The separator for JSON keys and values that use the <tref>prefix</tref> mechanism.</dd>
- <dt><code>@subject</code></dt><dd>Sets the active subject.</dd>
- <dt><code>@type</code></dt><dd>Used to set the type of the active subject.</dd>
</dl>
</section>
@@ -776,14 +775,14 @@
<ol>
<li>Except within a <tref>context</tref> definition, <tref>term</tref>s in the key position in
- a <tref>JSON object</tref> that have a mapping to an <tref>IRI</tref> or another key in the <tref>active
- context</tref> are expanded to an IRI by JSON-LD processors.</li>
- <li>An <tref>IRI</tref> is generated for the <tref>string</tref> value specified using <code>@subject</code>,
- <code>@type</code> or <code>@iri</code>.</li>
+ a <tref>JSON object</tref> that have a mapping to an <tref>IRI</tref> or another key in the
+ <tref>active context</tref> are expanded to an IRI by JSON-LD processors.</li>
+ <li>An <tref>IRI</tref> is generated for the <tref>string</tref> value specified using
+ <code>@id</code> or <code>@type</code>.</li>
<li>An <tref>IRI</tref> is generated for any key or <tref>string</tref> value with the <code>@coerce</code>,
section of a <tref>context</tref> definition.
<li>An <tref>IRI</tref> is generated for the value of any other key if there are <code>@coerce</code> rules in
- effect for that key that identify it as a <code>@iri</code>.</li>
+ effect for that key that identify it as a <code>@id</code>.</li>
</ol>
<p>IRIs may be represented as an absolute IRI, a <tref>term</tref>, a <tref>prefix</tref>:suffix construct, or as a value relative to <code>@base</code> or <code>@vocab</code>. Relative IRIs are resolved against <code>@vocab</code> if they are in a key position, or the value of <code>@type</code> key, otherwise they are resolved against <code>@base</code>.</p>
@@ -849,18 +848,23 @@
<code>http://xmlns.com/foaf/0.1/name</code>. See <a href="#prefixes">Prefixes</a> for more details.</p>
<p>An <tref>IRI</tref> is generated when a value is associated with a key using
-the <code>@iri</code> keyword:</p>
+the <code>@id</code> keyword:</p>
<pre class="example" data-transform="updateExample">
<!--
{
...
- "homepage": { "****@iri****": "http://manu.sporny.org" }
+ "homepage": { "****@id****": "http://manu.sporny.org" }
...
}
-->
</pre>
+<p class="note">Specifying a <tref>JSON Object</tref> with an <code>@id</code> key is
+ used to represent an IRI, but it also is the mechanism by which a <tref>subject</tref> is defined.
+ This is an example of <tref>chaining</tref> in JSON-LD, an issue covered further in <a
+ href="#chaining">Chaining</a>.</p>
+
<p>If type coercion rules are specified in the <code>@context</code> for
a particular <tref>term</tref> or property IRI, an IRI is generated:</p>
@@ -872,7 +876,7 @@
...
"@coerce":
{
- "@iri": "homepage"
+ "@id": "homepage"
}
}****
...
@@ -903,7 +907,7 @@
uniquely identify each node which may be externally referenced.
</p>
<p>A <tref>subject</tref>
- of an object in JSON is declared using the <code>@subject</code> key. The subject is the
+ of an object in JSON is declared using the <code>@id</code> key. The subject is the
first piece of information needed by the JSON-LD processor in order to
create the (subject, property, object) tuple, also known as a triple.</p>
@@ -911,7 +915,7 @@
<!--
{
...
- "****@subject****": "****http://example.org/people#joebob****",
+ "****@id****": "****http://example.org/people#joebob****",
...
}
-->
@@ -922,9 +926,9 @@
</p>
<p class="note">To ensure the best possible performance, it is a best practice to
-put the <code>@subject</code> key before other key-value pairs in an object. If
+put the <code>@id</code> key before other key-value pairs in an object. If
it isn't listed first, processors have to save each key-value pair until
-<code>@subject</code> is processed before they can create valid triples. This
+<code>@id</code> is processed before they can create valid triples. This
creates a memory and complexity burden for one-pass processors.</p>
</section>
@@ -943,7 +947,7 @@
<!--
{
...
- "@subject": "http://example.org/people#joebob",
+ "@id": "http://example.org/people#joebob",
"****@type****": "****http://xmlns.com/foaf/0.1/Person****",
...
}
@@ -1075,7 +1079,7 @@
<!--
{
...
- "@subject": "http://example.org/people#joebob",
+ "@id": "http://example.org/people#joebob",
"age": ****31****
...
}
@@ -1110,7 +1114,7 @@
<!--
{
...
- "@subject": "http://example.org/people#joebob",
+ "@id": "http://example.org/people#joebob",
"nick": ****[ "joe", "bob", "jaybee" ]****,
...
}
@@ -1144,7 +1148,7 @@
<pre class="example" data-transform="updateExample">
<!--
{
- "@subject": "http://example.org/articles/8",
+ "@id": "http://example.org/articles/8",
"dc:title": ****
[
{"@literal": "Das Kapital", "@language": "de"},
@@ -1179,7 +1183,7 @@
<!--
{
...
- "@subject": "http://example.org/people#joebob",
+ "@id": "http://example.org/people#joebob",
"nick": ****[ "joe", "bob", "jaybee" ]****,
...
}
@@ -1197,7 +1201,7 @@
<!--
{
...
- "@subject": "http://example.org/people#joebob",
+ "@id": "http://example.org/people#joebob",
"foaf:nick": ****{ "@list": [ "joe", "bob", "jaybee" ] }****,
...
}
@@ -1218,7 +1222,7 @@
****}****
****}****,
...
- "@subject": "http://example.org/people#joebob",
+ "@id": "http://example.org/people#joebob",
"foaf:nick": ****[ "joe", "bob", "jaybee" ]****,
...
}
@@ -1359,14 +1363,14 @@
<pre class="example" data-transform="updateExample">
<!--
{
- ****"@subject": "about/"****,
+ ****"@id": "about/"****,
"http://xmlns.com/foaf/0.1/name": "Manu Sporny",
"http://xmlns.com/foaf/0.1/homepage: ""
}
-->
</pre>
-<p>This document uses an empty <code>@subject</code>, which resolves to the document base. However, if
+<p>This document uses an empty <code>@id</code>, which resolves to the document base. However, if
the document is moved to a different location, the subject IRI would change. To prevent this, a <tref>context</tref>
may have a <code>@base</code> mapping, to set an absolute base for the document in spite of where
it actually is retrieved from. It MUST have a value of a simple
@@ -1376,7 +1380,7 @@
<!--
{
****"@context": { "@base": "http://manu.sporny.org/" }****,
- "@subject": "about/",
+ "@id": "about/",
"http://xmlns.com/foaf/0.1/name": "Manu Sporny",
"http://xmlns.com/foaf/0.1/homepage: ""
}
@@ -1561,15 +1565,15 @@
****"dc": "http://purl.org/dc/elements/1.1/",****
****"ex": "http://example.org/vocab#"****
},
- "@subject": "http://example.org/library",
+ "@id": "http://example.org/library",
"@type": ****"ex:Library"****,
****"ex:contains"****: {
- "@subject": "http://example.org/library/the-republic",
+ "@id": "http://example.org/library/the-republic",
"@type": ****"ex:Book"****,
****"dc:creator"****: "Plato",
****"dc:title"****: "The Republic",
****"ex:contains"****: {
- "@subject": "http://example.org/library/the-republic#introduction",
+ "@id": "http://example.org/library/the-republic#introduction",
"@type": ****"ex:Chapter"****,
****"dc:description"****: "An introductory chapter on The Republic.",
****"dc:title"****: "The Introduction"
@@ -1651,9 +1655,9 @@
properly typed RDF data.</p>
<p>Keys within a <code>@coerce</code> definition represent datatype IRIs and MUST take the form
- of <tref>term</tref>, <tref>prefix</tref>:suffix, absolute IRI or the keywords <code>@iri</code> or <code>@list</code>.
- Specifying <code>@iri</code> indicates that within the body of a JSON-LD document, string values of keys coerced as
- <code>@iri</code> are to be interpreted as <tref>IRI</tref>s, and are subject to IRI expansion. Specifying
+ of <tref>term</tref>, <tref>prefix</tref>:suffix, absolute IRI or the keywords <code>@id</code> or <code>@list</code>.
+ Specifying <code>@id</code> indicates that within the body of a JSON-LD document, string values of keys coerced as
+ <code>@id</code> are to be interpreted as <tref>IRI</tref>s, and are subject to IRI expansion. Specifying
<code>@list</code> indicates that array values of keys coerced as <code>@list</code> are to be serialized
as a <a href="#rdf-collection">List</a>.</p>
@@ -1677,7 +1681,7 @@
**** "@coerce":
{
"xsd:integer": "age",
- "@iri": "homepage"
+ "@id": "homepage"
}****
},
"name": "John Smith",
@@ -1719,8 +1723,8 @@
"currentProject": "http://xmlns.com/foaf/0.1/currentProject",
****"@coerce": {
"age": "xsd:integer",
- "homepage": "@iri",
- "currentProject": [ "@iri", "@list" ]
+ "homepage": "@id",
+ "currentProject": [ "@id", "@list" ]
}****
},
...
@@ -1738,9 +1742,9 @@
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"name": "http://xmlns.com/foaf/0.1/name",
- "age": ****{ "@iri": "http://xmlns.com/foaf/0.1/age", "@coerce": "xsd:integer" }****,
- "homepage": ****{ "@iri": "http://xmlns.com/foaf/0.1/age", "@coerce": "@iri" }****,
- "currentProject": ****{ "@iri": "http://xmlns.com/foaf/0.1/currentProject", "@coerce": [ "@iri", "@list" ] }****,
+ "age": ****{ "@id": "http://xmlns.com/foaf/0.1/age", "@coerce": "xsd:integer" }****,
+ "homepage": ****{ "@id": "http://xmlns.com/foaf/0.1/age", "@coerce": "@id" }****,
+ "currentProject": ****{ "@id": "http://xmlns.com/foaf/0.1/currentProject", "@coerce": [ "@id", "@list" ] }****,
},
...
}
@@ -1788,7 +1792,7 @@
being able to specify the subject. Typically, this type of node is called
an unlabeled node or a blank node. In JSON-LD, unlabeled node identifiers are
automatically created if a subject is not specified using the
-<code>@subject</code> keyword. However, authors may provide identifiers for
+<code>@id</code> keyword. However, authors may provide identifiers for
unlabeled nodes by using the special <code>_</code> (underscore)
<tref>prefix</tref>. This allows to reference the node locally within the
document but not in an external document.</p>
@@ -1797,7 +1801,7 @@
<!--
{
...
- "@subject": "****_:foo****",
+ "@id": "****_:foo****",
...
}
-->
@@ -1826,7 +1830,7 @@
{
"@context":
{
- ****"url": "@subject"****,
+ ****"url": "@id"****,
****"a": "@type"****,
"name": "http://schema.org/name"
},
@@ -1837,7 +1841,7 @@
-->
</pre>
-<p>In the example above, the <code>@subject</code> and <code>@type</code>
+<p>In the example above, the <code>@id</code> and <code>@type</code>
keywords have been given the aliases <strong>url</strong> and
<strong>a</strong>, respectively.
</p>
@@ -1851,7 +1855,7 @@
<p>JSON-LD is a specification for representing <tref>Linked Data</tref> in JSON. A common
way of working with Linked Data is through <tdef>RDF</tdef>, the Resource Description Framework.
- RDF can be expressed using JSON-LD by associating JSON-LD concepts such as <code>@subject</code>
+ RDF can be expressed using JSON-LD by associating JSON-LD concepts such as <code>@id</code>
and <code>@type</code> with the equivalent <tref>IRI</tref>s in RDF. Further information about
RDF may be found in [[RDF-PRIMER]].</p>
@@ -1895,10 +1899,10 @@
"@base": "http://manu.sporny.org/",
"foaf": "http://xmlns.com/foaf/0.1/"
},
- "@subject": "#me",
+ "@id": "#me",
"@type": "foaf:Person",
"foaf:name": "Manu Sporny",
- "foaf:homepage": { "@iri": "" }
+ "foaf:homepage": { "@id": "" }
}
-->
</pre>
@@ -1928,12 +1932,12 @@
"@base": "http://manu.sporny.org/",
"foaf": "http://xmlns.com/foaf/0.1/"
},
- "@subject": "#me",
+ "@id": "#me",
"@type": "foaf:Person",
"foaf:name": "Manu Sporny",
"foaf:knows": {
- "@type": "foaf:Person",
- "foaf:name": "Gregg Kellogg"
+ "@type": "foaf:Person",
+ "foaf:name": "Gregg Kellogg"
}
}
-->
@@ -1959,10 +1963,10 @@
"@base": "http://manu.sporny.org/",
"foaf": "http://xmlns.com/foaf/0.1/"
},
- "@subject": "http://example.org/people#joebob",
- "@type": "foaf:Person",
- "foaf:name": "Joe Bob",
- "foaf:nick": { "@list": [ "joe", "bob", "jaybe" ] }
+ "@id": "http://example.org/people#joebob",
+ "@type": "foaf:Person",
+ "foaf:name": "Joe Bob",
+ "foaf:nick": { "@list": [ "joe", "bob", "jaybe" ] }
}
-->
</pre>
@@ -2002,21 +2006,21 @@
<!--
{
"@context": { "foaf": "http://xmlns.com/foaf/0.1/" },
- "@subject": [
+ "@id": [
{
- "@subject": "_:bnode1",
+ "@id": "_:bnode1",
"@type": "foaf:Person",
"foaf:homepage": "http://example.com/bob/",
"foaf:name": "Bob"
},
{
- "@subject": "_:bnode2",
+ "@id": "_:bnode2",
"@type": "foaf:Person",
"foaf:homepage": "http://example.com/eve/",
"foaf:name": "Eve"
},
{
- "@subject": "_:bnode3",
+ "@id": "_:bnode3",
"@type": "foaf:Person",
"foaf:homepage": "http://example.com/manu/",
"foaf:name": "Manu"
@@ -2055,9 +2059,9 @@
"vcard": "http://microformats.org/profile/hcard#vcard",
"url": "http://microformats.org/profile/hcard#url",
"fn": "http://microformats.org/profile/hcard#fn",
- "@coerce": { "@iri": "url" }
+ "@coerce": { "@id": "url" }
},
- "@subject": "_:bnode1",
+ "@id": "_:bnode1",
"@type": "vcard",
"url": "http://tantek.com/",
"fn": "Tantek Çelik"
@@ -2110,7 +2114,7 @@
<!--
[
{
- "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+ "@id": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
"@type": "http://purl.org/vocab/frbr/core#Work",
"http://purl.org/dc/terms/title": "Just a Geek",
"http://purl.org/dc/terms/creator": "Whil Wheaton",
@@ -2118,12 +2122,12 @@
[ "http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK" ]
},
{
- "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
+ "@id": "http://purl.oreilly.com/products/9780596007683.BOOK",
"@type": "http://purl.org/vocab/frbr/core#Expression",
"http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
},
{
- "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+ "@id": "http://purl.oreilly.com/products/9780596802189.EBOOK",
"@type": "http://purl.org/vocab/frbr/core#Expression",
"http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
}