json-ld-api
json-ld-api copied to clipboard
expansion algorithm checking language map value against BCP47
In the expansion algorithm, while processing language mappings in step 13.7 and substeps, a variable name seems to be swapped:
Step 13.7.4.2.3 says to check item as being well-formed accoding to BCP47. This implies that item is a language tag. However, it is defined in step 13.7.4.2 that item comes from the language value, i.e. the value which is mapped to a language tag, not the language tag itself. The language tag is actually in language, which should thus be checked instead of item.
I think <var>item</var> should be replaced with <var>language</var> on the following line:
https://github.com/w3c/json-ld-api/blob/9e5eae38b68656671dfc60042b98e1bffb45197a/index.html#L2882
Summary: in 13.7.4.2.3 the tex erroneously says "If item is neither @none nor well-formed according to section 2.2.9 of [BCP47]," It should be checking for "language" which is the intention of the algorithm step.
Thanks, @Johann150, good catch. It should how show up as an erratum.