diff --git a/examples/Using-the-document-base-URL-to-establish-the-default-base-IRI-expanded.jsonld b/examples/Using-the-document-base-URL-to-establish-the-default-base-IRI-expanded.jsonld new file mode 100644 index 00000000..9fabe3e7 --- /dev/null +++ b/examples/Using-the-document-base-URL-to-establish-the-default-base-IRI-expanded.jsonld @@ -0,0 +1,10 @@ +[{ + "@id": "http://dbpedia.org/resource/John_Lennon", + "http://xmlns.com/foaf/0.1/name": [{"@value": "John Lennon"}], + "http://schema.org/birthDate": [ + {"@value": "1940-10-09", "@type": "http://www.w3.org/2001/XMLSchema#date"} + ], + "http://schema.org/spouse": [ + {"@id": "http://dbpedia.org/resource/Cynthia_Lennon"} + ] +}] \ No newline at end of file diff --git a/examples/Using-the-document-base-URL-to-establish-the-default-base-IRI-original.html b/examples/Using-the-document-base-URL-to-establish-the-default-base-IRI-original.html new file mode 100644 index 00000000..a63d70d5 --- /dev/null +++ b/examples/Using-the-document-base-URL-to-establish-the-default-base-IRI-original.html @@ -0,0 +1,9 @@ + + { + "@context": "https://json-ld.org/contexts/person.jsonld", + "@id": "John_Lennon", + "name": "John Lennon", + "born": "1940-10-09", + "spouse": "Cynthia_Lennon" + } + \ No newline at end of file diff --git a/examples/Using-the-document-base-URL-to-establish-the-default-base-IRI-statements.table b/examples/Using-the-document-base-URL-to-establish-the-default-base-IRI-statements.table new file mode 100644 index 00000000..d1563d25 --- /dev/null +++ b/examples/Using-the-document-base-URL-to-establish-the-default-base-IRI-statements.table @@ -0,0 +1,28 @@ +
Subject | +Property | +Value | +Value Type | +
---|---|---|---|
http://dbpedia.org/resource/John_Lennon | +foaf:name | +John Lennon | ++ |
http://dbpedia.org/resource/John_Lennon | +schema:birthDate | +1940-10-09 | +xsd:date | +
http://dbpedia.org/resource/John_Lennon | +schema:spouse | +http://dbpedia.org/resource/Cynthia_Lennon | ++ |
When processing a JSON-LD script element, - only the resolved document location of the - containing HTML document is used to establish the default base IRI of the enclosed + the Document Base URL + of the containing HTML document, + as defined in [[HTML52]], + is used to establish the default base IRI of the enclosed JSON-LD content.
+ + + + +HTML allows for Dynamic changes to base URLs. + This specification does not require any specific behavior, + and to ensure that all systems process the base IRI equivalently, authors SHOULD + either use absolute IRIs, or explicitly as defined in . + Implementations (particularly those natively operating in the [[!DOM]]) MAY take into consideration + Dynamic changes to base URLs.
+script
elementsAs HTML entities and comments are not allowable in JSON, the use of comments, escapes, @@ -9631,7 +9715,7 @@
The image consists of three dashed boxes, each describing a different linked data graph. Each box consists of shapes linked with arrows describing the linked data relationships.
diff --git a/yaml/Embedding-JSON-LD-in-HTML-with-comments-expanded.yaml b/yaml/Embedding-JSON-LD-in-HTML-with-comments-expanded.yaml index 5aa85067..01eca326 100644 --- a/yaml/Embedding-JSON-LD-in-HTML-with-comments-expanded.yaml +++ b/yaml/Embedding-JSON-LD-in-HTML-with-comments-expanded.yaml @@ -1,4 +1,4 @@ -Example 103: Embedding JSON-LD in HTML with comments-expanded +Example 104: Embedding JSON-LD in HTML with comments-expanded --- - "@id": http://dbpedia.org/resource/John_Lennon http://xmlns.com/foaf/0.1/name: diff --git a/yaml/Flattened-and-expanded-form-for-the-previous-example.yaml b/yaml/Flattened-and-expanded-form-for-the-previous-example.yaml index 4004cbea..eff79d14 100644 --- a/yaml/Flattened-and-expanded-form-for-the-previous-example.yaml +++ b/yaml/Flattened-and-expanded-form-for-the-previous-example.yaml @@ -1,4 +1,4 @@ -Example 108: Flattened and expanded form for the previous example +Example 109: Flattened and expanded form for the previous example --- - "@id": _:b0 http://xmlns.com/foaf/0.1/name: Dave Longley diff --git a/yaml/JSON-LD-using-native-data-types-for-numbers-and-boolean-values.yaml b/yaml/JSON-LD-using-native-data-types-for-numbers-and-boolean-values.yaml index 65e8f1cb..444da4b3 100644 --- a/yaml/JSON-LD-using-native-data-types-for-numbers-and-boolean-values.yaml +++ b/yaml/JSON-LD-using-native-data-types-for-numbers-and-boolean-values.yaml @@ -1,4 +1,4 @@ -Example 114: JSON-LD using native data types for numbers and boolean values +Example 115: JSON-LD using native data types for numbers and boolean values --- "@context": ex: http://example.com/vocab# diff --git a/yaml/Linked-Data-Dataset-compacted.yaml b/yaml/Linked-Data-Dataset-compacted.yaml index b3f0d9fa..045d99a7 100644 --- a/yaml/Linked-Data-Dataset-compacted.yaml +++ b/yaml/Linked-Data-Dataset-compacted.yaml @@ -1,4 +1,4 @@ -Example 106: Linked Data Dataset-compacted +Example 107: Linked Data Dataset-compacted --- "@context": - http://schema.org/ diff --git a/yaml/Linked-Data-Dataset-expanded.yaml b/yaml/Linked-Data-Dataset-expanded.yaml index 05e82d7f..01a6b1d6 100644 --- a/yaml/Linked-Data-Dataset-expanded.yaml +++ b/yaml/Linked-Data-Dataset-expanded.yaml @@ -1,4 +1,4 @@ -Example 106: Linked Data Dataset-expanded +Example 107: Linked Data Dataset-expanded --- - "@id": http://example.com/people/alice http://schema.org/name: diff --git a/yaml/Same-book-description-in-JSON-LD-avoiding-contexts-.yaml b/yaml/Same-book-description-in-JSON-LD-avoiding-contexts-.yaml index 0ee44e68..0343e21d 100644 --- a/yaml/Same-book-description-in-JSON-LD-avoiding-contexts-.yaml +++ b/yaml/Same-book-description-in-JSON-LD-avoiding-contexts-.yaml @@ -1,4 +1,4 @@ -Example 121: Same book description in JSON-LD (avoiding contexts) +Example 122: Same book description in JSON-LD (avoiding contexts) --- - "@id": http://purl.oreilly.com/works/45U8QJGZSQKDH8N "@type": http://purl.org/vocab/frbr/core#Work diff --git a/yaml/Same-description-in-JSON-LD-context-shared-among-node-objects-.yaml b/yaml/Same-description-in-JSON-LD-context-shared-among-node-objects-.yaml index 7aa5bed4..356cd35a 100644 --- a/yaml/Same-description-in-JSON-LD-context-shared-among-node-objects-.yaml +++ b/yaml/Same-description-in-JSON-LD-context-shared-among-node-objects-.yaml @@ -1,4 +1,4 @@ -Example 119: Same description in JSON-LD (context shared among node objects) +Example 120: Same description in JSON-LD (context shared among node objects) --- "@context": foaf: http://xmlns.com/foaf/0.1/ diff --git a/yaml/Same-embedding-example-in-JSON-LD.yaml b/yaml/Same-embedding-example-in-JSON-LD.yaml index 6ccd9f0d..afe96254 100644 --- a/yaml/Same-embedding-example-in-JSON-LD.yaml +++ b/yaml/Same-embedding-example-in-JSON-LD.yaml @@ -1,4 +1,4 @@ -Example 113: Same embedding example in JSON-LD +Example 114: Same embedding example in JSON-LD --- "@context": foaf: http://xmlns.com/foaf/0.1/ diff --git a/yaml/Same-example-with-a-list-of-values-in-JSON-LD.yaml b/yaml/Same-example-with-a-list-of-values-in-JSON-LD.yaml index a5ba0744..d6aa8677 100644 --- a/yaml/Same-example-with-a-list-of-values-in-JSON-LD.yaml +++ b/yaml/Same-example-with-a-list-of-values-in-JSON-LD.yaml @@ -1,4 +1,4 @@ -Example 117: Same example with a list of values in JSON-LD +Example 118: Same example with a list of values in JSON-LD --- "@context": foaf: http://xmlns.com/foaf/0.1/ diff --git a/yaml/Sample-JSON-LD-document.yaml b/yaml/Sample-JSON-LD-document.yaml index 9d68f325..b9c6a011 100644 --- a/yaml/Sample-JSON-LD-document.yaml +++ b/yaml/Sample-JSON-LD-document.yaml @@ -1,4 +1,4 @@ -Example 107: Sample JSON-LD document +Example 108: Sample JSON-LD document --- "@context": name: http://xmlns.com/foaf/0.1/name diff --git a/yaml/The-same-set-of-statements-serialized-in-JSON-LD.yaml b/yaml/The-same-set-of-statements-serialized-in-JSON-LD.yaml index a6832a50..42f6d035 100644 --- a/yaml/The-same-set-of-statements-serialized-in-JSON-LD.yaml +++ b/yaml/The-same-set-of-statements-serialized-in-JSON-LD.yaml @@ -1,4 +1,4 @@ -Example 111: The same set of statements serialized in JSON-LD +Example 112: The same set of statements serialized in JSON-LD --- "@context": foaf: http://xmlns.com/foaf/0.1/ diff --git a/yaml/Using-the-document-base-URL-to-establish-the-default-base-IRI-expanded.yaml b/yaml/Using-the-document-base-URL-to-establish-the-default-base-IRI-expanded.yaml new file mode 100644 index 00000000..6b285644 --- /dev/null +++ b/yaml/Using-the-document-base-URL-to-establish-the-default-base-IRI-expanded.yaml @@ -0,0 +1,10 @@ +Example 103: Using the document base URL to establish the default base IRI-expanded +--- +- "@id": http://dbpedia.org/resource/John_Lennon + http://xmlns.com/foaf/0.1/name: + - "@value": John Lennon + http://schema.org/birthDate: + - "@value": '1940-10-09' + "@type": http://www.w3.org/2001/XMLSchema#date + http://schema.org/spouse: + - "@id": http://dbpedia.org/resource/Cynthia_Lennon