Skip to content

Commit 27039ce

Browse files
committed
Renamed @literal to @value. This closes #48.
1 parent 1fd445a commit 27039ce

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed

spec/latest/json-ld-api/index.html

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -668,11 +668,11 @@ <h2>Syntax Tokens and Keywords</h2>
668668
<dt><code>@context</code></dt><dd>Used to set the <tref>local context</tref>.</dd>
669669
<dt><code>@id</code></dt><dd>Sets the active subject.</dd>
670670
<dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
671-
<dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
671+
<dt><code>@value</code></dt><dd>Used to specify the value of a literal.</dd>
672672
<dt><code>@type</code></dt><dd>Used to set the type of the active subject or the datatype of a literal.</dd>
673673
<dt><code>:</code></dt><dd>The separator for JSON keys and values that use the <tref>prefix</tref> mechanism.</dd>
674674
</dl>
675-
675+
676676
<p>All JSON-LD tokens and keywords are case-sensitive.</p>
677677
</section>
678678

@@ -823,7 +823,7 @@ <h2 id="context">Context</h2>
823823
</ol>
824824
</li>
825825
</ol>
826-
826+
827827
<p class="note">It can be difficult to distinguish between a <code>prefix:suffix</code> and an absolute IRI,
828828
as a <tref>prefix</tref> may seem to be a valid IRI <em>scheme</em>. When performing repeated IRI expansion,
829829
a term used as a prefix may not have a valid mapping due to dependencies in resolving term definitions. By
@@ -887,11 +887,11 @@ <h2>Value Expansion</h2>
887887
are required to be expanded at times when processing JSON-LD documents.
888888
</p>
889889

