@@ -8283,22 +8283,20 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
8283
8283
In JSON-LD, these resources could all be contained as members of an array:
8284
8284
</p>
8285
8285
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">
8287
8287
<!--
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
+ -->
8302
8300
</pre>
8303
8301
8304
8302
<p>
@@ -8312,6 +8310,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
8312
8310
<div class="selectors">
8313
8311
<button class="selected" data-selects="compacted">Compacted (Input)</button>
8314
8312
<button data-selects="expanded">Expanded (Result)</button>
8313
+ <button data-selects="flattened">Flattened</button>
8315
8314
<button data-selects="statements">Statements</button>
8316
8315
<button data-selects="turtle">Turtle</button>
8317
8316
<a class="playground" target="_blank"></a>
@@ -8320,27 +8319,21 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
8320
8319
<!--
8321
8320
{
8322
8321
"@context": {
8323
- "generatedAt": {
8324
- "@id": "http://www.w3.org/ns/prov#generatedAtTime",
8325
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
8326
- },
8327
8322
"Person": "http://xmlns.com/foaf/0.1/Person",
8328
8323
"name": "http://xmlns.com/foaf/0.1/name",
8329
8324
"knows": {"@id": "http://xmlns.com/foaf/0.1/knows", "@type": "@id"}
8330
8325
},
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
+ }]****
8344
8337
}
8345
8338
-->
8346
8339
</pre>
@@ -8349,6 +8342,7 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
8349
8342
data-result-for="Simple data with several top level nodes with a common context-compacted">
8350
8343
<!--
8351
8344
[{
8345
+ ****"@included": [{
8352
8346
"@id": "http://manu.sporny.org/about#manu",
8353
8347
"@type": ["http://xmlns.com/foaf/0.1/Person"],
8354
8348
"http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}],
@@ -8362,6 +8356,29 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
8362
8356
"http://xmlns.com/foaf/0.1/knows": [
8363
8357
{"@id": "http://manu.sporny.org/about#manu"}
8364
8358
]
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
+ ]
8365
8382
}]
8366
8383
-->
8367
8384
</pre>
@@ -8385,17 +8402,14 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
8385
8402
data-to-rdf>
8386
8403
<!--
8387
8404
@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#> .
8391
8405
8392
8406
<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> .
8395
8409
8396
8410
<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> .
8399
8413
-->
8400
8414
</pre>
8401
8415
</aside>
0 commit comments