Skip to content

Commit 6cf8ab8

Browse files
committed
Recognize rdf:dirLangString
1 parent a9d9890 commit 6cf8ab8

File tree

1 file changed

+55
-29
lines changed

1 file changed

+55
-29
lines changed

spec/index.html

+55-29
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@ <h2>Simple Interpretations</h2>
418418
Usage has shown that it is important that every literal have a type.
419419
RDF 1.1 replaces plain literals without language tags by literals typed with
420420
the XML Schema <code>string</code> datatype,
421-
and introduces the special type <a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>
421+
and introduces the special type
422+
<a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>
422423
for language-tagged strings.
423424
The full semantics for typed literals is given in the next section.</p>
424425
</div>
@@ -751,13 +752,14 @@ <h2>Literals and datatypes</h2>
751752

752753
<p>RDF literals and datatypes are fully described in
753754
<a data-cite="RDF12-CONCEPTS#section-Datatypes">Section 5</a> of [[!RDF12-CONCEPTS]].
754-
In summary: with one exception, RDF literals combine a string and an IRI <a data-lt="identify">identifing</a> a datatype.
755-
The exception is <a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string">language-tagged strings</a>,
756-
which have two syntactic components, a string and a language tag,
757-
and are assigned the type <code>rdf:langString</code>.
758-
A datatype is understood to define a partial mapping,
759-
called the
760-
<span id="dfn-lexical-to-value-mapping"><!-- refer to RDF Concepts term --></span>
755+
In summary: with two exceptions, RDF literals combine a string and an IRI <a data-lt="identify">identifing</a> a datatype.
756+
The exceptions are <a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string">language-tagged strings</a>, assigned the type <code>rdf:langString</code>,
757+
which have two syntactic components, a string and a language tag; and
758+
<a data-cite="RDF12-CONCEPTS#dfn-directional-language-tagged string">directional language-tagged string</a>,
759+
assigned the type <code>rdf:dirLangString</code>,
760+
which have three syntactic components, a string, a language tag, and a base direction.
761+
A datatype is understood to define a partial mapping, called the
762+
<span id="dfn-lexical-to-value-mapping"></span>
761763
<dfn data-cite="RDF12-CONCEPTS#dfn-lexical-to-value-mapping">lexical-to-value mapping</dfn>,
762764
from a lexical space (a set of character strings) to values.
763765
The function <dfn>L2V</dfn> maps datatypes to their lexical-to-value mapping.
@@ -774,18 +776,26 @@ <h2>Literals and datatypes</h2>
774776
for that datatype.</p>
775777

776778
<p>RDF processors are not required to <a>recognize</a> any datatype IRIs other than
777-
<a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>
778-
and <a data-cite="XMLSCHEMA11-2#string"><code>xsd:string</code></a>,
779+
<a data-cite="XMLSCHEMA11-2#string"><code>xsd:string</code></a>,
780+
<a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>, and
781+
<a data-cite="RDF12-CONCEPTS#dfn-dir-lang-string"><code>rdf:dirLangString</code></a>
779782
but when IRIs listed in
780783
<a data-cite="RDF12-CONCEPTS#section-Datatypes">Section 5</a> of [[!RDF12-CONCEPTS]]
781784
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>
782785

783786
<p>Literals with <a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>
784-
as their datatype are an exceptional case which are given a special treatment.
785-
The IRI <code>rdf:langString</code> is classified as a datatype IRI,
786-
and interpreted to denote a datatype, even though no <a>L2V</a> mapping is defined for it.
787-
The <a>value space</a> of <code>rdf:langString</code> is the set of all pairs of a string with a language tag.
788-
The semantics of literals with this as their type are given below.</p>
787+
or <a data-cite="RDF12-CONCEPTS#dfn-directional-language-tagged-string"><code>rdf:dirLangString</code></a>
788+
as their datatype IRI are given special treatment.
789+
The IRIs <code>rdf:langString</code> and <code>rdf:dirLangString</code>
790+
are classified as datatype IRIs and interpreted to denote a datatype,
791+
even though no <a>L2V</a> mapping is defined for them.
792+
The <a>value space</a> of <code>rdf:langString</code>
793+
is the set of all pairs of a string with a language tag.
794+
The <a>value space</a> of <code>rdf:dirLangString</code>
795+
is the set of all
796+
3-tuples of a string, a language tag, and a base direction.
797+
The semantics of literals with these as their datatype are given below.
798+
</p>
789799

