Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case normalization of language tags. #74

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,9 @@ <h2>Literals</h2>
non-empty <dfn>language tag</dfn> as defined by [[!BCP47]]. The
language tag MUST be well-formed according to
<a data-cite="bcp47#section-2.2.9">section 2.2.9</a>
of [[!BCP47]].</li>
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.</li>
<li>if and only if the <a>datatype IRI</a> is
<code>http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString</code>,
a non-empty <a>language tag</a>
Expand All @@ -729,9 +731,10 @@ <h2>Literals</h2>

<p>A literal is a <dfn>language-tagged string</dfn> if the third element
is present and the fourth element is not present.
Lexical representations of language tags MAY be converted
to lower case.
The value of language tags is always treated as being in lower case.</p>
Lexical representations of language tags
MUST be case normalized
and MAY (preferably) be converted to lower case.
gkellogg marked this conversation as resolved.
Show resolved Hide resolved
gkellogg marked this conversation as resolved.
Show resolved Hide resolved
</p>

<p>A literal is a <dfn id="dfn-dir-lang-string">directional language-tagged string</dfn>
if both the third element and fourth elements are present.
Expand Down Expand Up @@ -1813,6 +1816,16 @@ <h2>Changes between RDF 1.1 and RDF 1.2</h2>
<li>Minor edit
to improve the example about distinguishing literals, IRIs, and blank nodes
in <a href="#section-triples" class="sectionRef"></a>.</li>
<li>Implementations were previously allowed to normalize language tags to lower case,
which made it ambiguous if two literals with language tags different only by case represented the same literal,
gkellogg marked this conversation as resolved.
Show resolved Hide resolved
or distinct literals.
RDF 1.2 requires that language tags must be unique to within case-senstivity
gkellogg marked this conversation as resolved.
Show resolved Hide resolved
but does not specify the common formatting to be used.
Two literals that with the same lexical form and language tags different only by case
gkellogg marked this conversation as resolved.
Show resolved Hide resolved
are the same literal.
Implementations can either follow the advice to normalize to lower case,
use the recommended BCP47 format,
or something else, as long it is performed consistently.</li>
gkellogg marked this conversation as resolved.
Show resolved Hide resolved
</ul>

<p class="note">A detailed overview of the differences between RDF versions&nbsp;1.0
Expand Down
Loading