Defines the shape describing localised text, stated once per language, together with its constraint types, and
provides the dictionary factory stating them, mapping
JSON-LD language maps to
RDF 1.1 language-tagged strings. A property
whose value varies by language takes one member rather than one per language.
Important
Contradictory constraints are rejected as the shape is built, so a shape that exists admits at least one value:
stating minLength above maxLength throws a TraceError.
How many strings a tag carries is fixed by uniqueLang: a unique-tagged
shape gives every tag a single string, and any other gives every tag an array. A member ranging over a dictionary
carries the map whole, never in an array, whatever cardinality it states.
The tag-keyed map is the form a value is stored and submitted in. A localised member additionally coalesces under
language negotiation when retrieved, at the same per-tag arity: the value may be retrieved as the negotiated content
alone, and filtered by a plain string operand matched against it under ordinary textual semantics. Submission never
coalesces: it accepts the tag-keyed form alone.
Compatibility
JSON
JSON-LD
RDF 1.1
tag-keyed string map
@language-container language map
language-tagged string literals
Defining language-tagged shapes
Values are tag-keyed maps; the und tag carries content of undetermined
language (a proper name, say), and the zxx tag content with no language at
all (identifiers, codes, formulae):
constlabel = dictionary({ uniqueLang:true }); // a single string per tag constkeywords = dictionary(); // an array of strings per tag constname = dictionary({ minLength:1, maxLength:200 });// length-constrained constabstract = dictionary({ languageIn: ["en", "it"] });// language-restricted
Dictionary shape types and operations.
Defines the shape describing localised text, stated once per language, together with its constraint types, and provides the dictionary factory stating them, mapping JSON-LD language maps to RDF 1.1 language-tagged strings. A property whose value varies by language takes one member rather than one per language.
Contradictory constraints are rejected as the shape is built, so a shape that exists admits at least one value: stating
minLengthabovemaxLengththrows a TraceError.How many strings a tag carries is fixed by uniqueLang: a unique-tagged shape gives every tag a single string, and any other gives every tag an array. A member ranging over a dictionary carries the map whole, never in an array, whatever cardinality it states.
The tag-keyed map is the form a value is stored and submitted in. A localised member additionally coalesces under language negotiation when retrieved, at the same per-tag arity: the value may be retrieved as the negotiated content alone, and filtered by a plain string operand matched against it under ordinary textual semantics. Submission never coalesces: it accepts the tag-keyed form alone.
Compatibility
@language-container language mapDefining language-tagged shapes
Values are tag-keyed maps; the
undtag carries content of undetermined language (a proper name, say), and thezxxtag content with no language at all (identifiers, codes, formulae):Using in resource shapes
A member carries one map whatever cardinality it states, so
keywordsabove reads as a single map of string arrays and never as an array of maps.See