A datatype IRI, being an IRI
identifying a datatype that determines how the lexical form maps
- to a literal value
-
if and only if the datatype IRI is
- http://www.w3.org/1999/02/22-rdf-syntax-ns#langString, a
+ to a literal value.
+
If and only if the datatype IRI is
+ http://www.w3.org/1999/02/22-rdf-syntax-ns#langString or
+ http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString, a
non-empty language tag as defined by [[!BCP47]]. The
language tag MUST be well-formed according to
section 2.2.9
of [[!BCP47]],
and MUST be treated consistently, that is, in a case insensitive manner.
- Two language tags are the same if they only differ by case.
-
if and only if the datatype IRI is
+ Two [[!BCP47]]-complying strings that differ only by case represent the same [=language tag=].
+
If and only if the datatype IRI is
http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString,
- a non-empty language tag
- that MUST be well-formed according to section 2.2.9
- of [[!BCP47]],
- and MUST be treated consistently, that is, in a case insensitive manner,
- and a base direction that MUST be either `ltr` or `rtl`.
+ a base direction that MUST be either
+
`ltr`, indicating that the initial text direction is set to left-to-right, or
+
`rtl`, indicating that the initial text direction is set to right-to-left.
+
A literal is a language-tagged string if the third element
is present and the fourth element is not present.
- Lexical representations of language tags MAY be case normalized,
- (for example, by canonicalizing as defined by
- BCP 47 section 4.5).
-
-
-
A literal is a directional language-tagged string
+ A literal is a directional language-tagged string
if both the third element and fourth elements are present.
- The third element, the language tag, is treated identically as in a language-tagged string,
- and the fourth element, base direction, MUST be either `ltr` or `rtl`, which MUST be in lower case.
`ltr`: indicates that the initial text direction is set to left-to-right.
-
`rtl`: indicates that the initial text direction is set to right-to-left.
-
-
-
Please note that concrete syntaxes MAY support
- simple literals consisting of only a
- lexical form without any datatype IRI, language tag, or base direction.
- Simple literals are syntactic sugar for abstract syntax
- literals
- with the datatype IRI
- http://www.w3.org/2001/XMLSchema#string
- (which is commonly abbreviated as xsd:string).
- Similarly, most concrete syntaxes represent
- language-tagged strings and directional language-tagged strings without
- the datatype IRI because it always equals either
- http://www.w3.org/1999/02/22-rdf-syntax-ns#langString (rdf:langString)
- or http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString (rdf:dirLangString), respectively.
otherwise, the literal is ill-typed and no literal value can be
- associated with the literal. Such a case produces a semantic
- inconsistency but is not syntactically ill-formed.
- Implementations SHOULD accept [=ill-typed=] literals and produce RDF
- graphs from them. Implementations MAY produce warnings when
- encountering [=ill-typed=] literals.
-
-
-
If the literal's datatype IRI is not
- handled by an RDF implementation, then the literal value is
- not defined by this specification. Implementations SHOULD accept
- literals with unknown datatype IRIs and produce RDF graphs from them.
-
-
+
Literal term equality:
- Two literals are term-equal (the same RDF literal)
+ two literals are term-equal (the same RDF term)
if and only if:
the two language tags are either both absent, or both present and compare equal,
+
the two base directions are either both absent, both `ltr`, or both `rtl`.
-
Comparison is performed using
+
Comparison of the [=lexical forms=] and of the [=datatype IRIs=] is performed using
case sensitive matching
- (see description of string comparison in
- )
- except for language tags, where the comparison is performed using
+ (see description of string comparison in
+ ).
+ Comparison of the [=language tags=] is performed using
ASCII case-insensitive matching.
- Thus, two literals can have the same value
- without being the same RDF term.
- For example:
Some concrete syntaxes MAY support
+ simple literals consisting of only a
+ lexical form without any datatype IRI, language tag, or base direction.
+ Simple literals are syntactic sugar for abstract syntax
+ literals
+ with the datatype IRI
+ http://www.w3.org/2001/XMLSchema#string
+ (which is commonly abbreviated as xsd:string).
+
+
+
+ Similarly, most concrete syntaxes represent
+ language-tagged strings and directional language-tagged strings without
+ the datatype IRI because it always equals either
+ http://www.w3.org/1999/02/22-rdf-syntax-ns#langString (rdf:langString)
+ or http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString (rdf:dirLangString), respectively.
+
+
+
+ Any [=string=] complying with [[!BCP47]] MAY be used to represent a [=language tag=] in concrete syntaxes or implementation.
+ Such strings MAY be case normalized,
+ (for example, by canonicalizing as defined by
+ BCP 47 section 4.5).
+ On the contrary, an implementation MAY preserve the case from the original representation,
+ provided that it processes it in a case-insensitive manner.
+
+
+
+
+
+
+
+
Literal value
+
+
The literal value associated with a literal is defined as follow.
otherwise, the literal is ill-typed and no literal value can be
+ associated with the literal. Such a case produces a semantic
+ inconsistency but is not syntactically ill-formed.
+ Implementations SHOULD accept [=ill-typed=] literals and produce RDF
+ graphs from them. Implementations MAY produce warnings when
+ encountering [=ill-typed=] literals.
+
+
+
If the literal's datatype IRI is not
+ handled by an RDF implementation, then the literal value is
+ not defined by this specification. Implementations SHOULD accept
+ literals with unknown datatype IRIs and produce RDF graphs from them.
+
+
+
+
+ Thus, two literals can have the same value
+ without being the same RDF term.
+ For example:
Similarly, most concrete syntaxes represent
language-tagged strings and directional language-tagged strings without
- the datatype IRI because it always equals either
+ the datatype IRI because it is always either
http://www.w3.org/1999/02/22-rdf-syntax-ns#langString (rdf:langString)
or http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString (rdf:dirLangString), respectively.
- Any [=string=] complying with [[!BCP47]] MAY be used to represent a [=language tag=] in concrete syntaxes or implementation.
- Such strings MAY be case normalized,
+ Any [=string=] complying with [[!BCP47]] MAY be used to represent a [=language tag=] in concrete syntaxes or implementations.
+ Such strings MAY be case normalized
(for example, by canonicalizing as defined by
BCP 47 section 4.5).
- On the contrary, an implementation MAY preserve the case from the original representation,
+ Alternatively, an implementation MAY preserve the case from the original representation,
provided that it processes it in a case-insensitive manner.
@@ -822,7 +822,7 @@
Representation of literals
Literal value
-
The literal value associated with a literal is defined as follow.
+
The literal value associated with a literal is defined as follows.
If the literal is a language-tagged string,
From 74f4ead9e6c50e4c63623bda5f174738d90b5b6f Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Champin
Date: Fri, 28 Feb 2025 01:16:56 +0100
Subject: [PATCH 3/5] Update spec/index.html
---
spec/index.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/spec/index.html b/spec/index.html
index 38ba6fd..c179cdb 100644
--- a/spec/index.html
+++ b/spec/index.html
@@ -813,8 +813,9 @@