@@ -1419,7 +1419,7 @@ <h2>Language Values</h2>
1419
1419
type with a particular < tref > term</ tref > in the < code > @context</ code > :</ p >
1420
1420
1421
1421
< pre class ="example " data-transform ="updateExample "
1422
- title ="Expanded term definition with language coerceion ">
1422
+ title ="Expanded term definition with language coercion ">
1423
1423
<!--
1424
1424
{
1425
1425
****"@context":
@@ -1863,12 +1863,82 @@ <h2>Type Coercion</h2>
1863
1863
great deal of confusion among developers attempting to understand the JSON-LD document.</ p >
1864
1864
1865
1865
< p > Type coercion is performed using the unexpanded value of the key,
1866
- which MUST have an exact match for an entry in the < tref > active context</ tref > .</ p >
1866
+ which MUST have an exact match for an entry in the
1867
+ < tref > active context</ tref > .</ p >
1867
1868
1868
1869
</ section >
1869
1870
1871
+
1870
1872
< section >
1871
- < h3 > IRI Expansion Within a Context</ h3 >
1873
+ < h2 > Property Generators</ h2 >
1874
+
1875
+ < p > At times, an author may find that they need to express the same value for
1876
+ multiple properties. The simplest approach to accomplish this goal would be
1877
+ to do the following:</ p >
1878
+
1879
+ < pre class ="example " data-transform ="updateExample "
1880
+ title ="Verbose expression of multiple properties with the same value ">
1881
+ <!--
1882
+ {
1883
+ "@context":
1884
+ {
1885
+ ****"title1": "http://purl.org/dc/terms/title"****,
1886
+ ****"title2": "http://schema.org/name"****,
1887
+ ****"title3": "http://www.w3.org/2000/01/rdf-schema#label"****
1888
+ },
1889
+ "@id": "http://example.com/book",
1890
+ ****"title1": "The Count of Monte Cristo"****,
1891
+ ****"title2": "The Count of Monte Cristo"****,
1892
+ ****"title3": "The Count of Monte Cristo"****
1893
+ }
1894
+ -->
1895
+ </ pre >
1896
+
1897
+ < p > Unfortunately, the approach above produces redundant data and would become a
1898
+ publishing burden for large data sets.
1899
+ In these situations, the author may use
1900
+ a < tdef > property generator</ tdef > to express a < tref > term</ tref > once, but have
1901
+ the JSON-LD processor expand the single statement into multiple statements.
1902
+ This method can be accomplished by using the following markup pattern:</ p >
1903
+
1904
+ < pre class ="example " data-transform ="updateExample "
1905
+ title ="Generating multiple properties using a single term ">
1906
+ <!--
1907
+ {
1908
+ "@context":
1909
+ {
1910
+ ****"title": { "@id": ["http://purl.org/dc/terms/title",
1911
+ "http://schema.org/name",
1912
+ "http://www.w3.org/2000/01/rdf-schema#label"] }****,
1913
+ },
1914
+ "@id": "http://example.com/book",
1915
+ ****"title": "The Count of Monte Cristo"****
1916
+ }
1917
+ -->
1918
+ </ pre >
1919
+
1920
+ < p > While the term above is only used once outside of the < code > @context</ code > ,
1921
+ a JSON-LD processor will internally transform the document above into
1922
+ the following set of statements:</ p >
1923
+
1924
+ < pre class ="example " data-transform ="updateExample ">
1925
+ <!--
1926
+ <http://example.com/book>
1927
+ <http://purl.org/dc/terms/title>
1928
+ "The Count of Monte Cristo" .
1929
+ <http://example.com/book>
1930
+ <http://schema.org/name>
1931
+ "The Count of Monte Cristo" .
1932
+ <http://example.com/book>
1933
+ <http://www.w3.org/2000/01/rdf-schema#label>
1934
+ "The Count of Monte Cristo" .
1935
+ -->
1936
+ </ pre >
1937
+
1938
+ </ section >
1939
+
1940
+ < section >
1941
+ < h2 > IRI Expansion Within a Context</ h2 >
1872
1942
< p > In general, normal IRI expansion rules apply
1873
1943
anywhere an IRI is expected (see < a href ="#iris "> </ a > ). Within
1874
1944
a < tref > context</ tref > definition, this can mean that terms defined
@@ -2811,14 +2881,14 @@ <h2>Context Definition</h2>
2811
2881
< p > An < tdef > expanded term definition</ tdef > is composed of zero or more keys from < code > @id</ code > ,
2812
2882
< code > @type</ code > , < code > @language</ code > or < code > @container</ code > . An
2813
2883
< tref > expanded term definition</ tref > MUST NOT contain any other keys.
2814
- The value of < code > @id</ code > MUST expand to an < tref > absolute IRI</ tref > .</ p >
2815
- < p > If the < tref > term</ tref > definition does not have the form of < tref > compact IRI</ tref > or < tref > absolute IRI</ tref > ,
2884
+ All values associated with < code > @id</ code > MUST expand to an < tref > absolute IRI</ tref > .</ p >
2885
+ < p > If the < tref > term</ tref > definition is not a < tref > compact IRI</ tref > or < tref > absolute IRI</ tref > ,
2816
2886
the < tref > expanded term
2817
2887
definition</ tref > MUST include the < code > @id</ code > key.</ p >
2818
2888
< p > If the < tref > expanded term definition</ tref > contains the < code > @id</ code > < tref > keyword</ tref > ,
2819
2889
it MUST be a < tref > string</ tref > having the lexical form of < tref > IRI</ tref > ,
2820
- < tref > compact IRI</ tref > , or a < tref > term</ tref > defined in the defining < tref > context
2821
- definition</ tref > or the < tref > active context</ tref > .</ p >
2890
+ < tref > compact IRI</ tref > , a < tref > term</ tref > defined in the defining < tref > context
2891
+ definition</ tref > or the < tref > active context</ tref > , or an < tref > array </ tref > composed of any of the previous allowed values .</ p >
2822
2892
< p > If the < tref > expanded term definition</ tref > contains the < code > @type</ code > < tref > keyword</ tref > ,
2823
2893
it MUST be a < tref > string</ tref > having the lexical form of < tref > absolute IRI</ tref > ,
2824
2894
< tref > compact IRI</ tref > , or a < tref > term</ tref > defined in the defining < tref > context
0 commit comments