890-
<p>The algorithm for expanding a value <em>value</em> takes an <tref>active property</tref>
890+
<p>The algorithm for expanding a <em>value</em> takes an <tref>active property</tref>
891891
and <tref>active context</tref>. It is implemented as follows:</p>
892892
<ol class="algorithm">
893893
<li>If <em>value</em> is <tref>true</tref>, <tref>false</tref> or <tref>number</tref>, expand the value by
894-
adding a two new key-value pairs. The first key-value pair will be <code>@literal</code> and
894+
adding a two new key-value pairs. The first key-value pair will be <code>@value</code> and
895895
the string representation of <em>value</em>. The second key-value pair will be <code>@type></code>,
896896
and the expanded version of <code>xsd:boolean</code>, <code>xsd:integer</code>, or <code>xsd:double</code>,
897897
depending on <em>value</em>.
@@ -900,11 +900,11 @@ <h2>Value Expansion</h2>
900900
key is <code>@id</code> and the value is the expanded IRI according to the <a href="#iri-expansion">IRI
901901
Expansion</a> rules.</li>
902902
<li>Otherwise, if <tref>active property</tref> is the target of typed literal coercion,
903-
expand <em>value</em> by adding two new key-value pairs. The first key-value pair will be <code>@literal</code>
903+
expand <em>value</em> by adding two new key-value pairs. The first key-value pair will be <code>@value</code>
904904
and the unexpanded value. The second key-value pair will be <code>@type</code> and the associated coercion
905905
datatype expanded according to the <a href="#iri-expansion">IRI Expansion</a> rules.</li>
906-
<li>Otherwise, if the <tref>active context</tref> has a <code>@language</code>,
907-
expand <em>value</em> by adding two new key-value pairs. The first key-value pair will be <code>@literal</code>
906+
<li>Otherwise, if the <tref>active context</tref> has a <code>@language</code>,
907+
expand <em>value</em> by adding two new key-value pairs. The first key-value pair will be <code>@value</code>
908908
and the unexpanded value. The second key-value pair will be <code>@language</code> and value of
909909
<code>@language</code> from the <tref>active context</tref>.</li> <li>Otherwise, <em>value</em> is already
910910
expanded.</li>
@@ -923,7 +923,7 @@ <h2>Value Compaction</h2>
923923
and <tref>active context</tref>. It is implemented as follows:</p>
924924
<ol class="algorithm">
925925
<li>If the value may be expressed as <tref>true</tref>, <tref>false</tref> or <tref>number</tref>,
926-
the value is the native representation of the <code>@literal</code> value.</li>
926+
the value is the native representation of the <code>@value</code> value.</li>
927927
<li>Otherwise, if the <tref>active context</tref> contains a coercion target for the
928928
key that matches the expression of the value, compact the value using the
929929
following steps:
@@ -933,15 +933,15 @@ <h2>Value Compaction</h2>
933933
processed according to the
934934
<a href="#iri-compaction">IRI Compaction</a> steps.</li>
935935
<li>If the coercion target is a typed literal, the compacted
936-
value is the value associated with the <code>@literal</code> key.</li>
936+
value is the value associated with the <code>@value</code> key.</li>
937937
</ol>
938938
</li>
939939
<li>Otherwise, if <em>value</em> contains an <code>@id</code> key, the compacted value is <em>value</em> with
940940
the value of <code>@id</code> processed according to the
941941
<a href="#iri-compaction">IRI Compaction</a> steps.</li>
942942
<li>Otherwise, if the <tref>active context</tref> contains a <code>@language</code>, which
943-
matches the <code>@language</code> of the value, or the value has only a <code>@literal</code> key, the compacted
944-
value is the value associated with the <code>@literal</code> key.</li>
943+
matches the <code>@language</code> of the value, or the value has only a <code>@value</code> key, the compacted
944+
value is the value associated with the <code>@value</code> key.</li>
945945
<li>Otherwise, if the value contains a <code>@type</code> key, the compacted value
946946
is <em>value</em> with the <code>@type</code> value processed according to the
947947
<a href="#iri-compaction">IRI Compaction</a> steps.</li>
@@ -1010,7 +1010,7 @@ <h3>Expansion Algorithm</h3>
10101010
<ol class="algorithm">
10111011
<li>If the key is <code>@id</code> or <code>@type</code> and the value is a <tref>string</tref>,
10121012
expand the value according to <a href="#iri-expansion">IRI Expansion</a>.</li>
1013-
<li>Otherwise, if the key is <code>@literal</code>, the value MUST be a <tref>string</tref> and
1013+
<li>Otherwise, if the key is <code>@value</code>, the value MUST be a <tref>string</tref> and
10141014
is not subject to further expansion.</li>
10151015
<li>Otherwise, if the key is not a <tref>keyword</tref>, expand the key according to
10161016
<a href="#iri-expansion">IRI Expansion</a> rules and set as <tref>active property</tref>.</li>
@@ -1133,7 +1133,7 @@ <h3>Compaction Algorithm</h3>
11331133
<li>If the value is an object
11341134
<ol class="algorithm">
11351135
<li>If the value contains only an <code>@id</code> key or the value contains a
1136-
<code>@literal</code> key, the compacted value is the result of performing
1136+
<code>@value</code> key, the compacted value is the result of performing
11371137
<a href="#value-compaction">Value Compaction</a> on the value.</li>
11381138
<li>Otherwise, if the value contains only a <code>@list</code> key, and the
11391139
<tref>active property</tref> is subject to list coercion, the compacted value is the result of
@@ -1953,7 +1953,7 @@ <h4>Object Comparison Algorithm</h4>
19531953
<li>If both values are literals:
19541954
<ol class="algorithm">
19551955
<li>The lexicographically lesser string associated with
1956-
<code>@literal</code> is first.
1956+
<code>@value</code> is first.
19571957
</li>
19581958
<li>The lexicographically lesser string associated with
19591959
<code>@type</code> is first.
@@ -2417,24 +2417,24 @@ <h4>Label Serialization Algorithm</h4>
24172417
<code>&lt;</code><strong>IRI</strong><code>&gt;</code>
24182418
where <strong>IRI</strong> is the value associated with the
24192419
<code>@id</code> key.</li>
2420-
<li>If the object contains a <code>@literal</code> key and a
2420+
<li>If the object contains a <code>@value</code> key and a
24212421
<code>@type</code> key, build the <tref>object string</tref>
24222422
using the pattern
2423-
<code>"</code><strong>LITERAL</strong><code>"^^&lt;</code><strong>DATATYPE</strong><code>&gt;</code>
2424-
where <strong>LITERAL</strong> is the value associated with the
2425-
<code>@literal</code> key and <strong>DATATYPE</strong> is the
2423+
<code>"</code><strong>VALUE</strong><code>"^^&lt;</code><strong>DATATYPE</strong><code>&gt;</code>
2424+
where <strong>VALUE</strong> is the value associated with the
2425+
<code>@value</code> key and <strong>DATATYPE</strong> is the
24262426
value associated with the <code>@type</code> key.</li>
2427-
<li>If the object contains a <code>@literal</code> key and a
2427+
<li>If the object contains a <code>@value</code> key and a
24282428
<code>@language</code> key, build the <tref>object string</tref>
24292429
using the pattern
2430-
<code>"</code><strong>LITERAL</strong><code>"@</code><strong>LANGUAGE</strong>
2431-
where <strong>LITERAL</strong> is the value associated with the
2432-
<code>@literal</code> key and <strong>LANGUAGE</strong> is the
2430+
<code>"</code><strong>VALUE</strong><code>"@</code><strong>LANGUAGE</strong>
2431+
where <strong>VALUE</strong> is the value associated with the
2432+
<code>@value</code> key and <strong>LANGUAGE</strong> is the
24332433
value associated with the <code>@language</code> key.</li>
24342434
<li>Otherwise, the value is a string. Build the
24352435
<tref>object string</tref> using the pattern
2436-
<code>"</code><strong>LITERAL</strong><code>"</code>
2437-
where <strong>LITERAL</strong> is the value associated with the
2436+
<code>"</code><strong>VALUE</strong><code>"</code>
2437+
where <strong>VALUE</strong> is the value associated with the
24382438
current key.</li>
24392439
<li>If this is the second iteration of the loop,
24402440
append a <code>|</code> separator character to the
@@ -2642,7 +2642,7 @@ <h3>RDF Conversion Algorithm</h3>
26422642
with those <tref>keyword</tref>s. Use the new <tref>JSON object</tref> in subsequent steps.
26432643
</li>
26442644
<li>
2645-
If the <tref>JSON object</tref> has a <code>@literal</code> key, set the <tref>active object</tref>
2645+
If the <tref>JSON object</tref> has a <code>@value</code> key, set the <tref>active object</tref>
26462646
to a literal value as follows:
26472647
<ol class="algorithm">
26482648
<li>

