Skip to content

Commit bd6f8ae

Browse files
committed
Changed text accordingly to the decisions taken during F2F
1 parent 5536f20 commit bd6f8ae

File tree

1 file changed

+57
-68
lines changed

1 file changed

+57
-68
lines changed

index.html

Lines changed: 57 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -3105,7 +3105,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
31053105
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
31063106
</section>
31073107

3108-
<section class="informative changed"><h2>Sealed Contexts</h2>
3108+
<section class="informative changed"><h2>Sealed Term Definitions</h2>
31093109
<p>JSON-LD is used in many specifications as the specified data format.
31103110
However, there is also a desire to allow some JSON-LD contents to be processed as plain JSON,
31113111
without using any of the JSON-LD algorithms.
@@ -3116,15 +3116,15 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
31163116
On the other hand, "plain JSON" implementations may not be able to interpret these embedded contexts,
31173117
and hence will still interpret those terms with their original meaning.
31183118
To prevent this divergence of interpretation,
3119-
JSON-LD 1.1 allows a context to be sealed.
3119+
JSON-LD 1.1 allows term definitions to be <em>sealed</em>.
31203120
</p>
3121-
<p>A <dfn>sealed context</dfn> is a context with a member <code>@sealed</code> set to <code>true</code>.
3122-
It prevents further contexts to override its term definitions.
3121+
<p>A <dfn>sealed term definition</dfn> is a term definition with a member <code>@sealed</code> set to <code>true</code>.
3122+
It prevents further contexts to override this term definition.
31233123
</p>
31243124

31253125

