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