Skip to content

Commit 3f78a48

Browse files
authored
Merge pull request #448 from json-ld/change-highlighting
Add change marking to highlight notable changes since the 1.0 Recommendation.
2 parents 44dfa82 + aee392b commit 3f78a48

File tree

4 files changed

+136
-66
lines changed

4 files changed

+136
-66
lines changed

spec/latest/common/typographical-conventions.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<dd>A hyperlink is underlined and in blue.</dd>
2020
<dt>[<a href=".">reference</a>]</dt>
2121
<dd>A document reference (normative or informative) is enclosed in square brackets and links to the references section.</dd>
22+
<dt class="changed">Changes from Recommendation</dt>
23+
<dd>Sections or phrases changed from the previous Recommendation are <span class="changed">highlighted</span>.</dd>
2224
</dl>
2325

2426
<p class="note">Notes are in light green boxes with a green left border and with a "Note" header in green. Notes are normative or informative depending on the whether they are in a normative or informative section, respectively.</p>

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

Lines changed: 61 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
],
7171

7272
bugTracker: {
73-
open: "https://github.com/json-ld/json-ld.org/issues?q=is%3Aopen+is%3Aissue+label%3A1.1+label%3Aapi",
73+
open: "https://github.com/json-ld/json-ld.org/issues?utf8=✓&q=is%3Aissue%20label%3Aapi%20is%3Aopen%20milestone%3A%22JSON-LD%201.1%22%20",
7474
new: "https://github.com/json-ld/json-ld.org/issues/new"
7575
},
7676

@@ -127,6 +127,13 @@
127127
counter-increment: numsection;
128128
content: counters(numsection, ".") ") ";
129129
}
130+
.changed {
131+
background-color: rgb(215, 238, 197);
132+
}
133+
.changed:hover {
134+
color: green;
135+
background-color: inherit;
136+
}
130137
</style>
131138
</head>
132139

@@ -577,8 +584,9 @@ <h2>RDF Serialization/Deserialization</h2>
577584

578585
<p>A conforming <a>JSON-LD Processor</a> is a system which can perform the
579586
<a href="#expansion-algorithm">Expansion</a>, <a href="#compaction-algorithm">Compaction</a>,
580-
and <a href="#flattening-algorithm">Flattening</a> operations in a manner consistent with
581-
the algorithms defined in this specification.</p>
587+
and <a href="#flattening-algorithm">Flattening</a> operations
588+
<span class="changed">in a manner consistent with
589+
the algorithms defined in this specification</span>.</p>
582590

583591
<p><a>JSON-LD Processors</a> MUST NOT
584592
attempt to correct malformed <a>IRIs</a> or language tags;
@@ -621,7 +629,8 @@ <h2>Context Processing Algorithm</h2>
621629
<a>term definition</a> consists of an <dfn data-lt="IRI mappings">IRI mapping</dfn>, a boolean
622630
flag <dfn data-lt="reverse properties">reverse property</dfn>, an optional <dfn data-lt="type mappings">type mapping</dfn>
623631
or <dfn data-lt="language mappings">language mapping</dfn>,
624-
an optional context, and an optional <dfn data-lt="container mappings">container mapping</dfn>.
632+
<span class="changed">an optional context</span>,
633+
and an optional <dfn data-lt="container mappings">container mapping</dfn>.
625634
A <a>term definition</a> can not only be used to map a <a>term</a>
626635
to an IRI, but also to map a <a>term</a> to a <a>keyword</a>,
627636
in which case it is referred to as a <dfn data-lt="keyword aliases">keyword alias</dfn>.</p>
@@ -985,7 +994,7 @@ <h3>Algorithm</h3>
985994
<em>container</em>.</li>
986995
</ol>
987996
</li>
988-
<li>If <em>value</em> contains the key <code>@context</code>:
997+
<li class="changed">If <em>value</em> contains the key <code>@context</code>:
989998
<ol class="algorithm">
990999
<li>Initialize <em>context</em> to the value associated with the
9911000
<code>@context</code> key, which is treated as a <a>local context</a>.</li>
@@ -1205,7 +1214,7 @@ <h3>Algorithm</h3>
12051214
To begin, the <a>active property</a> is set to <code>null</code>,
12061215
and <em>element</em> is set to the <a>JSON-LD input</a>.</p>
12071216

