@@ -2970,21 +2970,44 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
2970
2970
</ pre >
2971
2971
2972
2972
< p >
2973
- In this example, the < a > compact IRI</ a > form is used in two different
2974
- ways.
2975
- In the first approach, < code > foaf:age</ code > declares both the
2976
- < a > IRI</ a > for the < a > term</ a > (using short-form) as well as the
2977
- < code > @type</ code > associated with the < a > term</ a > . In the second
2978
- approach, only the < code > @type</ code > associated with the < a > term</ a > is
2979
- specified. The full < a > IRI</ a > for
2980
- < code > foaf:homepage</ code > is determined by looking up the < code > foaf</ code >
2981
- < a > prefix</ a > in the
2982
- < a > context</ a > .
2983
- </ p >
2973
+ In this example, the < a > compact IRI</ a > form is used in two different ways.
2974
+ In the first approach, < code > foaf:age</ code > declares both the
2975
+ < a > IRI</ a > for the < a > term</ a > (using short-form) as well as the
2976
+ < code > @type</ code > associated with the < a > term</ a > . In the second
2977
+ approach, only the < code > @type</ code > associated with the < a > term</ a > is
2978
+ specified. The full < a > IRI</ a > for
2979
+ < code > foaf:homepage</ code > is determined by looking up the < code > foaf</ code >
2980
+ < a > prefix</ a > in the
2981
+ < a > context</ a > .</ p >
2982
+
2983
+ < p class ="warning changed "> If a < a > compact IRI</ a > is used as a < a > term</ a > , it must expand to the
2984
+ value that < a > compact IRI</ a > would have on its own when expanded.
2985
+ This represents a change to the original 1.0 algorithm to prevent terms from
2986
+ expanding to a different < a > absolute IRI</ a > , which could lead to undesired results.</ p >
2984
2987
2985
- < p >
2986
- < a > Absolute IRIs</ a > may also be used in the key position in a < a > context</ a > :
2987
- </ p >
2988
+ < pre class ="illegal-example nohighlight " data-transform ="updateExample "
2989
+ title ="Illegal Aliasing of a compact IRI to a different absolute IRI ">
2990
+ <!--
2991
+ {
2992
+ "@context": {
2993
+ "foaf": "http://xmlns.com/foaf/0.1/",
2994
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
2995
+ "name": "foaf:name",
2996
+ "foaf:age": {
2997
+ "@id": "http://xmlns.com/foaf/0.1/age",
2998
+ "@type": "xsd:integer"
2999
+ },
3000
+ "foaf:homepage": {
3001
+ ****"@id": "http://schema.org/url"****,
3002
+ "@type": "@id"
3003
+ }
3004
+ }####,
3005
+ ...####
3006
+ }
3007
+ -->
3008
+ </ pre >
3009
+
3010
+ < p > < a > Absolute IRIs</ a > may also be used in the key position in a < a > context</ a > :</ p >
2988
3011
2989
3012
< pre class ="example nohighlight " data-transform ="updateExample "
2990
3013
title ="Associating context definitions with absolute IRIs ">
@@ -3014,13 +3037,11 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
3014
3037
That is, < a > terms</ a > are looked up in a < a > context</ a > using
3015
3038
direct string comparison before the < a > prefix</ a > lookup mechanism is applied.</ p >
3016
3039
3017
- < p class ="note "> While it is possible to define a < a > compact IRI</ a > , or
3018
- an < a > absolute IRI</ a > to expand to some other unrelated < a > IRI</ a >
3019
- (for example, < code > foaf:name</ code > expanding to
3020
- < code > http://example.org/unrelated#species</ code > ), such usage is strongly
3021
- discouraged.</ p >
3040
+ < p class ="warning changed "> Neither a < a > compact IRI</ a > nor an < a > absolute IRI</ a >
3041
+ may expand to some other unrelated < a > IRI</ a > .
3042
+ This represents a change to the original 1.0 algorithm which allowed this behavior but discouraged it.</ p >
3022
3043
3023
- < p > The only exception for using terms in the < a > context</ a > is that
3044
+ < p > The only other exception for using terms in the < a > context</ a > is that
3024
3045
circular definitions are not allowed. That is,
3025
3046
a definition of < em > term1</ em > cannot depend on the
3026
3047
definition of < em > term2</ em > if < em > term2</ em > also depends on
@@ -11219,6 +11240,9 @@ <h2>Context Definitions</h2>
11219
11240
< code > @vocab</ code > mapping, the < a > expanded term definition</ a > MUST
11220
11241
include the < code > @id</ code > key.</ p >
11221
11242
11243
+ < p class ="changed "> < a > Term definitions</ a > with keys which are of the form of a < a > compact IRI</ a > or < a > absolute IRI</ a > MUST NOT
11244
+ expand to an < a > IRI</ a > other than the expansion of the key itself.</ p >
11245
+
11222
11246
< p > If the < a > expanded term definition</ a > contains the < code > @id</ code >
11223
11247
< a > keyword</ a > , its value MUST be < a > null</ a > , an < a > absolute IRI</ a > ,
11224
11248
a < a > blank node identifier</ a > , a < a > compact IRI</ a > , a < a > term</ a > ,
@@ -12299,6 +12323,8 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
12299
12323
to the document base.</ li >
12300
12324
< li > Added support for < code > "@type": "@none"</ code > in a < a > term definition</ a > to prevent value compaction.
12301
12325
Define the < code > rdf:JSON</ code > datatype.</ li >
12326
+ < li > < a > Term definitions</ a > with keys which are of the form of a < a > compact IRI</ a > or < a > absolute IRI</ a > MUST NOT
12327
+ expand to an < a > IRI</ a > other than the expansion of the key itself.</ li >
12302
12328
</ ul >
12303
12329
</ section >
12304
12330
0 commit comments