You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An <adata-cite="RDF11-CONCEPTS#dfn-object" class="externalDFN">object</a> is a <a>node</a> in a <a>linked data graph</a> with at least one incoming edge.
215
215
See <dfndata-cite="RDF11-CONCEPTS#dfn-object" class="preserve">RDF object</dfn>in [[RDF11-CONCEPTS]].</dd>
216
-
<dt><dfndata-lt="prefixes">prefix</dfn></dt><dd>
217
-
A <a>prefix</a> is a <a>term</a> that expands to a vocabulary <a>base IRI</a>. It
218
-
is typically used along with a <em>suffix</em>to form a <a>compact IRI</a> to create an IRI
219
-
within a vocabulary.</dd>
216
+
<dt><dfndata-lt="prefixes">prefix</dfn></dt><dd>
217
+
A <a>prefix</a> is the first component of a <a>compact IRI</a> which comes from a
218
+
<a>term</a> that maps to a string that, when prepended to the suffix of the <a>compact IRI</a>
219
+
results in an <a>absolute IRI</a>.</dd>
220
220
<dt><dfn>processing mode</dfn></dt><dd>
221
221
The processing mode defines how a JSON-LD document is processed.
222
222
By default, all documents are assumed to be conformat with
A term definition is an entry in a <a>context</a>, where the key defines a <a>term</a> which may be used within
254
254
a <a>JSON object</a> as a <a>property</a>, type, or elsewhere that a string is interpreted as a vocabulary item.
255
-
Its value is either a string, expanding to an absolute IRI, or an <a>expanded term definition</a>.
255
+
Its value is either a string (<dfndata-lt="simple terms|simple term|simple term definitions">simple term definition</dfn>), expanding to an absolute IRI, or an <a>expanded term definition</a>.
Used in a <a>context definition</a> to set the <a>processing mode</a>.
409
412
New features since <adata-cite="JSON-LD-20140116">JSON-LD 1.0</a> [[!JSON-LD-20140116]] described in this specification are
@@ -1043,6 +1046,20 @@ <h2>Compact IRIs</h2>
1043
1046
underscore (<code>_</code>), the value is interpreted as <a>blank node identifier</a>
1044
1047
instead.</p>
1045
1048
1049
+
<pclass="changed">In JSON-LD 1.0, terms will be used as <a>compact IRI</a> prefixes when
1050
+
compacting only if they map to a value that ends with a URI <a
1051
+
data-cite="RFC3986#section-2.2">gen-delim</a> character (e.g, <code>/</code>,
1052
+
<code>#</code> and others, see [[!RFC3986]]).</p>
1053
+
1054
+
<pclass="note">This represents a small change to the 1.0 algorithm to prevent IRIs
1055
+
that are not really intended to be used as prefixes from being used for creating
1056
+
<a>compact IRIs</a>.</p>
1057
+
1058
+
<pclass="changed">When <a>processing mode</a> is set to <code>json-ld-1.1</code>, terms will be used as <a>compact IRI</a> prefixes
1059
+
when compacting only if their <a>expanded term definition</a> contains
1060
+
a <code>@prefix</code> member with the value <a>true</a>, or if it has a
1061
+
a <a>simple term definition</a> where the value ends with a URI <adata-cite="RFC3986#section-2.2">gen-delim</a> character
1062
+
(e.g, <code>/</code>, <code>#</code> and others, see [[!RFC3986]]).</p>
1046
1063
1047
1064
<p>It's also possible to use compact IRIs within the context as shown in the
1048
1065
following example:</p>
@@ -2228,7 +2245,7 @@ <h2>Scoped Contexts</h2>
2228
2245
<p>Scoping on <code>@type</code> is useful when common properties are used to relate things of different types, where the vocabularies in use within different entities calls for different context scoping. For example, `hasPart`/`partOf` may be common terms used in a document, but mean different things depending on the context.</p>
2229
2246
2230
2247
<pclass="note">Scoped Contexts are a new feature in JSON-LD 1.1, requiring
2231
-
<a>processing mode</a> set to <code>json-ld-1.1</code></p>
2248
+
<a>processing mode</a> set to <code>json-ld-1.1</code>.</p>
Copy file name to clipboardExpand all lines: test-suite/tests/compact-0038-out.jsonld
+5-5
Original file line number
Diff line number
Diff line change
@@ -20,19 +20,19 @@
20
20
"title": {
21
21
"en": {
22
22
"@type": "site-cd:field-types/title_field",
23
-
"title:/value": "This is the English title"
23
+
"site-cd:node/article/title/value": "This is the English title"
24
24
},
25
25
"es": {
26
26
"@type": "site-cd:field-types/title_field",
27
-
"title:/value": "Este es el t’tulo espa–ol"
27
+
"site-cd:node/article/title/value": "Este es el t’tulo espa–ol"
28
28
}
29
29
},
30
30
"body": {
31
31
"en": {
32
32
"@type": "site-cd:field-types/text_with_summary",
33
-
"body:/value": "This is the English body. There is no Spanish body, so this will be displayed for both the English and Spanish versions.",
34
-
"body:/summary": "This is the teaser for the body.",
35
-
"body:/format": "full_html"
33
+
"site-cd:node/article/body/value": "This is the English body. There is no Spanish body, so this will be displayed for both the English and Spanish versions.",
34
+
"site-cd:node/article/body/summary": "This is the teaser for the body.",
0 commit comments