spec/latest/json-ld-syntax/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ <h2>Syntax Tokens and Keywords</h2>
416416
<dt><code>@context</code></dt><dd>Used to set the <tref>local context</tref>.</dd>
417417
<dt><code>@id</code></dt><dd>Sets the active subject.</dd>
418418
<dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
419-
<dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
419+
<dt><code>@value</code></dt><dd>Used to specify the value of a literal.</dd>
420420
<dt><code>@type</code></dt><dd>Used to set the type of the active subject or the datatype of a literal.</dd>
421421
<dt><code>:</code></dt><dd>The separator for JSON keys and values that use the <tref>prefix</tref> mechanism.</dd>
422422
</dl>
@@ -979,7 +979,7 @@ <h2>String Internationalization</h2>
979979
...
980980
"name": ****
981981
{
982-
"@literal": "花澄",
982+
"@value": "花澄",
983983
"@language": "ja"
984984
}****
985985
...
@@ -1037,7 +1037,7 @@ <h2>Typed Literals</h2>
10371037
{
10381038
...
10391039
"modified": ****{
1040-
"@literal": "2010-05-29T14:17:39+02:00",
1040+
"@value": "2010-05-29T14:17:39+02:00",
10411041
"@type": "xsd:dateTime"
10421042
}****
10431043
...
@@ -1135,8 +1135,8 @@ <h2>Multiple Literals for a Single Property</h2>
11351135
"@id": "http://example.org/articles/8",
11361136
"dc:title": ****
11371137
[
1138-
{"@literal": "Das Kapital", "@language": "de"},
1139-
{"@literal": "Capital", "@language": "en"}
1138+
{"@value": "Das Kapital", "@language": "de"},
1139+
{"@value": "Capital", "@language": "en"}
11401140
]****
11411141
}-->
11421142
</pre>
@@ -1340,7 +1340,7 @@ <h3>Expanded Term Definition</h3>
13401340
<p>Within a <tref>context</tref> definition, <tref>term</tref>s MAY be defined using an expanded notation to allow
13411341
for additional information associated with the term to be specified (see <a href="#type-coerceion">Type
13421342
Coercion</a> and <a href="#rdf-collection">Lists</a>).</p>
1343-
1343+
13441344
<p>Instead of using a string representation of an IRI, the IRI is specified using an object having
13451345
an <code>@id</code> key. The value of this key MUST be an absolute IRI.</p>
13461346

@@ -1379,7 +1379,7 @@ <h3>Default Language</h3>
13791379
...
13801380
"name":
13811381
{
1382-
"@literal": "花澄",
1382+
"@value": "花澄",
13831383
"@language": "ja"
13841384
}
13851385
...
@@ -1424,7 +1424,7 @@ <h3>Default Language</h3>
14241424
"name": "花澄"
14251425
"occupation": ****
14261426
{
1427-
"@literal": "Scientist",
1427+
"@value": "Scientist",
14281428
"@language": "en"
14291429
}****
14301430
...
@@ -1447,7 +1447,7 @@ <h3>Default Language</h3>
14471447
"name": "花澄"
14481448
"occupation": ****
14491449
{
1450-
"@literal": "Ninja"
1450+
"@value": "Ninja"
14511451
}****
14521452
...
14531453
}
@@ -1625,7 +1625,7 @@ <h2>Automatic Typing</h2>
16251625
// The following value is automatically converted to a type of xsd:double as well
16261626
"space:astronomicUnits": ****6.5e73****,
16271627
// The following value should never be converted to a language-native type
1628-
"measure:stones": ****{ "@literal": "4.8", "@type": "xsd:decimal" }****,
1628+
"measure:stones": ****{ "@value": "4.8", "@type": "xsd:decimal" }****,
16291629
// This value is automatically converted to having a type of xsd:integer
16301630
"chem:protons": ****12****,
16311631
// This value is automatically converted to having a type of xsd:boolean

0 commit comments

Comments
 (0)