31263126
<aside class="example ds-selector-tabs changed"
3127-
title="A sealed @context prevents its term definitions to be overridden">
3127+
title="A sealed term definition can not be overridden">
31283128
<div class="selectors">
31293129
<button class="selected" data-selects="original">Original</button>
31303130
<button data-selects="expanded">Expanded</button>
@@ -3138,13 +3138,15 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
31383138
"@context": [
31393139
{
31403140
****"@version": 1.1****,
3141-
****"@sealed": true****,
31423141
"Person": "http://schema.org/Person",
3143-
"name": "http://schema.org/name",
3144-
"knows": "http://schema.org/knows"
3142+
"knows": "http://schema.org/knows",
3143+
"name": {
3144+
"@id": "http://schema.org/name",
3145+
****"@sealed": true****
3146+
}
31453147
},
31463148
{
3147-
****"Person": "this_attempt_to_override_Person_will_fail"****
3149+
****"name": "this_attempt_to_override_name_will_fail"****
31483150
}
31493151
],
31503152
"@type": "Person",
@@ -3160,7 +3162,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
31603162
</pre>
31613163
<pre class="expanded nohighlight"
31623164
data-transform="updateExample"
3163-
data-result-for="A sealed @context prevents its term definitions to be overridden-original">
3165+
data-result-for="A sealed term definition can not be overridden-original">
31643166
<!--
31653167
[{
31663168
"@type": ["http://schema.org/Person"],
@@ -3172,7 +3174,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
31723174
-->
31733175
</pre>
31743176
<table class="statements"
3175-
data-result-for="A sealed @context prevents its term definitions to be overridden-expanded"
3177+
data-result-for="A sealed term definition can not be overridden-expanded"
31763178
data-to-rdf>
31773179
<thead><tr><th>Subject</th><th>Property</th><th>Value</th></tr></thead>
31783180
<tbody>
@@ -3184,7 +3186,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
31843186
</table>
31853187
<pre class="turtle"
31863188
data-content-type="text/turtle"
3187-
data-result-for="A sealed @context prevents its term definitions to be overridden-expanded"
3189+
data-result-for="A sealed term definition can not be overridden-expanded"
31883190
data-transform="updateExample"
31893191
data-to-rdf>
31903192
<!--
@@ -3201,12 +3203,16 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
32013203
</pre>
32023204
</aside>
32033205

3204-
<p>Terms defined by a sealed context may still be overridden by scoped contexts,
3205-
as long as those are defined <em>inside</em> the same sealed context as the original term definition.
3206+
<p>When all or most term definitions of a context need to be sealed,
3207+
it is possible to add a member <code>@sealed</code> set to <code>true</code>
3208+
to the context itself.
3209+
It has the same effect as sealing each of its term definitions individually.
3210+
Exceptions can be made by adding a member <code>@sealed</code> set to <code>false</code>
3211+
in some term definitions.
32063212
</p>
32073213

32083214
<aside class="example ds-selector-tabs changed"
3209-
title="A sealed @context can override its own terms">
3215+
title="A sealed @context with an exception">
32103216
<div class="selectors">
32113217
<button class="selected" data-selects="original">Original</button>
32123218
<button data-selects="expanded">Expanded</button>
@@ -3225,79 +3231,76 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
32253231
"member": "http://schema.org/member",
32263232
"Person": {
32273233
"@id": "http://schema.org/Person",
3228-
"@context": [null, {
3229-
"Person": "http://schema.org/Person",
3230-
"name": "http://schema.org/familyName"
3231-
}]
3234+
****"@sealed": false****
32323235
}
32333236
}
32343237
],
32353238
"name": "Digital Bazaar",
32363239
"member": {
3240+
"@context": {
3241+
"Person": "http://xmlns.com/foaf/0.1/Person",
3242+
"name": "this_attempt_to_override_name_will_fail"
3243+
}
32373244
"@type": "Person",
3238-
"name": "Sporny"
3245+
"name": "Manu Sporny"
32393246
}
32403247
}
32413248
-->
32423249
</pre>
32433250
<pre class="expanded nohighlight"
32443251
data-transform="updateExample"
3245-
data-result-for="A sealed @context can override its own terms-original">
3252+
data-result-for="A sealed @context with an exception-original">
32463253
<!--
32473254
[{
32483255
"http://schema.org/name": [{"@value": "Digital Bazaar"}],
32493256
"http://schema.org/member": [
32503257
{
3251-
"@type": ["http://schema.org/Person"],
3252-
"http://schema.org/familyName": [{"@value": "Sporny"}]
3258+
"@type": ["http://xmlns.com/foaf/0.1/Person"],
3259+
"http://schema.org/name": [{"@value": "Manu Sporny"}]
32533260
}
32543261
]
32553262
}]
32563263
-->
32573264
</pre>
32583265
<table class="statements"
3259-
data-result-for="A sealed @context can override its own terms-expanded"
3266+
data-result-for="A sealed @context with an exception-expanded"
32603267
data-to-rdf>
32613268
<thead><tr><th>Subject</th><th>Property</th><th>Value</th></tr></thead>
32623269
<tbody>
32633270
<tr><td>_:b0</td><td>schema:name</td><td>Digital Bazaar</td></tr>
32643271
<tr><td>_:b0</td><td>schema:member</td><td>_:b1</td></tr>
3265-
<tr><td>_:b1</td><td>rdf:type</td><td>schema:Person</td></tr>
3266-
<tr><td>_:b1</td><td>schema:familyName</td><td>Sporny</td></tr>
3272+
<tr><td>_:b1</td><td>rdf:type</td><td>foaf:Person</td></tr>
3273+
<tr><td>_:b1</td><td>schema:name</td><td>Manu Sporny</td></tr>
32673274
</tbody>
32683275
</table>
32693276
<pre class="turtle"
32703277
data-content-type="text/turtle"
3271-
data-result-for="A sealed @context can override its own terms-expanded"
3278+
data-result-for="A sealed @context with an exception-expanded"
32723279
data-transform="updateExample"
32733280
data-to-rdf>
32743281
<!--
3282+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
32753283
@prefix schema: <http://schema.org/> .
32763284
32773285
[
32783286
schema:name "Digital Bazaar";
32793287
schema:member [
3280-
a schema:Person;
3281-
schema:familyName "Sporny"
3288+
a foaf:Person;
3289+
schema:name "Manu Sporny"
32823290
]
32833291
] .
32843292
-->
32853293
</pre>
32863294
</aside>
32873295

3288-
<p>A sealed context is not necessarily effective in the whole document.
3289-
Its effect starts in the node where it is referenced or embedded,
3290-
and propagates to deeper nodes only when traversing terms <em>that it defines</em>.
3291-
Traversing other terms stops the effect of the sealed context,
3292-
so in the remaining subtrees of the JSON document,
3293-
the terms from the sealed context are no longer protected against overridding.
3294-
The rationale is that "prose-based" implementations would generally ignore any term
3295-
<em>not</em> defined by the underlying specification,
3296-
and so the specification does apply to the parts of the documents beyond those unspecified terms.
3297-
</p>
3296+
<p>While sealed term definitions can not be directly overridden,
3297+
it is worth noting that setting <code>@context</code> to <code>null</code>
3298+
will erase everything from the active context,
3299+
<em>including</em> sealed term definitions.
3300+
</p>
32983301

