@@ -557,7 +557,9 @@ <h2>Conformance</h2>
557
557
from the result that would be obtained by the specification's algorithms.</ p >
558
558
559
559
< p > This specification does not define how JSON-LD Implementations or Processors handle
560
- non-conforming input documents.</ p >
560
+ non-conforming input documents. This implies that JSON-LD Implementations or Processors
561
+ MUST NOT attempt to correct malformed IRIs or language tags; however, they MAY issue
562
+ validation warnings.</ p >
561
563
562
564
< p class ="note "> Implementers can partially check their level of conformance to
563
565
this specification by successfully passing the test cases of the JSON-LD test
@@ -810,8 +812,7 @@ <h2>Expansion Algorithm</h2>
810
812
nor < tref > null</ tref > trigger an < code class ="error "> INVALID_VALUE_OBJECT_VALUE</ code > error.</ li >
811
813
< li > If < em > expanded property</ em > equals < code > @language</ code > , set the < code > @language</ code >
812
814
member of < em > result</ em > to the lowercased < em > value</ em > . If < em > value</ em > is not
813
- a valid language tag according [[!BCP47]], trigger an
814
- < code class ="error "> INVALID_LANGUAGE_VALUE</ code > error.</ li >
815
+ a < tref > string</ tref > , trigger an < code class ="error "> INVALID_LANGUAGE_VALUE</ code > error.</ li >
815
816
< li > If < em > expanded property</ em > equals < code > @annotation</ code > , set the < code > @annotation</ code >
816
817
member of < em > result</ em > to < em > value</ em > . If < em > value</ em > is not a < tref > string</ tref >
817
818
trigger an < code class ="error "> INVALID_ANNOTATION_VALUE</ code > error.</ li >
@@ -840,9 +841,7 @@ <h2>Expansion Algorithm</h2>
840
841
consisting of two members: < code > @value</ code > set to the currently
841
842
processed item and < code > @language</ code > set to the lowercased < em > key</ em > .
842
843
If < em > val</ em > is not a < tref > string</ tref > , trigger a
843
- < code class ="error "> LANGUAGE_MAP_INVALID_VALUE</ code > error; if < em > key</ em >
844
- is not a valid language tag according [[!BCP47]], trigger an
845
- < code class ="error "> LANGUAGE_MAP_INVALID_KEY</ code > error. Otherwise append
844
+ < code class ="error "> LANGUAGE_MAP_INVALID_VALUE</ code > error. Otherwise append
846
845
the object to < em > language map values</ em > .</ li >
847
846
</ ol >
848
847
</ li >
@@ -985,13 +984,14 @@ <h2 id="context">Context Processing</h2>
985
984
< code class ="error "> INVALID_LOCAL_CONTEXT</ code > error.</ li >
986
985
< li > Otherwise, if < em > context</ em > is an < tref > JSON object</ tref > , perform the following steps:
987
986
< ol class ="algorithm ">
988
- < li > If < em > context</ em > has a < code > @vocab</ code > member: if its value is not
989
- a valid < tref > absolute IRI</ tref > or < tref > null</ tref > trigger an
990
- < code class ="error "> INVALID_VOCAB_MAPPING</ code > error; otherwise set the
991
- < tref title ="active context "> active context's</ tref > < tref > vocabulary mapping</ tref > to
992
- its value and remove the < code > @vocab</ code > member from < em > context</ em > .</ li >
993
- < li > If < em > context</ em > has a < code > @language</ code > member: if its value is not
994
- a valid language tag according [[!BCP47]] or < tref > null</ tref > trigger an
987
+ < li > If < em > context</ em > has a < code > @vocab</ code > member: if its value is neither
988
+ an < tref > absolute IRI</ tref > , i.e., it does not contain a colon (< code > :</ code > ),
989
+ nor < tref > null</ tref > , trigger an < code class ="error "> INVALID_VOCAB_MAPPING</ code >
990
+ error; otherwise set the < tref title ="active context "> active context's</ tref >
991
+ < tref > vocabulary mapping</ tref > to its value and remove the < code > @vocab</ code >
992
+ member from < em > context</ em > .</ li >
993
+ < li > If < em > context</ em > has a < code > @language</ code > member: if its value is neither
994
+ a < tref > string</ tref > nor < tref > null</ tref > , trigger an
995
995
< code class ="error "> INVALID_DEFAULT_LANGUAGE</ code > error; otherwise set the
996
996
< tref title ="active context "> active context's</ tref > < tref > default language</ tref > to
997
997
its value and remove the < code > @language</ code > member from < em > context</ em > .</ li >
@@ -1005,11 +1005,9 @@ <h2 id="context">Context Processing</h2>
1005
1005
for < em > key</ em > in the < tref > active context</ tref > with an < tref > IRI mapping</ tref >
1006
1006
set to < tref > null</ tref > and continue with the next < em > key</ em > -< em > value</ em > pair.</ li >
1007
1007
< li > If < em > value</ em > is a < tref > string</ tref > , expand it according to the
1008
- < a href ="#iri-expansion "> IRI Expansion algorithm</ a > . If the result is neither a
1009
- < tref > keyword</ tref > nor a valid < tref > absolute IRI</ tref > , trigger an
1010
- < code class ="error "> INVALID_TERM_DEFINITION</ code > error. Otherwise replace the
1008
+ < a href ="#iri-expansion "> IRI Expansion algorithm</ a > and replace the
1011
1009
< tref > term definition</ tref > for < em > key</ em > in the < tref > active context</ tref > with
1012
- an < tref > IRI mapping</ tref > set to the expanded < em > value</ em > and continue with
1010
+ an < tref > IRI mapping</ tref > set to the expanded < em > value</ em > . Continue with
1013
1011
the next < em > key</ em > -< em > value</ em > pair.</ li >
1014
1012
< li > If < em > value</ em > is not a < tref > JSON object</ tref > , trigger an
1015
1013
< code class ="error "> INVALID_TERM_DEFINITION</ code > error</ li >
@@ -1019,9 +1017,8 @@ <h2 id="context">Context Processing</h2>
1019
1017
< li > If < em > value</ em > has an < code > @id</ code > member with a value < em > val</ em >
1020
1018
< ol class ="algorithm ">
1021
1019
< li > and < em > val</ em > is an < tref > array</ tref > , expand each item according the
1022
- < a href ="#iri-expansion "> IRI Expansion algorithm</ a > . If an item does not expand to
1023
- a valid < tref > absolute IRI</ tref > , raise an
1024
- < code class ="error "> INVALID_PROPERTY_GENERATOR</ code > error; otherwise sort
1020
+ < a href ="#iri-expansion "> IRI Expansion algorithm</ a > . If an item is not a < tref > string</ tref > ,
1021
+ raise an < code class ="error "> INVALID_PROPERTY_GENERATOR</ code > error; otherwise sort
1025
1022
< em > val</ em > and store it as < tref > IRI mapping</ tref > in < em > definition</ em > .</ li >
1026
1023
< li > Otherwise, if < em > val</ em > is a < tref > string</ tref > , expand it according the
1027
1024
< a href ="#iri-expansion "> IRI Expansion algorithm</ a > . Set the < tref > IRI mapping</ tref > of
@@ -1035,14 +1032,14 @@ <h2 id="context">Context Processing</h2>
1035
1032
< li > Otherwise, set the < tref > IRI mapping</ tref > of < em > definition</ em > to the result of
1036
1033
expanding < em > key</ em > according the < a href ="#iri-expansion "> IRI Expansion algorithm</ a > .</ li >
1037
1034
< li > If < em > value</ em > has an < code > @type</ code > member with a value < em > val</ em > and < em > val</ em >
1038
- is not a < tref > string</ tref > or does not expand to an absolute IRI using the
1035
+ is not a < tref > string</ tref > or does not expand to an < tref > absolute IRI</ tref > using the
1039
1036
< a href ="#iri-expansion "> IRI Expansion algorithm</ a > , raise an
1040
1037
< code class ="error "> INVALID_TYPE_MAPPING</ code > error. Otherwise set the
1041
1038
< tref > IRI mapping</ tref > of < em > definition</ em > to the expanded < em > val</ em > .</ li >
1042
1039
< li > Otherwise, if < em > value</ em > has an < code > @language</ code > member with a value < em > val</ em >
1043
- that is a valid language tag according [[!BCP47]] or < tref > null</ tref > , set the
1044
- < tref > language mapping </ tref > of < em > definition</ em > to the lowercased < em > val</ em > .
1045
- If < em > val </ em > is not a valid language tag or < tref > null</ tref > , raise an
1040
+ that is a < tref > string </ tref > or < tref > null</ tref > , set the < tref > language mapping </ tref > of
1041
+ < em > definition</ em > to the lowercased < em > val</ em > . If < em > val </ em > is neither a
1042
+ < tref > string </ tref > nor < tref > null</ tref > , raise an
1046
1043
< code class ="error "> INVALID_LANGUAGE_MAPPING</ code > error.</ li >
1047
1044
< li > f < em > value</ em > has an < code > @container</ code > member with a value < em > val</ em > that
1048
1045
equals < code > @list</ code > , < code > @set</ code > , or < code > @annotation</ code > , set the
0 commit comments