From 02c10e644d58c9b39821974b4c67d655f243535b Mon Sep 17 00:00:00 2001 From: Andy Seaborne Date: Sat, 21 Dec 2024 15:21:20 +0000 Subject: [PATCH] Recognize rdf:dirLangString --- spec/index.html | 51 +++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/spec/index.html b/spec/index.html index 9d525b6..4deae2b 100644 --- a/spec/index.html +++ b/spec/index.html @@ -751,12 +751,13 @@

Literals and datatypes

RDF literals and datatypes are fully described in Section 5 of [[!RDF12-CONCEPTS]]. - In summary: with one exception, RDF literals combine a string and an IRI identifing a datatype. - The exception is language-tagged strings, - which have two syntactic components, a string and a language tag, - and are assigned the type rdf:langString. - A datatype is understood to define a partial mapping, - called the + In summary: with two exceptions, RDF literals combine a string and an IRI identifing a datatype. + The exceptions are language-tagged strings, assigned the type rdf:langString, + which have two syntactic components, a string and a language tag, and + directional language-tagged string, + assigned the type rdf:dirLangString, + which have three syntactic components, a string, a language tag, and a base direction. + A datatype is understood to define a partial mapping, called the lexical-to-value mapping, from a lexical space (a set of character strings) to values. @@ -774,18 +775,26 @@

Literals and datatypes

for that datatype.

RDF processors are not required to recognize any datatype IRIs other than - rdf:langString - and xsd:string, + xsd:string, + rdf:langString, and + rdf:dirLangString but when IRIs listed in Section 5 of [[!RDF12-CONCEPTS]] are recognized, they MUST be interpreted as described there, and when the IRI rdf:PlainLiteral is recognized, it MUST be interpreted to denote the datatype defined in [[!RDF-PLAIN-LITERAL]]. RDF processors MAY recognize other datatype IRIs, but when other datatype IRIs are recognized, the mapping between the datatype IRI and the datatype it denotes MUST be specified unambiguously, and MUST be fixed during all RDF transformations or manipulations. In practice, this can be achieved by the IRI linking to an external specification of the datatype which describes both the components of the datatype itself and the fact that the IRI identifies the datatype, thereby fixing a value of the datatype map of this IRI.

Literals with rdf:langString - as their datatype are an exceptional case which are given a special treatment. - The IRI rdf:langString is classified as a datatype IRI, - and interpreted to denote a datatype, even though no L2V mapping is defined for it. - The value space of rdf:langString is the set of all pairs of a string with a language tag. - The semantics of literals with this as their type are given below.

+ or rdf:dirLangString + as their datatype are given special treatment. + The IRIs rdf:langString and rdf:dirLangString + are classified as a datatype IRIs and interpreted to denote a datatype, + even though no L2V mapping is defined for them. + The value space of rdf:langString + is the set of all pairs of a string with a language tag. + The value space of rdf:dirLangString + is the set of all + 3-tuples of a string, a language tag, and a base direction. + The semantics of literals with these as their datatype are given below. +

RDF allows any IRI to be used in a literal, even when it is not recognized as referring to a datatype. @@ -816,7 +825,10 @@

D-interpretations

If rdf:langString is in D, then for every language-tagged string E with lexical form sss and language tag ttt, IL(E)= < sss, ttt' >, where ttt' is ttt converted to lower case using US-ASCII rules - + If rdf:dirLangString is in D, + then for every directional language-tagged string E with lexical form sss, + language tag ttt, and base direction bbb, + IL(E)= < sss, ttt', bbb >, where ttt' is ttt converted to lower case using US-ASCII rules For every other IRI aaa in D, I(aaa) is the datatype identified by aaa, and for every literal "sss"^^aaa, IL("sss"^^aaa) = L2V(I(aaa))(sss) @@ -832,10 +844,12 @@

D-interpretations

literals with an unrecognized type IRI are not ill-typed and cannot give rise to a D-unsatisfiable graph.

-

The special datatype rdf:langString - has no ill-typed literals. - Any syntactically legal literal with this type will denote a value in every - D-interpretation where D includes rdf:langString. +

The special datatypes + rdf:langString and + rdf:dirLangString + have no ill-typed literals. + Any syntactically legal literal with one of these types will denote a value in every + D-interpretation where D includes rdf:langString or rdf:dirLangString. The only ill-typed literals of type xsd:string are those containing a Unicode code point which does not match the Char production in [[XML11]]. @@ -845,7 +859,6 @@

D-interpretations

ill-typed literals were required to denote a value in IR, and D-unsatisfiability could be recognized only by using the RDFS semantics.

-