1208-
<p>The algorithm also performs processing steps specific to expanding
1217+
<p class="changed">The algorithm also performs processing steps specific to expanding
12091218
a <a>JSON-LD Frame</a>. For a <a>frame</a>, the <code>@id</code> and
12101219
<code>@type</code> properties can accept an array of <a>IRIs</a> or
12111220
an empty <a>dictionary</a>. The properties of a <a>value object</a> can also
@@ -1288,12 +1297,13 @@ <h3>Algorithm</h3>
12881297
<a href="#iri-expansion">IRI Expansion algorithm</a>,
12891298
passing <a>active context</a>, <em>value</em>, and <code>true</code>
12901299
for <em>document relative</em>.
1291-
When the <code>frame expansion</code> flag is set, <em>value</em>
1292-
may be an empty <a>dictionary</a>, or an <a>array</a> of one
1293-
or more <a>strings</a>. <em>Expanded value</em> will be
1294-
an <a>array</a> of one or more of these, with <a>string</a>
1295-
values expanded using the <a
1296-
href="#iri-expansion">IRI Expansion Algorithm</a>.</li>
1300+
<span class="changed">
1301+
When the <code>frame expansion</code> flag is set, <em>value</em>
1302+
may be an empty <a>dictionary</a>, or an <a>array</a> of one
1303+
or more <a>strings</a>. <em>Expanded value</em> will be
1304+
an <a>array</a> of one or more of these, with <a>string</a>
1305+
values expanded using the <a
1306+
href="#iri-expansion">IRI Expansion Algorithm</a>.</span></li>
12971307
<li>If <em>expanded property</em> is <code>@type</code> and <em>value</em>
12981308
is neither a <a>string</a> nor an <a>array</a> of
12991309
<a>strings</a>, an
@@ -1304,13 +1314,15 @@ <h3>Algorithm</h3>
13041314
<a>active context</a>, <code>true</code> for <em>vocab</em>,
13051315
and <code>true</code> for <em>document relative</em> to expand the <em>value</em>
13061316
or each of its items.
1307-
When the <code>frame expansion</code> flag is set, <em>value</em>
1308-
may also be an empty <a>dictionary</a>.</li>
1317+
<span class="changed">
1318+
When the <code>frame expansion</code> flag is set, <em>value</em>
1319+
may also be an empty <a>dictionary</a>.</span></li>
13091320
<li>If <em>expanded property</em> is <code>@graph</code>, set
13101321
<em>expanded value</em> to the result of using this algorithm
13111322
recursively passing <a>active context</a>, <code>@graph</code>
13121323
for <a>active property</a>, and <em>value</em> for <em>element</em>,
1313-
ensuring that <em>expanded value</em> is an <a>array</a> of one or more <a>dictionaries</a>.</li>
1324+
<span class="changed">
1325+
ensuring that <em>expanded value</em> is an <a>array</a> of one or more <a>dictionaries</a></span>.</li>
13141326
<li>If <em>expanded property</em> is <code>@value</code> and
13151327
<em>value</em> is not a <a>scalar</a> or <code>null</code>, an
13161328
<a data-link-for="JsonLdErrorCode">invalid value object value</a>
@@ -1321,19 +1333,21 @@ <h3>Algorithm</h3>
13211333
next <em>key</em> from <em>element</em>. Null values need to be preserved
13221334
in this case as the meaning of an <code>@type</code> member depends
13231335
on the existence of an <code>@value</code> member.
1324-
When the <code>frame expansion</code> flag is set, <em>value</em>
1325-
may also be an empty <a>dictionary</a> or an array of
1326-
<a>scalar</a> values. <em>Expanded value</em> will be <a>null</a>, or an
1327-
<a>array</a> of one or more <a>scalar</a> values.</li>
1336+
<span class="changed">
1337+
When the <code>frame expansion</code> flag is set, <em>value</em>
1338+
may also be an empty <a>dictionary</a> or an array of
1339+
<a>scalar</a> values. <em>Expanded value</em> will be <a>null</a>, or an
1340+
<a>array</a> of one or more <a>scalar</a> values.</span></li>
13281341
<li>If <em>expanded property</em> is <code>@language</code> and
13291342
<em>value</em> is not a <a>string</a>, an
13301343
<a data-link-for="JsonLdErrorCode">invalid language-tagged string</a>
1331-
error has been detected and processing is aborted. Otherwise,
1332-
set <em>expanded value</em> to lowercased <em>value</em>.
1333-
When the <code>frame expansion</code> flag is set, <em>value</em>
1334-
may also be an empty <a>dictionary</a> or an array of zero or
1335-
<a>strings</a>. <em>Expanded value</em> will be an
1336-
<a>array</a> of one or more <a>string</a> values converted to lower case.</li>
1344+
error has been detected and processing is aborted.
1345+
<span class="changed">
1346+
Otherwise, set <em>expanded value</em> to lowercased <em>value</em>.
1347+
When the <code>frame expansion</code> flag is set, <em>value</em>
1348+
may also be an empty <a>dictionary</a> or an array of zero or
1349+
<a>strings</a>. <em>Expanded value</em> will be an
1350+
<a>array</a> of one or more <a>string</a> values converted to lower case.</span></li>
13371351
<li>If <em>expanded property</em> is <code>@index</code> and
13381352
<em>value</em> is not a <a>string</a>, an
13391353
<a data-link-for="JsonLdErrorCode">invalid @index value</a>
@@ -1403,7 +1417,7 @@ <h3>Algorithm</h3>
14031417
<li>Continue with the next <em>key</em> from <em>element</em>.</li>
14041418
</ol>
14051419
</li>
1406-
<li>When the <code>frame expansion</code> flag is set,
1420+
<li class="changed">When the <code>frame expansion</code> flag is set,
14071421
if <em>expanded property</em> is any other
14081422
framing keyword (<code>@explicit</code>, <code>@default</code>,
14091423
<code>@embed</code>, <code>@explicit</code>, <code>@omitDefault</code>, or
@@ -1418,14 +1432,14 @@ <h3>Algorithm</h3>
14181432
<li>Continue with the next <em>key</em> from <em>element</em>.</li>
14191433
</ol>
14201434
</li>
1421-
<li>If <em>key</em>'s <a>term definition</a> in <a>active context</a>
1435+
<li class="changed">If <em>key</em>'s <a>term definition</a> in <a>active context</a>
14221436
has a <a>local context</a>, set <em>term context</em> to the result of the
14231437
<a href="#context-processing-algorithm">Context Processing algorithm</a>,
14241438
passing <a>active context</a> and the value of the
14251439
<em>key</em>'s <a>local context</a> as <a>local context</a>. Otherwise,
14261440
set <em>term context</em> to <a>active context</a>.</li>
14271441
<li>If <em>key</em>'s <a>container mapping</a> in
1428-
<em>term context</em> is <code>@language</code> and
1442+
<em class="changed">term context</em> is <code>@language</code> and
14291443
<em>value</em> is a <a>JSON object</a> then <em>value</em>
14301444
is expanded from a <a>language map</a>
14311445
as follows:
@@ -1456,7 +1470,7 @@ <h3>Algorithm</h3>
14561470
</ol>
14571471
</li>
14581472
<li>Otherwise, if <em>key</em>'s <a>container mapping</a> in
1459-
<em>term context</em> is <code>@index</code> and
1473+
<em class="changed">term context</em> is <code>@index</code> and
14601474
<em>value</em> is a <a>JSON object</a> then <em>value</em>
14611475
is expanded from an index map as follows:
14621476
<ol class="algorithm">
@@ -1470,7 +1484,7 @@ <h3>Algorithm</h3>
14701484
<em>index value</em>.</li>
14711485
<li>Initialize <em>index value</em> to the result of
14721486
using this algorithm recursively, passing
1473-
<em>term context</em> as <a>active context</a>,
1487+
<em class="changed">term context</em> as <a>active context</a>,
14741488
<em>key</em> as <a>active property</a>,
14751489
and <em>index value</em> as <em>element</em>.</li>
14761490
<li>For each <em>item</em> in <em>index value</em>:
@@ -1487,13 +1501,13 @@ <h3>Algorithm</h3>
14871501
</ol>
14881502
</li>
14891503
<li>Otherwise, initialize <em>expanded value</em> to the result of
1490-
using this algorithm recursively, passing <em>term context</em> as <a>active context</a>,
1504+
using this algorithm recursively, passing <em class="changed">term context</em> as <a>active context</a>,
14911505
<em>key</em> for <a>active property</a>, and <em>value</em>
14921506
for <em>element</em>.</li>
14931507
<li>If <em>expanded value</em> is <code>null</code>, ignore <em>key</em>
14941508
by continuing to the next <em>key</em> from <em>element</em>.</li>
14951509
<li>If the <a>container mapping</a> associated to <em>key</em> in
1496-
<em>term context</em> is <code>@list</code> and
1510+
<em class="changed">term context</em> is <code>@list</code> and
14971511
<em>expanded value</em> is not already a <a>list object</a>,
14981512
convert <em>expanded value</em> to a <a>list object</a>
14991513
by first setting it to an <a>array</a> containing only
@@ -1750,7 +1764,7 @@ <h3>Algorithm</h3>
17501764
is set to <code>true</code>.</p>
17511765

17521766
<ol class="algorithm">
1753-
<li>If the <a>term definition</a> for <a>active property</a> has a
1767+
<li class="changed">If the <a>term definition</a> for <a>active property</a> has a
17541768
<a>local context</a>:
17551769
<ol class="algorithm">
17561770
<li>Set <a>active context</a> to the result of the
@@ -2960,7 +2974,7 @@ <h3>Algorithm</h3>
29602974
</section>
29612975
</section> <!-- end of Generate Blank Node Identifier -->
29622976

2963-
<section>
2977+
<section class="changed">
29642978
<h3>Merge Node Maps</h3>
29652979
<p>This algorithm creates a new map of <a>subjects</a> to <a>nodes</a> using all graphs
29662980
contained in the <em>graph map</em> created using the <a href="#node-map-generation">Node Map Generation algorithm</a>
@@ -3410,8 +3424,9 @@ <h2>Algorithm</h2>
34103424
<li>While <em>property</em> equals <code>rdf:rest</code>,
34113425
the <a>array</a> value of the member of <em>node usages map</em> associated with the <code>@id</code>
34123426
member of <code>node</code> has only one member,
3413-
the value associated to the <code>usages</code> member of <i>node</i> has
3414-
exactly 1 entry,
3427+
<span class="changed">
3428+
the value associated to the <code>usages</code> member of <i>node</i> has
3429+
exactly 1 entry,</span>
34153430
<em>node</em> has a <code>rdf:first</code> and <code>rdf:rest</code> property,
34163431
both of which have as value an <a>array</a> consisting of a single element,
34173432
and <em>node</em> has no other members apart from an optional <code>@type</code>
@@ -4131,8 +4146,8 @@ <h4>JsonLdErrorCode</h4>
41314146
<dt><dfn>invalid reverse property value</dfn></dt>
41324147
<dd>An invalid value for a reverse property has been detected. The value of an inverse
41334148
property must be a <a>node object</a>.</dd>
4134-
<dt><dfn>invalid scoped context</dfn></dt>
4135-
<dd>The <a>local context</a> defined within a <a>term definition</a> is invalid.</dd>
4149+
<dt class="changed"><dfn>invalid scoped context</dfn></dt>
4150+
<dd class="changed">The <a>local context</a> defined within a <a>term definition</a> is invalid.</dd>
41364151
<dt><dfn>invalid set or list object</dfn></dt>
41374152
<dd>A <a>set object</a> or <a>list object</a> with
41384153
disallowed members has been detected.</dd>
@@ -4181,37 +4196,40 @@ <h4>JsonLdErrorCode</h4>
41814196
<section class="appendix informative">
41824197
<h2>Changes since 1.0 Recommendation of 16 January 2014</h2>
41834198
<ul>
4199+
<li>The <a href="#expansion-algorithm">Expansion Algorithm</a>
4200+
has a special processing mode, based on
4201+
the <code>frame expansion</code> flag, to enable content associated with JSON-LD
4202+
frames, which may not otherwise be valid <a>JSON-LD documents</a>.</li>
41844203
<li>An <a>expanded term definition</a> can now have an
41854204
<code>@context</code> property, which defines a context used for values of
41864205
a <a>property</a> identified with such a <a>term</a>. This context is used
41874206
in both the <a href="#expansion-algorithm">Expansion Algorithm</a> and
41884207
<a href="#compaction-algorithm">Compaction Algorithm</a>.</li>
4208+
<li>A new <a href="#merge-node-maps" class="sectionRef"></a> is required
4209+
for framing, to create a single graph from the <a data-lt="default graph">default</a>
4210+
and <a>named graphs</a>.</li>
41894211
</ul>
41904212
</section>
41914213

41924214
<section class="appendix informative">
41934215
<h2>Open Issues</h2>
41944216
<p>The following is a list of open issues being worked on for the next release.</p>
4195-
<p class="issue" data-number="110"></p>
41964217
<p class="issue" data-number="140"></p>
41974218
<p class="issue" data-number="195"></p>
41984219
<p class="issue" data-number="246"></p>
4199-
<p class="issue" data-number="247"></p>
4200-
<p class="issue" data-number="262"></p>
42014220
<p class="issue" data-number="269"></p>
42024221
<p class="issue" data-number="271"></p>
42034222
<p class="issue" data-number="272"></p>
42044223
<p class="issue" data-number="293"></p>
42054224
<p class="issue" data-number="333"></p>
42064225
<p class="issue" data-number="357"></p>
4207-
<p class="issue" data-number="369"></p>
42084226
<p class="issue" data-number="375"></p>
42094227
<p class="issue" data-number="385"></p>
4210-
<p class="issue" data-number="397"></p>
42114228
<p class="issue" data-number="398"></p>
42124229
<p class="issue" data-number="405"></p>
42134230
<p class="issue" data-number="415"></p>
42144231
<p class="issue" data-number="426"></p>
4232+
<p class="issue" data-number="446"></p>
42154233
</section>
42164234

42174235
<section class="appendix informative">

0 commit comments

Comments
 (0)