Skip to content

Commit

Permalink
Recognize rdf:dirLangString
Browse files Browse the repository at this point in the history
  • Loading branch information
afs committed Dec 21, 2024
1 parent a9d9890 commit 02c10e6
Showing 1 changed file with 32 additions and 19 deletions.
51 changes: 32 additions & 19 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -751,12 +751,13 @@ <h2>Literals and datatypes</h2>

<p>RDF literals and datatypes are fully described in
<a data-cite="RDF12-CONCEPTS#section-Datatypes">Section 5</a> of [[!RDF12-CONCEPTS]].
In summary: with one exception, RDF literals combine a string and an IRI <a data-lt="identify">identifing</a> a datatype.
The exception is <a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string">language-tagged strings</a>,
which have two syntactic components, a string and a language tag,
and are assigned the type <code>rdf:langString</code>.
A datatype is understood to define a partial mapping,
called the
In summary: with two exceptions, RDF literals combine a string and an IRI <a data-lt="identify">identifing</a> a datatype.
The exceptions are <a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string">language-tagged strings</a>, assigned the type <code>rdf:langString</code>,
which have two syntactic components, a string and a language tag, and
<a data-cite="RDF12-CONCEPTS#dfn-directional-language-tagged string">directional language-tagged string</a>,
assigned the type <code>rdf:dirLangString</code>,
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
<span id="dfn-lexical-to-value-mapping"><!-- refer to RDF Concepts term --></span>
<dfn data-cite="RDF12-CONCEPTS#dfn-lexical-to-value-mapping">lexical-to-value mapping</dfn>,
from a lexical space (a set of character strings) to values.
Expand All @@ -774,18 +775,26 @@ <h2>Literals and datatypes</h2>
for that datatype.</p>

<p>RDF processors are not required to <a>recognize</a> any datatype IRIs other than
<a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>
and <a data-cite="XMLSCHEMA11-2#string"><code>xsd:string</code></a>,
<a data-cite="XMLSCHEMA11-2#string"><code>xsd:string</code></a>,
<a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>, and
<a data-cite="RDF12-CONCEPTS#dfn-dir-lang-string"><code>rdf:dirLangString</code></a>
but when IRIs listed in
<a data-cite="RDF12-CONCEPTS#section-Datatypes">Section 5</a> of [[!RDF12-CONCEPTS]]
are <a>recognized</a>, they MUST be interpreted as described there, and when the IRI <code>rdf:PlainLiteral</code> is <a>recognized</a>, 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 <a>recognized</a>, the mapping between the datatype IRI and the datatype it <a>denotes</a> 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 <a>datatype map</a> of this IRI.</p>

<p>Literals with <a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>
as their datatype are an exceptional case which are given a special treatment.
The IRI <code>rdf:langString</code> is classified as a datatype IRI,
and interpreted to denote a datatype, even though no <a>L2V</a> mapping is defined for it.
The <a>value space</a> of <code>rdf:langString</code> 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.</p>
or <a data-cite="RDF12-CONCEPTS#dfn-directional-language-tagged-string"><code>rdf:dirLangString</code></a>
as their datatype are given special treatment.
The IRIs <code>rdf:langString</code> and <code>rdf:dirLangString</code>
are classified as a datatype IRIs and interpreted to denote a datatype,
even though no <a>L2V</a> mapping is defined for them.
The <a>value space</a> of <code>rdf:langString</code>
is the set of all pairs of a string with a language tag.
The <a>value space</a> of <code>rdf:dirLangString</code>
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.
</p>

<p>RDF allows any IRI to be used in a literal,
even when it is not <a>recognized</a> as referring to a datatype.
Expand Down Expand Up @@ -816,7 +825,10 @@ <h2>D-interpretations</h2>
<tr><td class="semantictable">If <code>rdf:langString</code> is in D,
then for every language-tagged string E with lexical form sss and language tag ttt,
IL(E)= &lt; sss, ttt' &gt;, where ttt' is ttt converted to lower case using US-ASCII rules</td></tr>

<tr><td class="semantictable">If <code>rdf:dirLangString</code> is in D,
then for every directional language-tagged string E with lexical form sss,
language tag ttt, and base direction bbb,
IL(E)= &lt; sss, ttt', bbb &gt;, where ttt' is ttt converted to lower case using US-ASCII rules</td></tr>
<tr><td class="semantictable">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)</td></tr>
Expand All @@ -832,10 +844,12 @@ <h2>D-interpretations</h2>
literals with an unrecognized type IRI are not <a>ill-typed</a> and cannot give rise to
a <a>D-unsatisfiable</a> graph.</p>

<p>The special datatype <a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>
has no <a>ill-typed</a> literals.
Any syntactically legal literal with this type will denote a value in every
D-interpretation where D includes <code>rdf:langString</code>.
<p>The special datatypes
<a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a> and
<a data-cite="RDF12-CONCEPTS#dfn-directional-language-tagged-string"><code>rdf:dirLangString</code>
have no <a>ill-typed</a> literals.
Any syntactically legal literal with one of these types will denote a value in every
D-interpretation where D includes <code>rdf:langString</code> or <code>rdf:dirLangString</code>.
The only ill-typed literals of type <a data-cite="XMLSCHEMA11-2#string"><code>xsd:string</code></a>
are those containing a Unicode code point which does not match
the <a data-cite="XML11#NT-Char"><em>Char</em> production</a> in [[XML11]].
Expand All @@ -845,7 +859,6 @@ <h2>D-interpretations</h2>
ill-typed literals were required to denote a value in IR,
and <a>D-unsatisfiability</a> could be recognized only by using the RDFS semantics.</p>


</section>

<section id="D_entailment">
Expand Down

0 comments on commit 02c10e6

Please sign in to comment.