790800
<p>RDF allows any IRI to be used in a literal,
791801
even when it is not <a>recognized</a> as referring to a datatype.
@@ -816,7 +826,10 @@ <h2>D-interpretations</h2>
816826
<tr><td class="semantictable">If <code>rdf:langString</code> is in D,
817827
then for every language-tagged string E with lexical form sss and language tag ttt,
818828
IL(E)= &lt; sss, ttt' &gt;, where ttt' is ttt converted to lower case using US-ASCII rules</td></tr>
819-
829+
<tr><td class="semantictable">If <code>rdf:dirLangString</code> is in D,
830+
then for every directional language-tagged string E with lexical form sss,
831+
language tag ttt, and base direction bbb,
832+
IL(E)= &lt; sss, ttt', bbb &gt;, where ttt' is ttt converted to lower case using US-ASCII rules</td></tr>
820833
<tr><td class="semantictable">For every other IRI aaa in D,
821834
I(aaa) is the datatype identified by aaa, and for every literal
822835
"sss"^^aaa, IL("sss"^^aaa) = L2V(I(aaa))(sss)</td></tr>
@@ -832,10 +845,12 @@ <h2>D-interpretations</h2>
832845
literals with an unrecognized type IRI are not <a>ill-typed</a> and cannot give rise to
833846
a <a>D-unsatisfiable</a> graph.</p>
834847

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

848-
849863
</section>
850864

851865
<section id="D_entailment">
@@ -932,14 +946,14 @@ <h2>RDF Interpretations</h2>
932946
<tr>
933947
<td ><code>rdf:type rdf:subject rdf:predicate rdf:object
934948
rdf:first rdf:rest rdf:value rdf:nil
935-
rdf:List rdf:langString rdf:Property rdf:_1 rdf:_2
949+
rdf:List rdf:langString rdf:dirLangString rdf:Property rdf:_1 rdf:_2
936950
...</code></td>
937951
</tr>
938952
</tbody>
939953
</table>
940954

941955
<p>An <dfn>RDF interpretation</dfn> <strong>recognizing D</strong> is a <a>D-interpretation</a> I
942-
where D includes <code>rdf:langString</code> and <code>xsd:string</code>, and which satisfies:</p>
956+
where D includes <code>rdf:langString</code>, <code>rdf:dirLangString</code> and <code>xsd:string</code>, and which satisfies:</p>
943957

944958
<table>
945959
<caption>RDF semantic conditions.</caption>
@@ -977,20 +991,25 @@ <h2>RDF Interpretations</h2>
977991
<p>RDF imposes no particular normative meanings on the rest of the RDF vocabulary.
978992
<a href="#whatnot">Appendix D</a> describes the intended uses of some of this vocabulary.</p>
979993

980-
<p>The datatype IRIs <a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>
994+
<p>The datatype IRIs
995+
<a data-cite="RDF12-CONCEPTS#dfn-language-tagged-string"><code>rdf:langString</code></a>,
996+
<a data-cite="RDF12-CONCEPTS#dfn-directional-language-tagged string"><code>rdf:dirLangString</code>,
981997
and <a data-cite="XMLSCHEMA11-2#string"><code>xsd:string</code></a>
982998
MUST be <a>recognized</a> by all RDF interpretations.</p>
983999

