Skip to content

Commit 3d92431

Browse files
davidlehngkellogg
authored andcommitted
@graph container support (#549)
* Add @graph container tests. * A couple of more graph expansion and compaction tests for corner cases. * Add tests for expanding and compacting named graphs where term definition includes `@graphid`. * Expand and compact `@container: @index` where value is a graph. * Disable highlight.js, and update our use of the "highlight" class to "hl-bold". This makes rendered JavaScript examples slightly less pretty, but restores the specific highlighting used with "****" in examples. * Sort many definition lists automatically using `@data-sort`. * Add @Version to context definitions in examples using 1.1 features. * Syntax updates to describe Graph Containers. * Add inline ednotes for places that are affected by issue #480. * Add compaction and expansion tests for `@graph` with `@index` and `@id`. * Add syntax for graph maps and API algorithms for all graph containers.
1 parent b6670fb commit 3d92431

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1578
-217
lines changed

spec/latest/common/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function updateExample(doc, content) {
173173
// perform transformations to make it render and prettier
174174
content = unComment(doc, content);
175175
content = _esc(content);
176-
content = content.replace(/\*\*\*\*([^*]*)\*\*\*\*/g, '<span class="highlight">$1</span>');
176+
content = content.replace(/\*\*\*\*([^*]*)\*\*\*\*/g, '<span class="hl-bold">$1</span>');
177177
content = content.replace(/####([^#]*)####/g, '<span class="comment">$1</span>');
178178
return content ;
179179
}

spec/latest/common/terms.html

+20-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h1>General Terminology</h1>
44
<p>This document uses the following terms as defined in JSON [[!RFC7159]]. Refer
55
to the <a data-cite="RFC7159#section-2">JSON Grammar section</a> in [[!RFC7159]] for formal definitions.</p>
66

7-
<dl class="termlist">
7+
<dl class="termlist" data-sort>
88
<dt><dfn data-lt="arrays">array</dfn></dt><dd>
99
In the JSON serialization, an array structure is represented as square brackets surrounding zero
1010
or more values. Values are separated by commas.
@@ -59,7 +59,7 @@ <h1>General Terminology</h1>
5959

6060
<p>Furthermore, the following terminology is used throughout this document:</p>
6161

62-
<dl class="termlist">
62+
<dl class="termlist" data-sort>
6363
<dt><dfn data-lt="absolute IRIs">absolute IRI</dfn></dt><dd>
6464
An <a data-cite="RFC3987#section-1.3" class="externalDFN">absolute IRI</a> is defined in [[!RFC3987]] containing a <em>scheme</em> along with a <em>path</em> and
6565
optional <em>query</em> and fragment segments.</dd>
@@ -94,7 +94,9 @@ <h1>General Terminology</h1>
9494
if a <a>named graph</a> is not specified.</dd>
9595
<dt><dfn>default language</dfn></dt><dd>
9696
The default language is set in the <a>context</a> using the <code>@language</code> key whose
97-
value MUST be a <a>string</a> representing a [[!BCP47]] language code or <code>null</code>.</dd>
97+
value MUST be a <a>string</a> representing a [[!BCP47]] language code or <code>null</code>.
98+
<span class="ednote">From <a href="#issue-480">Issue 480</a>
99+
the language tag <code>@none</code> represents no language.</span></dd>
98100
<dt><dfn>default object</dfn></dt><dd>
99101
A <a>default object</a> is a <a>JSON object</a> that has a <code>@default</code> member.</dd>
100102
<dt><dfn data-lt="edges">edge</dfn></dt><dd>
@@ -122,6 +124,16 @@ <h1>General Terminology</h1>
122124
of the associated <a>node object</a>; value MUST be a <a>node object</a>.
123125
If the value contains a property expanding to <code>@id</code>, it's value MUST
124126
be equivalent to the referencing key.</dd>
127+
<dt class="changed"><dfn data-lt="graph objects">graph object</dfn></dt><dd class="changed">
128+
A <a>graph object</a> represents a <a>named graph</a> represented as the
129+
value of a <a>property</a> within a <a>node object</a>. When expanded, a
130+
graph object MUST have an <code>@graph</code> member, and may also have
131+
<code>@context</code>, <code>@id</code>, and <code>@index</code> members.
132+
A <dfn class="preserve" data-lt="simple graph objects">simple graph object</dfn> is a
133+
<a>graph object</a> which does not have an <code>@id</code> member. Note
134+
that <a>node objects</a> may have a <code>@graph</code> member, but are
135+
not considered <a>graph objects</a> if they include any other properties.
136+
A top-level object consisting of <code>@graph</code> is also not a <a>graph object</a>.</dd>
125137
<dt><dfn data-lt="index maps">index map</dfn></dt><dd>
126138
An <a>index map</a> is a <a>JSON object</a> value of a <a>term</a> defined with
127139
<code>@container</code> set to <code>@index</code>, whose values MUST be any of the following types:
@@ -186,7 +198,10 @@ <h1>General Terminology</h1>
186198
A <a>context</a> that is specified within a <a>JSON object</a>,
187199
specified via the <code>@context</code> <a>keyword</a>.</dd>
188200
<dt><dfn data-lt="named graphs">named graph</dfn></dt><dd>
189-
A <a data-cite="RDF11-CONCEPTS#dfn-named-graph" class="externalDFN">named graph</a> is a <a>linked data graph</a> that is identified by an <a>IRI</a> or <a>blank node</a>
201+
A <a data-cite="RDF11-CONCEPTS#dfn-named-graph" class="externalDFN">named graph</a> is a <a>linked data graph</a> that is identified by an <a>IRI</a> or <a>blank node</a>.</dd>
202+
<dt><dfn data-lt="implicitly named graphs">implicitly named graph</dfn></dt><dd>
203+
A <a>named graph</a> created from the value of a property having an
204+
<a>expanded term definition</a> where <code>@container</code> is set to <code>@graph</code>.</dd>
190205
<dt><dfn data-lt="nested properties">nested property</dfn></dt><dd>
191206
A <a>nested property</a> is a <a>property</a> which is contained within an object referenced by
192207
a semantically meaningless <em>nesting property</em>.
@@ -283,7 +298,7 @@ <h1>Algorithm Terms</h1>
283298

284299
<p>The Following terms are used within specific algorithms.</p>
285300

286-
<dl class="termlist">
301+
<dl class="termlist" data-sort>
287302
<dt><dfn>active context</dfn></dt><dd>
288303
A <a>context</a> that is used to resolve <a>terms</a> while the processing
289304
algorithm is running.</dd>

0 commit comments

Comments
 (0)