@@ -3440,90 +3440,91 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
3440
3440
types are listed, the order that <a>type-scoped contexts</a> are applied is based on
3441
3441
lexicographical ordering.</p>
3442
3442
3443
- <p>For example, consider the following semantically equivalent examples:</p>
3443
+ <p>For example, consider the following semantically equivalent examples.
3444
+ The first example, shows how properties and types can define their own
3445
+ scoped contexts, which are included when expanding.</p>
3444
3446
3445
- <aside class="example" title="Expansion using embedded and scoped contexts">
3446
- <p>This example, shows how properties and types can define their own
3447
- scoped contexts, which are included when expanding.</p>
3448
- <pre data-transform="updateExample">
3449
- <!--
3450
- {
3451
- "@context": {
3452
- "@vocab": "http://example.com/vocab/"
3453
- "property": {
3454
- "@id": "http://example.com/vocab/property",
3455
- "@context": {
3456
- "term1": "http://example.com/vocab/term1"
3457
- #### ↑ Scoped context for "property" defines term1
3458
- },
3459
- },
3460
- "Type1": {
3461
- "@id": "http://example.com/vocab/Type1",
3462
- "@context": {
3463
- "term3": "http://example.com/vocab/term3"
3464
- #### ↑ Scoped context for "Type1" defines term3
3465
- },
3466
- },
3467
- "Type2": {
3468
- "@id": "http://example.com/vocab/Type2",
3469
- "@context": {
3470
- "term4": "http://example.com/vocab/term4"
3471
- #### ↑ Scoped context for "Type2" defines term4
3472
- },
3473
- },
3474
- },
3447
+ <pre class="example" title="Expansion using embedded and scoped contexts" data-transform="updateExample">
3448
+ <!--
3449
+ {
3450
+ "@context": {
3451
+ "@version": 1.1,
3452
+ "@vocab": "http://example.com/vocab/",
3475
3453
"property": {
3454
+ "@id": "http://example.com/vocab/property",
3476
3455
"@context": {
3477
- "term2": "http://example.com/vocab/term2"
3478
- #### ↑ Embedded context defines term2
3479
- },
3480
- "@type": ["Type2", "Type1"],
3481
- "term1": "a",
3482
- "term2": "b",
3483
- "term3": "c",
3484
- "term4": "d",
3485
- }
3486
- }
3487
- -->
3488
- </pre>
3489
-
3490
- <p>Contexts are processed depending on how they are defined. A <a>property-scoped context</a>
3491
- is processed first, followed by any <a>embedded context</a>,
3492
- followed lastly by the <a>type-scoped contexts</a>, in the appropriate order.
3493
- The previous example is logically equivalent to the following:</p>
3494
- <pre data-transform="updateExample">
3495
- <!--
3496
- {
3497
- "@context": {
3498
- "@vocab": "http://example.com/vocab/"
3499
- "property": "http://example.com/vocab/property",
3500
- "Type1": "http://example.com/vocab/Type1",
3501
- "Type2": "http://example.com/vocab/Type2",
3456
+ "term1": "http://example.com/vocab/term1"
3457
+ #### ↑ Scoped context for "property" defines term1####
3458
+ }
3502
3459
},
3503
- "property": {
3504
- "@context": [{
3505
- "term1": "http://example.com/vocab/term1"
3506
- #### ↑ Scoped context for "property" defines term1
3507
- }, {
3508
- "term2": "http://example.com/vocab/term2"
3509
- #### ↑ Embedded context defines term2
3510
- }, {
3511
- "term3": "http://example.com/vocab/term3"
3512
- #### ↑ Scoped context for "Type1" defines term3
3513
- }, {
3460
+ "Type1": {
3461
+ "@id": "http://example.com/vocab/Type1",
3462
+ "@context": {
3463
+ "term3": "http://example.com/vocab/term3"
3464
+ #### ↑ Scoped context for "Type1" defines term3####
3465
+ }
3466
+ },
3467
+ "Type2": {
3468
+ "@id": "http://example.com/vocab/Type2",
3469
+ "@context": {
3514
3470
"term4": "http://example.com/vocab/term4"
3515
- #### ↑ Scoped context for "Type2" defines term4
3516
- }],
3517
- "@type": ["Type2", "Type1"],
3518
- "term1": "a",
3519
- "term2": "b",
3520
- "term3": "c",
3521
- "term4": "d",
3471
+ #### ↑ Scoped context for "Type2" defines term4####
3472
+ }
3522
3473
}
3474
+ },
3475
+ "property": {
3476
+ "@context": {
3477
+ "term2": "http://example.com/vocab/term2"
3478
+ #### ↑ Embedded context defines term2####
3479
+ },
3480
+ "@type": ["Type2", "Type1"],
3481
+ "term1": "a",
3482
+ "term2": "b",
3483
+ "term3": "c",
3484
+ "term4": "d"
3523
3485
}
3524
- -->
3525
- </pre>
3526
- </aside>
3486
+ }
3487
+ -->
3488
+ </pre>
3489
+
3490
+ <p>Contexts are processed depending on how they are defined.
3491
+ A <a>property-scoped context</a> is processed first,
3492
+ followed by any <a>embedded context</a>,
3493
+ followed lastly by the <a>type-scoped contexts</a>,
3494
+ in the appropriate order. The previous example is logically equivalent to the following:</p>
3495
+
3496
+ <pre class="example" title="Expansion using embedded and scoped contexts (embedding equivalent)" data-transform="updateExample">
3497
+ <!--
3498
+ {
3499
+ "@context": {
3500
+ "@vocab": "http://example.com/vocab/",
3501
+ "property": "http://example.com/vocab/property",
3502
+ "Type1": "http://example.com/vocab/Type1",
3503
+ "Type2": "http://example.com/vocab/Type2"
3504
+ },
3505
+ "property": {
3506
+ "@context": [{
3507
+ "term1": "http://example.com/vocab/term1"
3508
+ #### ↑ Previously scoped context for "property" defines term1####
3509
+ }, {
3510
+ "term2": "http://example.com/vocab/term2"
3511
+ #### ↑ Embedded context defines term2####
3512
+ }, {
3513
+ "term3": "http://example.com/vocab/term3"
3514
+ #### ↑ Previously scoped context for "Type1" defines term3####
3515
+ }, {
3516
+ "term4": "http://example.com/vocab/term4"
3517
+ #### ↑ Previously scoped context for "Type2" defines term4####
3518
+ }],
3519
+ "@type": ["Type2", "Type1"],
3520
+ "term1": "a",
3521
+ "term2": "b",
3522
+ "term3": "c",
3523
+ "term4": "d"
3524
+ }
3525
+ }
3526
+ -->
3527
+ </pre>
3527
3528
3528
3529
<p class="note">If a <a>term</a> defines a <a>scoped context</a>,
3529
3530
and then that term is later re-defined,
0 commit comments