984-
<p>Two other datatypes <a data-cite="RDF12-CONCEPTS#section-XMLLiteral"><code>rdf:XMLLiteral</code></a>
985-
and <a data-cite="RDF12-CONCEPTS#section-html"><code>rdf:HTML</code></a> are defined in [[!RDF12-CONCEPTS]].
1000+
<p>Three other datatypes, <a data-cite="RDF12-CONCEPTS#section-XMLLiteral"><code>rdf:XMLLiteral</code></a>,
1001+
<a data-cite="RDF12-CONCEPTS#section-html"><code>rdf:HTML</code></a> and
1002+
<a data-cite="RDF12-CONCEPTS#section-json"><code>rdf:JSON</code></a>,
1003+
are defined in [[!RDF12-CONCEPTS]].
9861004
RDF-D interpretations MAY fail to <a>recognize</a> these datatypes.</p>
9871005

9881006
<section id="rdf_entail">
9891007
<h3>RDF entailment</h3>
9901008

9911009
<p>S <dfn>RDF entail</dfn><strong>s</strong> E <strong>recognizing D</strong>
9921010
when every <a>RDF interpretation</a> recognizing D which <a>satisfies</a>
993-
S also satisfies E. When D is {<code>rdf:langString</code>, <code>xsd:string</code>}
1011+
S also satisfies E. When D is {<code>rdf:langString</code>,
1012+
<code>rdf:dirLangString</code>, <code>xsd:string</code>}
9941013
then we simply say S <strong>RDF entails</strong> E.
9951014
E is <dfn>RDF unsatisfiable</dfn><strong> (recognizing D)</strong>
9961015
when it has no satisfying <a>RDF interpretation</a> (recognizing D).</p>
@@ -1146,6 +1165,7 @@ <h2>RDFS Interpretations</h2>
11461165
<p>LV is defined to be ICEXT(I(<code>rdfs:Literal</code>))</p>
11471166
<p>ICEXT(I(<code>rdfs:Resource</code>)) = IR</p>
11481167
<p>ICEXT(I(<code>rdf:langString</code>)) is the set {I(E) : E a language-tagged string }</p>
1168+
<p>ICEXT(I(<code>rdf:dirLangString</code>)) is the set {I(E) : E a directional language-tagged string }</p>
11491169
<p>for every other IRI aaa in D, ICEXT(I(aaa)) is the <a>value space</a> of I(aaa)</p>
11501170
<p>for every IRI aaa in D, I(aaa) is in ICEXT(I(<code>rdfs:Datatype</code>))</p></td>
11511171
</tr>
@@ -1610,7 +1630,8 @@ <h2>Entailment rules (Informative)</h2>
16101630
<li>If no triples were added in step 2, add the RDF (and RDFS) axiomatic triples which contain <code>rdf:_1</code>.</li>
16111631
<li>For every IRI or literal <code>aaa</code> used in E, add <code>aaa rdf:type rdfs:Resource</code> to S.</li>
16121632
<li>Apply the rules <a>GrdfD1</a>, <a>rdfD1a</a>, and <a>rdfD2</a> (and the rules <a>rdfs1</a> through <a>rdfs13</a>),
1613-
with D={<code>rdf:langString</code>, <code>xsd:string</code>}, to the set in all possible ways, to exhaustion.</li>
1633+
with D={<code>rdf:langString</code>, <code>rdf:dirLangString</code>, <code>xsd:string</code>},
1634+
to the set in all possible ways, to exhaustion.</li>
16141635
</ol>
16151636

16161637
<p>Then we have the completeness result:</p>
@@ -2063,7 +2084,12 @@ <h2>Acknowledgments</h2>
20632084
<h2>Substantive changes since RDF 1.1</h2>
20642085

20652086
<ul>
2066-
<li> RDF entailment rule <a>rdfD1a</a> was added in RDF 1.2. This rule should have been included in RDF 1.1 when the two built-in datatypes (<code>xsd:string</code> and <code>rdf:langString</code>) were added to RDF entailment. </li>
2087+
<li> RDF entailment rule <a>rdfD1a</a> was added in RDF 1.2.
2088+
This rule should have been included in RDF 1.1 when the two built-in
2089+
datatypes (<code>xsd:string</code> and <code>rdf:langString</code>)
2090+
were added to RDF entailment.
2091+
</li>
2092+
<li><code>rdf:dirLangString</code> added to the built-in datatypes.</li>
20672093
</ul>
20682094
</section>
20692095

0 commit comments

Comments
 (0)