Skip to content

Commit 00de271

Browse files
committed
Move subsection on using the document base for the default vocabulary until after the section on the document base (4.1.2.1 => 4.1.4).
Fixes #238.
1 parent 61c818d commit 00de271

File tree

1 file changed

+70
-70
lines changed

1 file changed

+70
-70
lines changed

index.html

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,76 +2462,6 @@ <h1>Advanced Concepts</h1>
24622462
allows the value to be a <a>term</a> or <a>compact IRI</a>.
24632463
Note that terms used in the value of `@vocab` must be in scope at the time the context is introduced,
24642464
otherwise there would be a circular dependency between `@vocab` and other terms defined in the same context.</p>
2465-
2466-
<section id="document-relative-vocabulary-mapping" class="changed">
2467-
<h3>Using the Document Base for the Default Vocabulary</h3>
2468-
<p>In some cases, vocabulary terms are defined directly within the document
2469-
itself, rather than in an external vocabulary.
2470-
Since <code>json-ld-1.1</code>, the <a>vocabulary mapping</a> in a <a>local context</a>
2471-
can be set to a <a>relative IRI</a>,
2472-
which is, if there is no vocabulary mapping in scope, resolved against the <a>base IRI</a>.
2473-
This causes terms which are expanded relative to the vocabulary,
2474-
such as the keys of <a>node objects</a>,
2475-
to be based on the <a>base IRI</a> to create <a>absolute IRIs</a>.</p>
2476-
2477-
<pre class="example input nohighlight" data-transform="updateExample"
2478-
title="Using &quot;#&quot; as the vocabulary mapping"
2479-
data-base="http://example/document">
2480-
<!--
2481-
{
2482-
"@context": {
2483-
****"@version": 1.1,****
2484-
****"@base": "http://example/document",****
2485-
"@vocab": ****"#"****
2486-
},
2487-
"@id": "http://example.org/places#BrewEats",
2488-
"@type": ****"Restaurant"****,
2489-
****"name"****: "Brew Eats"
2490-
####...####
2491-
}
2492-
-->
2493-
</pre>
2494-
2495-
<p>If this document were located at <code>http://example/document</code>, it would expand as follows:</p>
2496-
2497-
<aside class="example ds-selector-tabs"
2498-
title="Using &quot;#&quot; as the vocabulary mapping (expanded)">
2499-
<div class="selectors">
2500-
<button class="selected" data-selects="expanded">Expanded (Result)</button>
2501-
<button data-selects="statements">Statements</button>
2502-
<button data-selects="turtle">Turtle</button>
2503-
<a class="playground" target="_blank"></a>
2504-
</div>
2505-
<pre class="expanded result selected nohighlight" data-transform="updateExample">
2506-
<!--
2507-
[{
2508-
"@id": "http://example.org/places#BrewEats",
2509-
"@type": ["http://example/document#Restaurant"],
2510-
"http://example/document#name": [{"@value": "Brew Eats"}]
2511-
}]
2512-
-->
2513-
</pre>
2514-
<table class="statements"
2515-
data-result-for="Using &quot;#&quot; as the vocabulary mapping (expanded)-expanded"
2516-
data-to-rdf>
2517-
<thead><tr><th>Subject</th><th>Property</th><th>Value</th></tr></thead>
2518-
<tbody>
2519-
<tr><td>http://example.org/places#BrewEats</td><td>rdf:type</td><td>http://example/document#Restaurant</td></tr>
2520-
<tr><td>http://example.org/places#BrewEats</td><td>http://example/document#name</td><td>Brew Eats</td></tr>
2521-
</tbody>
2522-
</table>
2523-
<pre class="turtle"
2524-
data-content-type="text/turtle"
2525-
data-result-for="Using &quot;#&quot; as the vocabulary mapping (expanded)-expanded"
2526-
data-transform="updateExample"
2527-
data-to-rdf>
2528-
<!--
2529-
<http://example.org/places#BrewEats> a <http://example/document#Restaurant>;
2530-
<http://example/document#name> "Brew Eats" .
2531-
-->
2532-
</pre>
2533-
</aside>
2534-
</section>
25352465
</section>
25362466

