@@ -1275,7 +1275,10 @@ <h3>Algorithm</h3>
1275
1275
If it is not a < a > string</ a > , an
1276
1276
< a data-link-for ="JsonLdErrorCode "> invalid default language</ a >
1277
1277
error has been detected and processing is aborted.
1278
- < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lowercase.</ span >
1278
+ < span class ="changed "> If < var > value</ var > is not a < a > well-formed</ a > according to
1279
+ < a data-cite ="BCP47#section-2.2.9 "> section 2.2.9</ a > of [[BCP47]],
1280
+ processors SHOULD issue a warning.</ span >
1281
+ < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lower case.</ span >
1279
1282
</ li >
1280
1283
</ ol >
1281
1284
</ li >
@@ -1633,11 +1636,14 @@ <h3>Algorithm</h3>
1633
1636
< ol >
1634
1637
< li > Initialize < var > language</ var > to the value associated with the
1635
1638
< code > @language</ code > < a > entry</ a > , which MUST be either < code > null</ code >
1636
- or a < a > string</ a > . Otherwise, an
1637
- < a data-link-for ="JsonLdErrorCode "> invalid language mapping</ a >
1639
+ or a < a > string</ a > .
1640
+ < span class ="changed "> If < var > language</ var > is not a < a > well-formed</ a > according to
1641
+ < a data-cite ="BCP47#section-2.2.9 "> section 2.2.9</ a > of [[BCP47]],
1642
+ processors SHOULD issue a warning.</ span >
1643
+ Otherwise, an < a data-link-for ="JsonLdErrorCode "> invalid language mapping</ a >
1638
1644
error has been detected and processing is aborted.</ li >
1639
1645
< li > Set the < a > language mapping</ a > of < var > definition</ var > to < var > language</ var > .
1640
- < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lowercase .</ span >
1646
+ < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lower case .</ span >
1641
1647
</ li >
1642
1648
</ ol >
1643
1649
</ li >
@@ -2138,13 +2144,16 @@ <h3>Algorithm</h3>
2138
2144
< var > value</ var > is not a < a > string</ a > , an
2139
2145
< a data-link-for ="JsonLdErrorCode "> invalid language-tagged string</ a >
2140
2146
error has been detected and processing is aborted.
2147
+ < span class ="changed "> If < var > value</ var > is not a < a > well-formed</ a > according to
2148
+ < a data-cite ="BCP47#section-2.2.9 "> section 2.2.9</ a > of [[BCP47]],
2149
+ processors SHOULD issue a warning.</ span >
2141
2150
< span class ="changed ">
2142
2151
Otherwise, set < var > expanded value</ var > to < var > value</ var > .
2143
2152
When the {{JsonLdOptions/frameExpansion}} flag is set, < var > value</ var >
2144
2153
may also be an empty < a > map</ a > or an array of zero or
2145
2154
< a > strings</ a > . < var > expanded value</ var > will be an
2146
2155
< a > array</ a > of one or more < a > string</ a > values.</ span >
2147
- < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lowercase .</ span >
2156
+ < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lower case .</ span >
2148
2157
</ li >
2149
2158
< li class ="changed "> If < var > expanded property</ var > is < code > @direction</ code > and
2150
2159
< var > value</ var > is neither `"ltr"` nor `"rtl"`, an
@@ -2284,7 +2293,10 @@ <h3>Algorithm</h3>
2284
2293
consisting of two
2285
2294
key-value pairs: (< code > @value</ code > -< var > item</ var > )
2286
2295
and (< code > @language</ code > -< var > language</ var > ).
2287
- < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lowercase.</ span >
2296
+ < span class ="changed "> If < var > item</ var > is neither `@none` nor a < a > well-formed</ a > according to
2297
+ < a data-cite ="BCP47#section-2.2.9 "> section 2.2.9</ a > of [[BCP47]],
2298
+ processors SHOULD issue a warning.</ span >
2299
+ < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lower case.</ span >
2288
2300
</ li >
2289
2301
< li class ="changed "> If < var > language</ var > is < code > @none</ code > ,
2290
2302
or expands to < code > @none</ code > , remove < code > @language</ code > from < var > v</ var > .</ li >
@@ -3323,6 +3335,11 @@ <h3>Overview</h3>
3323
3335
to choosing more generic < a > terms</ a > when a more
3324
3336
specifically-matching < a > term</ a > is not available for a particular
3325
3337
< a > IRI</ a > and value combination.</ p >
3338
+
3339
+ < p class ="changed "> Although normalizing < a > language tags</ a > is optional,
3340
+ the < a > inverse context</ a > creates entries based on normalized
3341
+ < a > language tags</ a > , so that the proper term can be selected
3342
+ regardless of representation.</ p >
3326
3343
</ section >
3327
3344
3328
3345
< section class ="algorithm ">
@@ -3335,7 +3352,8 @@ <h3>Algorithm</h3>
3335
3352
< li > Initialize < var > result</ var > to an empty < a class ="changed "> map</ a > .</ li >
3336
3353
< li > Initialize < var > default language</ var > to < code > @none</ code > .
3337
3354
If the < var > active context</ var > has a < a > default language</ a > ,
3338
- set < var > default language</ var > to the < a > default language</ a > from the < a > active context</ a > .</ li >
3355
+ set < var > default language</ var > to the < a > default language</ a > from the < a > active context</ a >
3356
+ < span class ="changed "> normalized to lower case</ span > .</ li >
3339
3357
< li > For each key < a > term</ a > and value < a > term definition</ a > in
3340
3358
the < var > active context</ var > , ordered by shortest < a > term</ a >
3341
3359
first (breaking ties by choosing the lexicographically least
@@ -3412,9 +3430,11 @@ <h3>Algorithm</h3>
3412
3430
< li > If neither the < a > language mapping</ a > nor the < a > direction mapping</ a >
3413
3431
are `null`, set < var > lang dir</ var > to the concatenation
3414
3432
of < a > language mapping</ a > and < a > direction mapping</ a >
3415
- separated by an underscore (`"_"`).</ li >
3433
+ separated by an underscore (`"_"`)
3434
+ normalized to lower case.</ li >
3416
3435
< li > Otherwise, if < a > language mapping</ a > is not `null`,
3417
- set < var > lang dir</ var > to the < a > language mapping</ a > .
3436
+ set < var > lang dir</ var > to the < a > language mapping</ a > ,
3437
+ normalized to lower case.
3418
3438
< li > Otherwise, if < a > direction mapping</ a > is not `null`,
3419
3439
set < var > lang dir</ var > to < a > direction mapping</ a >
3420
3440
preceded by an underscore (`"_"`).</ li >
@@ -3428,7 +3448,8 @@ <h3>Algorithm</h3>
3428
3448
< ol >
3429
3449
< li > If the < a > language mapping</ a > equals < code > null</ code > ,
3430
3450
set < var > language</ var > to < code > @null</ code > ; otherwise set it
3431
- to the < a > language mapping</ a > .</ li >
3451
+ to the < a > language mapping</ a > ,
3452
+ < span class ="changed "> normalized to lower case</ span > .</ li >
3432
3453
< li > If < var > language map</ var > does not have a < var > language</ var > < a > entry</ a > ,
3433
3454
create one and set its value to the < a > term</ a >
3434
3455
being processed.</ li >
@@ -3450,7 +3471,8 @@ <h3>Algorithm</h3>
3450
3471
< ol >
3451
3472
< li > Initialize a variable < var > lang dir</ var >
3452
3473
with the concatenation of < a > default language</ a > and < a > default base direction</ a > ,
3453
- separate by an underscore (`"_"`).</ li >
3474
+ separate by an underscore (`"_"`),
3475
+ normalized to lower case.</ li >
3454
3476
< li > If < var > language map</ var > does not have a < var > lang dir</ var > < a > entry</ a > ,
3455
3477
create one and set its value to the < a > term</ a >
3456
3478
being processed.</ li >
@@ -3464,8 +3486,9 @@ <h3>Algorithm</h3>
3464
3486
</ li >
3465
3487
< li > Otherwise:
3466
3488
< ol >
3467
- < li > If < var > language map</ var > does not have a < var > default language</ var >
3468
- < a > entry</ a > , create one and set its value to the < a > term</ a >
3489
+ < li > If < var > language map</ var > does not have a < var > default language</ var > < a > entry</ a >
3490
+ < span class ="changed "> (after being normalized to lower case)</ span > ,
3491
+ create one and set its value to the < a > term</ a >
3469
3492
being processed.</ li >
3470
3493
< li > If < var > language map</ var > does not have an < code > @none</ code >
3471
3494
< a > entry</ a > , create one and set its value to the < a > term</ a >
@@ -3529,7 +3552,8 @@ <h3>Overview</h3>
3529
3552
3530
3553
< p class ="changed "> When considering < a > language mapping</ a > ,
3531
3554
the < a > direction mapping</ a > is also considered, either with, or without,
3532
- a < a > language mapping</ a > .</ p >
3555
+ a < a > language mapping</ a > ,
3556
+ and the < a > language mapping</ a > is normalized to lower case.</ p >
3533
3557
3534
3558
< p class ="changed "> In the case were this algorithm would return the input < a > IRI</ a > as is,
3535
3559
and that < a > IRI</ a > can be mistaken for a < a > compact IRI</ a > in the < a > active context</ a > ,
@@ -3557,14 +3581,17 @@ <h3>Algorithm</h3>
3557
3581
< ol >
3558
3582
< li class ="changed "> Initialize < var > default language</ var >
3559
3583
based on the < a data-lt ="active context "> active context's</ a >
3560
- < a > default language</ a > and < a > default base direction</ a > :
3584
+ < a > default language</ a > , normalized to lower case and < a > default base direction</ a > :
3561
3585
< ol >
3562
3586
< li > If the < a data-lt ="active context "> active context's</ a > < a > default base direction</ a >
3563
3587
is not `null`, to the concatenation of
3564
3588
the < a data-lt ="active context "> active context's</ a > < a > default language</ a >
3565
- and < a > default base direction</ a > , separated by an underscore (`"_"`).</ li >
3589
+ and < a > default base direction</ a > , separated by an underscore (`"_"`),
3590
+ normalized to lower case.</ li >
3566
3591
< li > Otherwise, to the < a data-lt ="active context "> active context's</ a > < a > default language</ a > ,
3567
- if it has one, otherwise to `@none`.</ li >
3592
+ if it has one,
3593
+ normalized to lower case,
3594
+ otherwise to `@none`.</ li >
3568
3595
</ ol >
3569
3596
</ li >
3570
3597
< li class ="changed "> If < var > value</ var > is a < a > map</ a > containing
@@ -3612,10 +3639,11 @@ <h3>Algorithm</h3>
3612
3639
< li class ="changed "> If < var > item</ var > contains an `@direction` < a > entry</ a > ,
3613
3640
then set < var > item language</ var > to the concatenation of
3614
3641
the < var > item</ var > 's `@language` entry (if any)
3615
- the < var > item</ var > 's `@direction`, separated by an underscore (`"_"`).</ li >
3642
+ the < var > item</ var > 's `@direction`, separated by an underscore (`"_"`),
3643
+ normalized to lower case.</ li >
3616
3644
< li > Otherwise, if < var > item</ var > contains an < code > @language</ code > < a > entry</ a > ,
3617
- then set < var > item language</ var > to its associated
3618
- value .</ li >
3645
+ then set < var > item language</ var > to its associated value,
3646
+ normalized to lower case .</ li >
3619
3647
< li > Otherwise, if < var > item</ var > contains a
3620
3648
< code > @type</ code > < a > entry</ a > , set < var > item type</ var > to its
3621
3649
associated value.</ li >
@@ -3687,13 +3715,15 @@ <h3>Algorithm</h3>
3687
3715
and does not contain an `@index` < a > entry</ a > ,
3688
3716
then set < var > type/language value</ var > to the concatenation of
3689
3717
the < var > value</ var > 's `@language` entry (if any)
3690
- the < var > value</ var > 's `@direction`, separated by an underscore (`"_"`).
3718
+ the < var > value</ var > 's `@direction`, separated by an underscore (`"_"`),
3719
+ normalized to lower case.
3691
3720
Append `@language` and `@language@set` to
3692
3721
< var > containers</ var > .</ li >
3693
3722
< li > Otherwise, if < var > value</ var > contains an < code > @language</ code > < a > entry</ a >
3694
3723
and does not contain an < code > @index</ code > < a > entry</ a > ,
3695
3724
then set < var > type/language value</ var > to its associated
3696
- value and, append < code > @language</ code >
3725
+ value and, append < code > @language</ code > ,
3726
+ normalized to lower case,
3697
3727
< span class ="changed "> and < code > @language@set</ code > </ span > to
3698
3728
< var > containers</ var > .</ li >
3699
3729
< li > Otherwise, if < var > value</ var > contains a
@@ -4809,6 +4839,7 @@ <h3>Algorithm</h3>
4809
4839
set < var > datatype</ var > to the result of appending < var > language</ var >
4810
4840
and the value of `@direction` in < var > item</ var > separated by an underscore (`"_"`)
4811
4841
to `https://www.w3.org/ns/i18n#`.
4842
+ < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lower case.</ span >
4812
4843
Initialize < var > literal</ var > as an < a > RDF literal</ a > using
4813
4844
< var > value</ var > and < var > datatype</ var > .
4814
4845
< div class ="note "> As `@direction` may be used without `@language`,
@@ -4823,7 +4854,8 @@ <h3>Algorithm</h3>
4823
4854
< li > If the < var > item</ var > has an entry for `@language`,
4824
4855
create a new triple using < var > literal</ var > as the subject,
4825
4856
`rdf:language` as the predicate, and the value of `@language` in < var > item</ var >
4826
- as the object, and add it to < var > list triples</ var > .</ li >
4857
+ as the object, and add it to < var > list triples</ var > .
4858
+ < span class ="changed note "> Processors MAY normalize < a > language tags</ a > to lower case.</ span > </ li >
4827
4859
< li > Create a new triple using < var > literal</ var > as the subject,
4828
4860
`rdf:direction` as the predicate, and the value of `@direction` in < var > item</ var >
4829
4861
as the object, and add it to < var > list triples</ var > .</ li >
@@ -5373,7 +5405,7 @@ <h2>Data Round Tripping</h2>
5373
5405
< li > Native Numeric values SHOULD be serialized according to
5374
5406
< a data-cite ="?ECMASCRIPT#sec-tostring-applied-to-the-number-type "> Section 7.1.12.1</ a > of [[?ECMASCRIPT]],</ li >
5375
5407
< li > Strings SHOULD be serialized with Unicode codepoints from < code > U+0000</ code > through < code > U+001F</ code >
5376
- using lowercase hexadecimal Unicode notation (< code > \uhhhh</ code > ) unless in the set
5408
+ using lower case hexadecimal Unicode notation (< code > \uhhhh</ code > ) unless in the set
5377
5409
of predefined JSON control characters < code > U+0008</ code > , < code > U+0009</ code > ,
5378
5410
< code > U+000A</ code > , < code > U+000C</ code > or < code > U+000D</ code >
5379
5411
which SHOULD be serialized as < code > \b</ code > , < code > \t</ code > , < code > \n</ code > , < code > \f</ code > and < code > \r</ code > respectively.
@@ -6668,7 +6700,7 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
6668
6700
to that content.</ li >
6669
6701
< li > < a > Value objects</ a > , and associated < a > context</ a > and < a > term definitions</ a > have been updated to
6670
6702
support `@direction` for setting the < a > base direction</ a > of strings.</ li >
6671
- < li > It is no longer required that language tags be normalized to lowercase ,
6703
+ < li > It is no longer required that language tags be normalized to lower case ,
6672
6704
other than for testing considerations.
6673
6705
Language tags that are not valid according to [[BCP47]] are rejected.</ li >
6674
6706
</ ul >
0 commit comments