Skip to content

Commit 44c7dde

Browse files
committed
Change instances of @subject and @iri to @id per issue #15 resolution.
1 parent fb601d9 commit 44c7dde

File tree

2 files changed

+119
-125
lines changed

2 files changed

+119
-125
lines changed

spec/latest/json-ld-api/index.html

Lines changed: 51 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -676,17 +676,16 @@ <h2>Syntax Tokens and Keywords</h2>
676676
in all algorithms described in this section:</p>
677677

678678
<dl>
679-
<dt><code>@context</code></dt><dd>Used to set the <tref>local context</tref>.</dd>
680-
<dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected by the <tref>active context</tref>.</dd>
681-
<dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <tref>active context</tref>.</dd>
679+
<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>
682680
<dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
683-
<dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
684-
<dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
685-
<dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
681+
<dt><code>@context</code></dt><dd>Used to set the <tref>local context</tref>.</dd>
686682
<dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
687-
<dt><code>:</code></dt><dd>The separator for JSON keys and values that use the <tref>prefix</tref> mechanism.</dd>
688-
<dt><code>@subject</code></dt><dd>Sets the active subject.</dd>
683+
<dt><code>@id</code></dt><dd>Sets the active subject.</dd>
684+
<dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
685+
<dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
689686
<dt><code>@type</code></dt><dd>Used to set the type of the active subject.</dd>
687+
<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>
688+
<dt><code>:</code></dt><dd>The separator for JSON keys and values that use the <tref>prefix</tref> mechanism.</dd>
690689
</dl>
691690
</section>
692691

