Skip to content

Commit

Permalink
GH-100: Literal equality and language tags
Browse files Browse the repository at this point in the history
  • Loading branch information
afs authored and gkellogg committed Oct 24, 2024
1 parent e642dbf commit 209dde6
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,9 @@ <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 case normalized,
(for example, by converting to lower case).
Lexical representations of language tags MAY be case normalized,
(for example, by canonicalizing as defined by
<a data-cite="bcp47#section-4.5">BCP 47 section 4.5</a>).
</p>

<p>A literal is a <dfn id="dfn-dir-lang-string">directional language-tagged string</dfn>
Expand Down Expand Up @@ -804,12 +804,19 @@ <h2>Literals</h2>

<p><dfn data-local-lt="term-equal">Literal term equality</dfn>:
Two literals are term-equal (the same <a>RDF literal</a>)
if and only if the two <a>lexical forms</a>,
the two <a>datatype IRIs</a>,
the two <a>language tags</a> (if any), and
the two <a>base directions</a> (if any) compare equal,
using <a data-cite="I18N-GLOSSARY#dfn-case-sensitive">case sensitive matching</a>
(see description of string comparison in <a href="#rdf-strings" class="sectionRef"></a>).
if and only if:
<ul>
<li>the two <a>lexical forms</a> compare equal</li>
<li>the two <a>datatype IRIs</a> compare equal</li>
<li>the two <a>language tags</a> (if any) compare equal</li>
<li>the two <a>base directions</a> (if any) compare equal</li>
</ul>
Comparison is performed using
<a data-cite="I18N-GLOSSARY#dfn-case-sensitive">case sensitive matching</a>
(see description of string comparison in
<a href="#rdf-strings" class="sectionRef"></a>)
except for language tags, where the comparison is performed using
<a data-cite="I18N-GLOSSARY#dfn-case-sensitive">ASCII case-insensitive matching</a>.
Thus, two literals can have the same value
without being the same <a>RDF term</a>.
For example:</p>
Expand Down

0 comments on commit 209dde6

Please sign in to comment.