Skip to content

Commit

Permalink
Add change marking to highlight notable changes since the 1.0 Recomme…
Browse files Browse the repository at this point in the history
…ndation.
  • Loading branch information
gkellogg committed Jan 7, 2017
1 parent 44dfa82 commit aee392b
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 66 deletions.
2 changes: 2 additions & 0 deletions spec/latest/common/typographical-conventions.html
Expand Up @@ -19,6 +19,8 @@
<dd>A hyperlink is underlined and in blue.</dd>
<dt>[<a href=".">reference</a>]</dt>
<dd>A document reference (normative or informative) is enclosed in square brackets and links to the references section.</dd>
<dt class="changed">Changes from Recommendation</dt>
<dd>Sections or phrases changed from the previous Recommendation are <span class="changed">highlighted</span>.</dd>
</dl>

<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>
Expand Down
104 changes: 61 additions & 43 deletions spec/latest/json-ld-api/index.html
Expand Up @@ -70,7 +70,7 @@
],

bugTracker: {
open: "https://github.com/json-ld/json-ld.org/issues?q=is%3Aopen+is%3Aissue+label%3A1.1+label%3Aapi",
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",
new: "https://github.com/json-ld/json-ld.org/issues/new"
},

Expand Down Expand Up @@ -127,6 +127,13 @@
counter-increment: numsection;
content: counters(numsection, ".") ") ";
}
.changed {
background-color: rgb(215, 238, 197);
}
.changed:hover {
color: green;
background-color: inherit;
}
</style>
</head>

Expand Down Expand Up @@ -577,8 +584,9 @@ <h2>RDF Serialization/Deserialization</h2>

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

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

