Skip to content

Commit 120cc4c

Browse files
committed
Update and fix examples.
1 parent 0884f48 commit 120cc4c

File tree

1 file changed

+53
-39
lines changed

1 file changed

+53
-39
lines changed

index.html

Lines changed: 53 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8283,22 +8283,20 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
82838283
In JSON-LD, these resources could all be contained as members of an array:
82848284
</p>
82858285

8286-
<pre class="example input" id="bush-in-array" title="Simple data with several top level nodes" data-transform="updateExample">
8286+
<pre class="example" title="Simple data with several top level nodes" data-transform="updateExample">
82878287
<!--
8288-
[
8289-
{
8290-
"@id": "http://manu.sporny.org/about#manu",
8291-
"@type": "http://xmlns.com/foaf/0.1/Person",
8292-
"name": "Manu Sporny",
8293-
"knows": { "@id": "https://greggkellogg.net/foaf#me" }
8294-
}, {
8295-
"@id": "https://greggkellogg.net/foaf#me",
8296-
"@type": "http://xmlns.com/foaf/0.1/Person",
8297-
"name": "Gregg Kellogg",
8298-
"knows": { "@id": "http://manu.sporny.org/about#manu"}
8299-
}
8300-
]
8301-
-->
8288+
[{
8289+
"@id": "http://manu.sporny.org/about#manu",
8290+
"@type": "http://xmlns.com/foaf/0.1/Person",
8291+
"name": "Manu Sporny",
8292+
"knows": { "@id": "https://greggkellogg.net/foaf#me" }
8293+
}, {
8294+
"@id": "https://greggkellogg.net/foaf#me",
8295+
"@type": "http://xmlns.com/foaf/0.1/Person",
8296+
"name": "Gregg Kellogg",
8297+
"knows": { "@id": "http://manu.sporny.org/about#manu"}
8298+
}]
8299+
-->
83028300
</pre>
83038301

83048302
<p>
@@ -8312,6 +8310,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
83128310
<div class="selectors">
83138311
<button class="selected" data-selects="compacted">Compacted (Input)</button>
83148312
<button data-selects="expanded">Expanded (Result)</button>
8313+
<button data-selects="flattened">Flattened</button>
83158314
<button data-selects="statements">Statements</button>
83168315
<button data-selects="turtle">Turtle</button>
83178316
<a class="playground" target="_blank"></a>
@@ -8320,27 +8319,21 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
83208319
<!--
83218320
{
83228321
"@context": {
8323-
"generatedAt": {
8324-
"@id": "http://www.w3.org/ns/prov#generatedAtTime",
8325-
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
8326-
},
83278322
"Person": "http://xmlns.com/foaf/0.1/Person",
83288323
"name": "http://xmlns.com/foaf/0.1/name",
83298324
"knows": {"@id": "http://xmlns.com/foaf/0.1/knows", "@type": "@id"}
83308325
},
8331-
"@included":**** [
8332-
{
8333-
"@id": "http://manu.sporny.org/about#manu",
8334-
"@type": "Person",
8335-
"name": "Manu Sporny",
8336-
"knows": "https://greggkellogg.net/foaf#me"
8337-
}, {
8338-
"@id": "https://greggkellogg.net/foaf#me",
8339-
"@type": "Person",
8340-
"name": "Gregg Kellogg",
8341-
"knows": "http://manu.sporny.org/about#manu"
8342-
}
8343-
]
8326+
****"@included": [{
8327+
"@id": "http://manu.sporny.org/about#manu",
8328+
"@type": "Person",
8329+
"name": "Manu Sporny",
8330+
"knows": "https://greggkellogg.net/foaf#me"
8331+
}, {
8332+
"@id": "https://greggkellogg.net/foaf#me",
8333+
"@type": "Person",
8334+
"name": "Gregg Kellogg",
8335+
"knows": "http://manu.sporny.org/about#manu"
8336+
}]****
83448337
}
83458338
-->
83468339
</pre>
@@ -8349,6 +8342,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
83498342
data-result-for="Simple data with several top level nodes with a common context-compacted">
83508343
<!--
83518344
[{
8345+
****"@included": [{
83528346
"@id": "http://manu.sporny.org/about#manu",
83538347
"@type": ["http://xmlns.com/foaf/0.1/Person"],
83548348
"http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}],
@@ -8362,6 +8356,29 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
83628356
"http://xmlns.com/foaf/0.1/knows": [
83638357
{"@id": "http://manu.sporny.org/about#manu"}
83648358
]
8359+
}]****
8360+
}]
8361+
-->
8362+
</pre>
8363+
<pre class="flattened nohighlight"
8364+
data-transform="updateExample"
8365+
data-flatten
8366+
data-result-for="Simple data with several top level nodes with a common context-expanded">
8367+
<!--
8368+
[{
8369+
"@id": "http://manu.sporny.org/about#manu",
8370+
"@type": ["http://xmlns.com/foaf/0.1/Person"],
8371+
"http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}],
8372+
"http://xmlns.com/foaf/0.1/knows": [
8373+
{"@id": "https://greggkellogg.net/foaf#me"}
8374+
]
8375+
}, {
8376+
"@id": "https://greggkellogg.net/foaf#me",
8377+
"@type": ["http://xmlns.com/foaf/0.1/Person"],
8378+
"http://xmlns.com/foaf/0.1/name": [{"@value": "Gregg Kellogg"}],
8379+
"http://xmlns.com/foaf/0.1/knows": [
8380+
{"@id": "http://manu.sporny.org/about#manu"}
8381+
]
83658382
}]
83668383
-->
83678384
</pre>
@@ -8385,17 +8402,14 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
83858402
data-to-rdf>
83868403
<!--
83878404
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
8388-
@prefix prov: <http://www.w3.org/ns/prov#> .
8389-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
8390-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
83918405

83928406
<http://manu.sporny.org/about#manu> a foaf:Person;
8393-
foaf:name "Manu Sporny";
8394-
foaf:knows <https://greggkellogg.net/foaf#me> .
8407+
foaf:name "Manu Sporny";
8408+
foaf:knows <https://greggkellogg.net/foaf#me> .
83958409

83968410
<https://greggkellogg.net/foaf#me> a foaf:Person;
8397-
foaf:name "Gregg Kellogg";
8398-
foaf:knows <http://manu.sporny.org/about#manu> .
8411+
foaf:name "Gregg Kellogg";
8412+
foaf:knows <http://manu.sporny.org/about#manu> .
83998413
-->
84008414
</pre>
84018415
</aside>

0 commit comments

Comments
 (0)