@@ -857,14 +856,14 @@ <h3>Initial Context</h3>
857856
<li><code>@base</code> is set using <cite><a href="http://www.ietf.org/rfc/rfc2396.txt">section 5.1 Establishing a
858857
Base URI</a></cite> of [[RFC3986]]. Processors MAY provide a means
859858
of setting the base IRI programatically.</li>
860-
<li><code>@coerce</code> is set with a single mapping from <code>@iri</code> to <code>@type</code>.</li>
859+
<li><code>@coerce</code> is set with a single mapping from <code>@id</code> to <code>@type</code>.</li>
861860
</ul>
862861
<pre class="example" data-transform="updateExample">
863862
<!--
864863
{
865864
"@base": ****document-location****,
866865
"@coerce": {
867-
"@iri": "@type"
866+
"@id": "@type"
868867
}
869868
}
870869
--></pre>
@@ -939,8 +938,8 @@ <h2>Value Expansion</h2>
939938
coercion entry in the <tref>local context</tref>, the resulting
940939
expansion is an object populated according to the following steps:
941940
<ol class="algorithm">
942-
<li>If the coercion target is <code>@iri</code>, expand the value
943-
by adding a new key-value pair where the key is <code>@iri</code>
941+
<li>If the coercion target is <code>@id</code>, expand the value
942+
by adding a new key-value pair where the key is <code>@id</code>
944943
and the value is the expanded IRI according to the
945944
<a href="#iri-expansion">IRI Expansion</a> rules.</li>
946945
<li>If the coercion target is a typed literal, expand the value
@@ -968,8 +967,8 @@ <h2>Value Compaction</h2>
968967
key that is associated with the value, compact the value using the
969968
following steps:
970969
<ol class="algorithm">
971-
<li>If the coercion target is an <code>@iri</code>, the compacted
972-
value is the value associated with the <code>@iri</code> key,
970+
<li>If the coercion target is an <code>@id</code>, the compacted
971+
value is the value associated with the <code>@id</code> key,
973972
processed according to the
974973
<a href="#iri-compaction">IRI Compaction</a> steps.</li>
975974
<li>If the coercion target is a typed literal, the compacted
@@ -1002,7 +1001,7 @@ <h2>Expansion</h2>
10021001
"homepage": "http://xmlns.com/foaf/0.1/homepage",
10031002
"@coerce":
10041003
{
1005-
"@iri": "homepage"
1004+
"@id": "homepage"
10061005
}
10071006
},
10081007
"name": "Manu Sporny",
@@ -1020,7 +1019,7 @@ <h2>Expansion</h2>
10201019
"http://xmlns.com/foaf/0.1/name": "Manu Sporny",
10211020
"http://xmlns.com/foaf/0.1/homepage":
10221021
{
1023-
"@iri": "http://manu.sporny.org/"
1022+
"@id": "http://manu.sporny.org/"
10241023
}
10251024
}
10261025
-->
@@ -1078,7 +1077,7 @@ <h2>Compaction</h2>
10781077
"http://xmlns.com/foaf/0.1/name": "Manu Sporny",
10791078
"http://xmlns.com/foaf/0.1/homepage":
10801079
{
1081-
"@iri": "http://manu.sporny.org/"
1080+
"@id": "http://manu.sporny.org/"
10821081
}
10831082
}
10841083
-->
@@ -1093,7 +1092,7 @@ <h2>Compaction</h2>
10931092
"homepage": "http://xmlns.com/foaf/0.1/homepage",
10941093
"@coerce":
10951094
{
1096-
"@iri": "homepage"
1095+
"@id": "homepage"
10971096
}
10981097
}
10991098
-->
@@ -1112,7 +1111,7 @@ <h2>Compaction</h2>
11121111
"homepage": "http://xmlns.com/foaf/0.1/homepage",
11131112
"@coerce":
11141113
{
1115-
"@iri": "homepage"
1114+
"@id": "homepage"
11161115
}
11171116
},
11181117
"name": "Manu Sporny",
@@ -1183,24 +1182,24 @@ <h2>Framing</h2>
11831182
"title": "http://purl.org/dc/terms/title",
11841183
"@coerce":
11851184
{
1186-
"@iri": "contains"
1185+
"@id": "contains"
11871186
},
11881187
},
1189-
"@subject":
1188+
"@id":
11901189
[{
1191-
"@subject": "http://example.com/library",
1190+
"@id": "http://example.com/library",
11921191
"@type": "Library",
11931192
"contains": "http://example.org/library/the-republic"
11941193
},
11951194
{
1196-
"@subject": "http://example.org/library/the-republic",
1195+
"@id": "http://example.org/library/the-republic",
11971196
"@type": "Book",
11981197
"creator": "Plato",
11991198
"title": "The Republic",
12001199
"contains": "http://example.org/library/the-republic#introduction"
12011200
},
12021201
{
1203-
"@subject": "http://example.org/library/the-republic#introduction",
1202+
"@id": "http://example.org/library/the-republic#introduction",
12041203
"@type": "Chapter",
12051204
"description": "An introductory chapter on The Republic.",
12061205
"title": "The Introduction"
@@ -1253,15 +1252,15 @@ <h2>Framing</h2>
12531252
"Library": "http://example.org/vocab#Library",
12541253
"title": "http://purl.org/dc/terms/title"
12551254
},
1256-
"@subject": "http://example.org/library",
1255+
"@id": "http://example.org/library",
12571256
"@type": "Library",
12581257
"contains": {
1259-
****"@subject": "http://example.org/library/the-republic",****
1258+
****"@id": "http://example.org/library/the-republic",****
12601259
"@type": "Book",
12611260
****"creator": "Plato",****
12621261
****"title": "The Republic",****
12631262
"contains": {
1264-
****"@subject": "http://example.org/library/the-republic#introduction",****
1263+
****"@id": "http://example.org/library/the-republic#introduction",****
12651264
"@type": "Chapter",
12661265
****"description": "An introductory chapter on The Republic.",****
12671266
****"title": "The Introduction"****
@@ -1376,30 +1375,30 @@ <h3>Framing Algorithm</h3>
13761375
<code>true</code> or <code>false</code>, set the associated flag to
13771376
<code>true</code>.</li>
13781377
<li>If the <tref>object embed flag</tref> is cleared and the item has
1379-
the <code>@subject</code> property, replace the item with the value
1380-
of the <code>@subject</code> property.</li>
1378+
the <code>@id</code> property, replace the item with the value
1379+
of the <code>@id</code> property.</li>
13811380
<li>If the <tref>object embed flag</tref> is set and the item has
1382-
the <code>@subject</code> property, and its IRI is in the
1381+
the <code>@id</code> property, and its IRI is in the
13831382
<tref>map of embedded subjects</tref>, throw a
13841383
<code>Duplicate Embed</code> exception.</li>
13851384
<li>If the <tref>object embed flag</tref> is set and the item has
1386-
the <code>@subject</code> property and its IRI is not in the
1385+
the <code>@id</code> property and its IRI is not in the
13871386
<tref>map of embedded subjects</tref>:
13881387
<ol class="algorithm">
13891388
<li>If the <tref>explicit inclusion flag</tref> is set,
13901389
then delete any key from the item that does not exist in the
1391-
<tref>match frame</tref>, except <code>@subject</code>.</li>
1390+
<tref>match frame</tref>, except <code>@id</code>.</li>
13921391
<li>For each key in the <tref>match frame</tref>, except for
13931392
keywords and <code>rdf:type</code>:
13941393
<ol class="algorithm">
13951394
<li>If the key is in the item, then build a new
13961395
<tdef>recursion input list</tdef> using the object or objects
13971396
associated with the key. If any object contains an
1398-
<code>@iri</code> value that exists in the
1397+
<code>@id</code> value that exists in the
13991398
<strong>normalized input</strong>, replace the object in the
14001399
<tref>recursion input list</tref> with a new object containing
1401-
the <code>@subject</code> key where the value is the value of
1402-
the <code>@iri</code>, and all of the other key-value pairs for
1400+
the <code>@id</code> key where the value is the value of
1401+
the <code>@id</code>, and all of the other key-value pairs for
14031402
that subject. Set the <tdef>recursion match frame</tdef> to the
14041403
value associated with the <tref>match frame</tref>'s key. Replace
14051404
the value associated with the key by recursively calling this
@@ -1484,7 +1483,7 @@ <h2>Normalization</h2>
14841483
"xsd": "http://www.w3.org/2001/XMLSchema#",
14851484
"@coerce":
14861485
{
1487-
"@iri": ["homepage"]
1486+
"@id": ["homepage"]
14881487
}
14891488
},
14901489
"name": "Manu Sporny",
@@ -1502,13 +1501,10 @@ <h2>Normalization</h2>
15021501
<pre class="example" data-transform="updateExample">
15031502
<!--
15041503
[{
1505-
"@subject":
1506-
{
1507-
"@iri": "_:c14n0"
1508-
},
1504+
"@id": "_:c14n0",
15091505
"http://xmlns.com/foaf/0.1/homepage":
15101506
{
1511-
"@iri": "http://manu.sporny.org/"
1507+
"@id": "http://manu.sporny.org/"
15121508
},
15131509
"http://xmlns.com/foaf/0.1/name": "Manu Sporny"
15141510
}]
@@ -1533,8 +1529,8 @@ <h3>Normalization Algorithm Terms</h3>
15331529
<dd>
15341530
The subject <tref>IRI</tref> associated with a graph node. The subject IRI is expressed
15351531
using a key-value pair in a <tref>JSON object</tref> where the key is
1536-
<code>@subject</code> and the value is a string that is an IRI or
1537-
a <tref>JSON object</tref> containing the key <code>@iri</code> and
1532+
<code>@id</code> and the value is a string that is an IRI or
1533+
a <tref>JSON object</tref> containing the key <code>@id</code> and
15381534
a value that is a string that is an IRI.
15391535
</dd>
15401536
<dt><tdef>list of expanded nodes</tdef></dt>
@@ -1707,7 +1703,7 @@ <h3>Normalization Algorithm</h3>
17071703
<ol class="algorithm">
17081704
<li>If the <tref>expanded node</tref> is an unlabeled node, add a
17091705
new key-value pair to the <tref>expanded node</tref>
1710-
where the key is <code>@subject</code> and the value is the
1706+
where the key is <code>@id</code> and the value is the
17111707
concatenation of the <tref>labeling prefix</tref>
17121708
and the string value of the <tref>labeling counter</tref>.
17131709
Increment the <tref>labeling counter</tref>.</li>
@@ -1731,8 +1727,8 @@ <h3>Normalization Algorithm</h3>
17311727
</li>
17321728
<li>After exiting the recursive step, replace the reference to the
17331729
<tref>expanded node</tref> with an object containing a single
1734-
key-value pair where the key is <code>@iri</code> and the value is
1735-
the value of the <code>@subject</code> key in the node.</li>
1730+
key-value pair where the key is <code>@id</code> and the value is
1731+
the value of the <code>@id</code> key in the node.</li>
17361732
</ol>
17371733
</li>
17381734
<li>For every entry in the <tref>map of flattened nodes</tref>, insert a
@@ -1747,7 +1743,7 @@ <h3>Normalization Algorithm</h3>
17471743
<li>For every entry in the <tref>node state map</tref> that has a
17481744
<tref>label</tref> that begins with <code>_:c14n</code>, relabel the node using the
17491745
<a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. <li>Label all
1750-
of the nodes that contain a <code>@subject</code> key associated with a value
1746+
of the nodes that contain a <code>@id</code> key associated with a value
17511747
starting with <code>_:</code> according to the steps in the <a
17521748
href="#deterministic-labeling-algorithm">Deterministic Labeling Algorithm</a>.</li>
17531749
</ol>
@@ -1965,7 +1961,7 @@ <h4>Object Comparison Algorithm</h4>
19651961
</ol>
19661962
</li>
19671963
<li>If both values are expanded <tref>IRI</tref>s, the
1968-
lexicographically lesser string associated with <code>@iri</code>
1964+
lexicographically lesser string associated with <code>@id</code>
19691965
is first.</li>
19701966
<li>Otherwise, the two values are equivalent.</li>
19711967
</ol>
@@ -2397,7 +2393,7 @@ <h4>Label Serialization Algorithm</h4>
23972393
<li>Append all properties to the <tref>label serialization</tref> by
23982394
processing each key-value pair in the <tref>node reference</tref>,
23992395
excluding the
2400-
<code>@subject</code> property. The keys should be processed in
2396+
<code>@id</code> property. The keys should be processed in
24012397
lexicographical order and their associated values should be processed
24022398
in the order produced by the
24032399
<a href="#object-comparison-algorithm">Object Comparison Algorithm</a>:
@@ -2409,15 +2405,15 @@ <h4>Label Serialization Algorithm</h4>
24092405
Process all of the objects that are associated with the key, building
24102406
an <tdef>object string</tdef> for each item:
24112407
<ol class="algorithm">
2412-
<li>If the object contains an <code>@iri</code> key with a
2408+
<li>If the object contains an <code>@id</code> key with a
24132409
value that starts
24142410
with <code>_:</code>, set the <tref>object string</tref> to
24152411
the value <code>_:</code>. If the value does not
24162412
start with <code>_:</code>, build the <tref>object string</tref>
24172413
using the pattern
24182414
<code>&lt;</code><strong>IRI</strong><code>&gt;</code>
24192415
where <strong>IRI</strong> is the value associated with the
2420-
<code>@iri</code> key.</li>
2416+
<code>@id</code> key.</li>
24212417
<li>If the object contains a <code>@literal</code> key and a
24222418
<code>@datatype</code> key, build the <tref>object string</tref>
24232419
using the pattern
@@ -2642,13 +2638,6 @@ <h3>RDF Conversion Algorithm</h3>
26422638
Create a copy of the current <tref>JSON object</tref>, changing keys that map to JSON-LD keywords
26432639
with those keywords. Use the new <tref>JSON object</tref> in subsequent steps.
26442640
</li>
2645-
<li>
2646-
If the <tref>JSON object</tref> has an <code>@iri</code> key, set the <tref>active object</tref> by
2647-
performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. Generate a
2648-
triple representing the <tref>active subject</tref>, the <tref>active property</tref> and the
2649-
<tref>active object</tref>. Return the <tref>active object</tref> to the calling location.
2650-
<p class="issue"><code>@iri</code> really just behaves the same as <code>@subject</code>, consider consolidating them.</p>
2651-
</li>
26522641
<li>
26532642
If the <tref>JSON object</tref> has a <code>@literal</code> key, set the <tref>active object</tref>
26542643
to a literal value as follows:
@@ -2673,7 +2662,7 @@ <h3>RDF Conversion Algorithm</h3>
26732662
process the value as a list starting at <a href="#processing-step-list">Step 3.1</a> as if the
26742663
<tref>active property</tref> is the target of a <code>@list</code> coercion.
26752664
</li>
2676-
<li id="processing-step-subject">If the <tref>JSON object</tref> has a <code>@subject</code> key:
2665+
<li id="processing-step-subject">If the <tref>JSON object</tref> has a <code>@id</code> key:
26772666
<ol class="algorithm">
26782667
<li>
26792668
If the value is a <tref>string</tref>, set the <tref>active object</tref> to the result of performing
@@ -2695,7 +2684,7 @@ <h3>RDF Conversion Algorithm</h3>
26952684
</ol>
26962685
</li>
26972686
<li>
2698-
If the <tref>JSON object</tref> does not have a <code>@subject</code> key, set the <tref>active
2687+
If the <tref>JSON object</tref> does not have a <code>@id</code> key, set the <tref>active
26992688
object</tref> to newly generated <tref>blank node</tref>. Generate a triple
27002689
representing the <tref>active subject</tref>, the <tref>active property</tref> and the
27012690
<tref>active object</tref>. Set the <tref>active subject</tref> to the <tref>active
@@ -2792,7 +2781,7 @@ <h3>RDF Conversion Algorithm</h3>
27922781
If a <tref>string</tref> is detected:
27932782
<ol class="algorithm">
27942783
<li>
2795-
If the <tref>active property</tref> is the target of a <code>@iri</code> coercion,
2784+
If the <tref>active property</tref> is the target of a <code>@id</code> coercion,
27962785
set the <tref>active object</tref> by
27972786
performing <a href="#iri-expansion">IRI Expansion</a> on the string.
27982787
</li>
@@ -2844,6 +2833,7 @@ <h1>Acknowledgements</h1>
28442833
including the normalization algorithm which was a monumentally difficult
28452834
design challenge.
28462835
</p>
2836+
<p class="issue">Dave is an editor, and probably shouldn't also be in acknowledgments.</p>
28472837
</section>
28482838

28492839
</body>

0 commit comments

Comments
 (0)