32993302
<aside class="example ds-selector-tabs changed"
3300-
title="Sealing does not extend beyond other terms">
3303+
title="@context null erases sealed term definitions">
33013304
<div class="selectors">
33023305
<button class="selected" data-selects="original">Original</button>
33033306
<button data-selects="expanded">Expanded</button>
@@ -3312,44 +3315,35 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
33123315
{
33133316
****"@version": 1.1****,
33143317
****"@sealed": true****,
3315-
"name": "http://schema.org/name",
3316-
"employee": "http://schema.org/employee",
33173318
"Organization": "http://schema.org/Organization"
3318-
},
3319-
{
3320-
"member": "http://xmlns.com/foaf/0.1/member"
3319+
"name": "http://schema.org/name",
3320+
"employee": {
3321+
"@id": http://schema.org/employee",
3322+
****"@context": null****
33213323
}
33223324
],
33233325
"@type": "Organization",
33243326
"name": "Digital Bazaar",
33253327
"employee" : {
3328+
#### -- because of "@context": null in the scoped context, ####
3329+
#### -- the active context at this point is empty; ####
3330+
#### -- so we can (and we must) redefine "name" below ####
33263331
"@context": {
3327-
"name": "http://example.org/this_attempt_to_override_name_will_fail"
3332+
****"name": "http://xmlns.com/foaf/0.1/name"****
33283333
},
3329-
"name" : "Dave Longley"
3330-
},
3331-
"member": {
3332-
"@context": [null, {
3333-
"name": "http://xmlns.com/foaf/0.1/name"
3334-
}],
33353334
"name": "Manu Sporny"
33363335
}
33373336
}
33383337
-->
33393338
</pre>
33403339
<pre class="expanded nohighlight"
33413340
data-transform="updateExample"
3342-
data-result-for="Sealing does not extend beyond other terms-original">
3341+
data-result-for="@context null erases sealed term definitions-original">
33433342
<!--
33443343
[{
33453344
"@type": ["http://schema.org/Organization"],
33463345
"http://schema.org/name": [{"@value": "Digital Bazaar"}],
33473346
"http://schema.org/employee": [
3348-
{
3349-
"http://schema.org/name": [{"@value": "Dave Longley"}]
3350-
}
3351-
],
3352-
"http://xmlns.com/foaf/0.1/member": [
33533347
{
33543348
"http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}]
33553349
}
@@ -3358,42 +3352,37 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
33583352
-->
33593353
</pre>
33603354
<table class="statements"
3361-
data-result-for="Sealing does not extend beyond other terms-expanded"
3355+
data-result-for="@context null erases sealed term definitions-expanded"
33623356
data-to-rdf>
33633357
<thead><tr><th>Subject</th><th>Property</th><th>Value</th></tr></thead>
33643358
<tbody>
33653359
<tr><td>_:b0</td><td>rdf:type</td><td>schema:Organization</td></tr>
33663360
<tr><td>_:b0</td><td>schema:name</td><td>Digital Bazaar</td></tr>
33673361
<tr><td>_:b0</td><td>schema:employee</td><td>_:b1</td></tr>
3368-
<tr><td>_:b0</td><td>foaf:member</td><td>_:b2</td></tr>
3369-
<tr><td>_:b1</td><td>schema:name</td><td>Dave Longley</td></tr>
3370-
<tr><td>_:b2</td><td>foaf:name</td><td>Manu Sporny</td></tr>
3362+
<tr><td>_:b1</td><td>foaf:name</td><td>Manu Sporny</td></tr>
33713363
</tbody>
33723364
</table>
33733365
<pre class="turtle"
33743366
data-content-type="text/turtle"
3375-
data-result-for="Sealing does not extend beyond other terms-expanded"
3367+
data-result-for="@context null erases sealed term definitions-expanded"
33763368
data-transform="updateExample"
33773369
data-to-rdf>
33783370
<!--
3379-
@prefix schema: <http://schema.org/>.
33803371
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
3372+
@prefix schema: <http://schema.org/>.
33813373
33823374
[
33833375
a schema:Organization;
33843376
schema:name "Digital Bazaar";
33853377
schema:employee [
3386-
schema:name "Dave Longley"
3387-
];
3388-
foaf:member [
33893378
foaf:name "Manu Sporny"
33903379
];
33913380
] .
33923381
-->
33933382
</pre>
33943383
</aside>
33953384

3396-
<p class="note">Sealed Contexts are a new feature in JSON-LD 1.1, requiring
3385+
<p class="note">Sealed term definitions are a new feature in JSON-LD 1.1, requiring
33973386
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
33983387
</section>
33993388
</section>

0 commit comments

Comments
 (0)