<p>The algorithm also performs processing steps specific to expanding
<p class="changed">The algorithm also performs processing steps specific to expanding
a <a>JSON-LD Frame</a>. For a <a>frame</a>, the <code>@id</code> and
<code>@type</code> properties can accept an array of <a>IRIs</a> or
an empty <a>dictionary</a>. The properties of a <a>value object</a> can also
Expand Down Expand Up @@ -1288,12 +1297,13 @@ <h3>Algorithm</h3>
<a href="#iri-expansion">IRI Expansion algorithm</a>,
passing <a>active context</a>, <em>value</em>, and <code>true</code>
for <em>document relative</em>.
When the <code>frame expansion</code> flag is set, <em>value</em>
may be an empty <a>dictionary</a>, or an <a>array</a> of one
or more <a>strings</a>. <em>Expanded value</em> will be
an <a>array</a> of one or more of these, with <a>string</a>
values expanded using the <a
href="#iri-expansion">IRI Expansion Algorithm</a>.</li>
<span class="changed">
When the <code>frame expansion</code> flag is set, <em>value</em>
may be an empty <a>dictionary</a>, or an <a>array</a> of one
or more <a>strings</a>. <em>Expanded value</em> will be
an <a>array</a> of one or more of these, with <a>string</a>
values expanded using the <a
href="#iri-expansion">IRI Expansion Algorithm</a>.</span></li>
<li>If <em>expanded property</em> is <code>@type</code> and <em>value</em>
is neither a <a>string</a> nor an <a>array</a> of
<a>strings</a>, an
Expand All @@ -1304,13 +1314,15 @@ <h3>Algorithm</h3>
<a>active context</a>, <code>true</code> for <em>vocab</em>,
and <code>true</code> for <em>document relative</em> to expand the <em>value</em>
or each of its items.
When the <code>frame expansion</code> flag is set, <em>value</em>
may also be an empty <a>dictionary</a>.</li>
<span class="changed">
When the <code>frame expansion</code> flag is set, <em>value</em>
may also be an empty <a>dictionary</a>.</span></li>
<li>If <em>expanded property</em> is <code>@graph</code>, set
<em>expanded value</em> to the result of using this algorithm
recursively passing <a>active context</a>, <code>@graph</code>
for <a>active property</a>, and <em>value</em> for <em>element</em>,
ensuring that <em>expanded value</em> is an <a>array</a> of one or more <a>dictionaries</a>.</li>
<span class="changed">
ensuring that <em>expanded value</em> is an <a>array</a> of one or more <a>dictionaries</a></span>.</li>
<li>If <em>expanded property</em> is <code>@value</code> and
<em>value</em> is not a <a>scalar</a> or <code>null</code>, an
<a data-link-for="JsonLdErrorCode">invalid value object value</a>
Expand All @@ -1321,19 +1333,21 @@ <h3>Algorithm</h3>
next <em>key</em> from <em>element</em>. Null values need to be preserved
in this case as the meaning of an <code>@type</code> member depends
on the existence of an <code>@value</code> member.
When the <code>frame expansion</code> flag is set, <em>value</em>
may also be an empty <a>dictionary</a> or an array of
<a>scalar</a> values. <em>Expanded value</em> will be <a>null</a>, or an
<a>array</a> of one or more <a>scalar</a> values.</li>
<span class="changed">
When the <code>frame expansion</code> flag is set, <em>value</em>
may also be an empty <a>dictionary</a> or an array of
<a>scalar</a> values. <em>Expanded value</em> will be <a>null</a>, or an
<a>array</a> of one or more <a>scalar</a> values.</span></li>
<li>If <em>expanded property</em> is <code>@language</code> and
<em>value</em> is not a <a>string</a>, an
<a data-link-for="JsonLdErrorCode">invalid language-tagged string</a>
error has been detected and processing is aborted. Otherwise,
set <em>expanded value</em> to lowercased <em>value</em>.
When the <code>frame expansion</code> flag is set, <em>value</em>
may also be an empty <a>dictionary</a> or an array of zero or
<a>strings</a>. <em>Expanded value</em> will be an
<a>array</a> of one or more <a>string</a> values converted to lower case.</li>
error has been detected and processing is aborted.
<span class="changed">
Otherwise, set <em>expanded value</em> to lowercased <em>value</em>.
When the <code>frame expansion</code> flag is set, <em>value</em>
may also be an empty <a>dictionary</a> or an array of zero or
<a>strings</a>. <em>Expanded value</em> will be an
<a>array</a> of one or more <a>string</a> values converted to lower case.</span></li>
<li>If <em>expanded property</em> is <code>@index</code> and
<em>value</em> is not a <a>string</a>, an
<a data-link-for="JsonLdErrorCode">invalid @index value</a>
Expand Down Expand Up @@ -1403,7 +1417,7 @@ <h3>Algorithm</h3>
<li>Continue with the next <em>key</em> from <em>element</em>.</li>
</ol>
</li>
<li>When the <code>frame expansion</code> flag is set,
<li class="changed">When the <code>frame expansion</code> flag is set,
if <em>expanded property</em> is any other
framing keyword (<code>@explicit</code>, <code>@default</code>,
<code>@embed</code>, <code>@explicit</code>, <code>@omitDefault</code>, or
Expand All @@ -1418,14 +1432,14 @@ <h3>Algorithm</h3>
<li>Continue with the next <em>key</em> from <em>element</em>.</li>
</ol>
</li>
<li>If <em>key</em>'s <a>term definition</a> in <a>active context</a>
<li class="changed">If <em>key</em>'s <a>term definition</a> in <a>active context</a>
has a <a>local context</a>, set <em>term context</em> to the result of the
<a href="#context-processing-algorithm">Context Processing algorithm</a>,
passing <a>active context</a> and the value of the
<em>key</em>'s <a>local context</a> as <a>local context</a>. Otherwise,
set <em>term context</em> to <a>active context</a>.</li>
<li>If <em>key</em>'s <a>container mapping</a> in
<em>term context</em> is <code>@language</code> and
<em class="changed">term context</em> is <code>@language</code> and
<em>value</em> is a <a>JSON object</a> then <em>value</em>
is expanded from a <a>language map</a>
as follows:
Expand Down Expand Up @@ -1456,7 +1470,7 @@ <h3>Algorithm</h3>
</ol>
</li>
<li>Otherwise, if <em>key</em>'s <a>container mapping</a> in
<em>term context</em> is <code>@index</code> and
<em class="changed">term context</em> is <code>@index</code> and
<em>value</em> is a <a>JSON object</a> then <em>value</em>
is expanded from an index map as follows:
<ol class="algorithm">
Expand All @@ -1470,7 +1484,7 @@ <h3>Algorithm</h3>
<em>index value</em>.</li>
<li>Initialize <em>index value</em> to the result of
using this algorithm recursively, passing
<em>term context</em> as <a>active context</a>,
<em class="changed">term context</em> as <a>active context</a>,
<em>key</em> as <a>active property</a>,
and <em>index value</em> as <em>element</em>.</li>
<li>For each <em>item</em> in <em>index value</em>:
Expand All @@ -1487,13 +1501,13 @@ <h3>Algorithm</h3>
</ol>
</li>
<li>Otherwise, initialize <em>expanded value</em> to the result of
using this algorithm recursively, passing <em>term context</em> as <a>active context</a>,
using this algorithm recursively, passing <em class="changed">term context</em> as <a>active context</a>,
<em>key</em> for <a>active property</a>, and <em>value</em>
for <em>element</em>.</li>
<li>If <em>expanded value</em> is <code>null</code>, ignore <em>key</em>
by continuing to the next <em>key</em> from <em>element</em>.</li>
<li>If the <a>container mapping</a> associated to <em>key</em> in
<em>term context</em> is <code>@list</code> and
<em class="changed">term context</em> is <code>@list</code> and
<em>expanded value</em> is not already a <a>list object</a>,
convert <em>expanded value</em> to a <a>list object</a>
by first setting it to an <a>array</a> containing only
Expand Down Expand Up @@ -1750,7 +1764,7 @@ <h3>Algorithm</h3>
is set to <code>true</code>.</p>

<ol class="algorithm">
<li>If the <a>term definition</a> for <a>active property</a> has a
<li class="changed">If the <a>term definition</a> for <a>active property</a> has a
<a>local context</a>:
<ol class="algorithm">
<li>Set <a>active context</a> to the result of the
Expand Down Expand Up @@ -2960,7 +2974,7 @@ <h3>Algorithm</h3>
</section>
</section> <!-- end of Generate Blank Node Identifier -->

<section>
<section class="changed">
<h3>Merge Node Maps</h3>
<p>This algorithm creates a new map of <a>subjects</a> to <a>nodes</a> using all graphs
contained in the <em>graph map</em> created using the <a href="#node-map-generation">Node Map Generation algorithm</a>
Expand Down Expand Up @@ -3410,8 +3424,9 @@ <h2>Algorithm</h2>
<li>While <em>property</em> equals <code>rdf:rest</code>,
the <a>array</a> value of the member of <em>node usages map</em> associated with the <code>@id</code>
member of <code>node</code> has only one member,
the value associated to the <code>usages</code> member of <i>node</i> has
exactly 1 entry,
<span class="changed">
the value associated to the <code>usages</code> member of <i>node</i> has
exactly 1 entry,</span>
<em>node</em> has a <code>rdf:first</code> and <code>rdf:rest</code> property,
both of which have as value an <a>array</a> consisting of a single element,
and <em>node</em> has no other members apart from an optional <code>@type</code>
Expand Down Expand Up @@ -4131,8 +4146,8 @@ <h4>JsonLdErrorCode</h4>
<dt><dfn>invalid reverse property value</dfn></dt>
<dd>An invalid value for a reverse property has been detected. The value of an inverse
property must be a <a>node object</a>.</dd>
<dt><dfn>invalid scoped context</dfn></dt>
<dd>The <a>local context</a> defined within a <a>term definition</a> is invalid.</dd>
<dt class="changed"><dfn>invalid scoped context</dfn></dt>
<dd class="changed">The <a>local context</a> defined within a <a>term definition</a> is invalid.</dd>
<dt><dfn>invalid set or list object</dfn></dt>
<dd>A <a>set object</a> or <a>list object</a> with
disallowed members has been detected.</dd>
Expand Down Expand Up @@ -4181,37 +4196,40 @@ <h4>JsonLdErrorCode</h4>
<section class="appendix informative">
<h2>Changes since 1.0 Recommendation of 16 January 2014</h2>
<ul>
<li>The <a href="#expansion-algorithm">Expansion Algorithm</a>
has a special processing mode, based on
the <code>frame expansion</code> flag, to enable content associated with JSON-LD
frames, which may not otherwise be valid <a>JSON-LD documents</a>.</li>
<li>An <a>expanded term definition</a> can now have an
<code>@context</code> property, which defines a context used for values of
a <a>property</a> identified with such a <a>term</a>. This context is used
in both the <a href="#expansion-algorithm">Expansion Algorithm</a> and
<a href="#compaction-algorithm">Compaction Algorithm</a>.</li>
<li>A new <a href="#merge-node-maps" class="sectionRef"></a> is required
for framing, to create a single graph from the <a data-lt="default graph">default</a>
and <a>named graphs</a>.</li>
</ul>
</section>

<section class="appendix informative">
<h2>Open Issues</h2>
<p>The following is a list of open issues being worked on for the next release.</p>
<p class="issue" data-number="110"></p>
<p class="issue" data-number="140"></p>
<p class="issue" data-number="195"></p>
<p class="issue" data-number="246"></p>
<p class="issue" data-number="247"></p>
<p class="issue" data-number="262"></p>
<p class="issue" data-number="269"></p>
<p class="issue" data-number="271"></p>
<p class="issue" data-number="272"></p>
<p class="issue" data-number="293"></p>
<p class="issue" data-number="333"></p>
<p class="issue" data-number="357"></p>
<p class="issue" data-number="369"></p>
<p class="issue" data-number="375"></p>
<p class="issue" data-number="385"></p>
<p class="issue" data-number="397"></p>
<p class="issue" data-number="398"></p>
<p class="issue" data-number="405"></p>
<p class="issue" data-number="415"></p>
<p class="issue" data-number="426"></p>
<p class="issue" data-number="446"></p>
</section>

<section class="appendix informative">
Expand Down

0 comments on commit aee392b

Please sign in to comment.