25372467
<section class="informative"><h2>Base IRI</h2>
@@ -2624,6 +2554,76 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
26242554
external contexts.</p>
26252555
</section>
26262556

2557+
<section id="document-relative-vocabulary-mapping" class="changed">
2558+
<h3>Using the Document Base for the Default Vocabulary</h3>
2559+
<p>In some cases, vocabulary terms are defined directly within the document
2560+
itself, rather than in an external vocabulary.
2561+
Since <code>json-ld-1.1</code>, the <a>vocabulary mapping</a> in a <a>local context</a>
2562+
can be set to a <a>relative IRI</a>,
2563+
which is, if there is no vocabulary mapping in scope, resolved against the <a>base IRI</a>.
2564+
This causes terms which are expanded relative to the vocabulary,
2565+
such as the keys of <a>node objects</a>,
2566+
to be based on the <a>base IRI</a> to create <a>absolute IRIs</a>.</p>
2567+
2568+
<pre class="example input nohighlight" data-transform="updateExample"
2569+
title="Using &quot;#&quot; as the vocabulary mapping"
2570+
data-base="http://example/document">
2571+
<!--
2572+
{
2573+
"@context": {
2574+
****"@version": 1.1,****
2575+
****"@base": "http://example/document",****
2576+
"@vocab": ****"#"****
2577+
},
2578+
"@id": "http://example.org/places#BrewEats",
2579+
"@type": ****"Restaurant"****,
2580+
****"name"****: "Brew Eats"
2581+
####...####
2582+
}
2583+
-->
2584+
</pre>
2585+
2586+
<p>If this document were located at <code>http://example/document</code>, it would expand as follows:</p>
2587+
2588+
<aside class="example ds-selector-tabs"
2589+
title="Using &quot;#&quot; as the vocabulary mapping (expanded)">
2590+
<div class="selectors">
2591+
<button class="selected" data-selects="expanded">Expanded (Result)</button>
2592+
<button data-selects="statements">Statements</button>
2593+
<button data-selects="turtle">Turtle</button>
2594+
<a class="playground" target="_blank"></a>
2595+
</div>
2596+
<pre class="expanded result selected nohighlight" data-transform="updateExample">
2597+
<!--
2598+
[{
2599+
"@id": "http://example.org/places#BrewEats",
2600+
"@type": ["http://example/document#Restaurant"],
2601+
"http://example/document#name": [{"@value": "Brew Eats"}]
2602+
}]
2603+
-->
2604+
</pre>
2605+
<table class="statements"
2606+
data-result-for="Using &quot;#&quot; as the vocabulary mapping (expanded)-expanded"
2607+
data-to-rdf>
2608+
<thead><tr><th>Subject</th><th>Property</th><th>Value</th></tr></thead>
2609+
<tbody>
2610+
<tr><td>http://example.org/places#BrewEats</td><td>rdf:type</td><td>http://example/document#Restaurant</td></tr>
2611+
<tr><td>http://example.org/places#BrewEats</td><td>http://example/document#name</td><td>Brew Eats</td></tr>
2612+
</tbody>
2613+
</table>
2614+
<pre class="turtle"
2615+
data-content-type="text/turtle"
2616+
data-result-for="Using &quot;#&quot; as the vocabulary mapping (expanded)-expanded"
2617+
data-transform="updateExample"
2618+
data-to-rdf>
2619+
<!--
2620+
<http://example.org/places#BrewEats> a <http://example/document#Restaurant>;
2621+
<http://example/document#name> "Brew Eats" .
2622+
-->
2623+
</pre>
2624+
</aside>
2625+
</section>
2626+
26272627
<section class="informative"><h2>Compact IRIs</h2>
26282628

26292629
<p>A <a>compact IRI</a> is a way of expressing an <a>IRI</a>

0 commit comments

Comments
 (0)