Skip to content

Commit 358399e

Browse files
committed
adds definitions of 'blank node equality', 'triple term equality', 'RDF term equality', and 'triple equality'
1 parent b8b739d commit 358399e

File tree

1 file changed

+39
-10
lines changed

1 file changed

+39
-10
lines changed

spec/index.html

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,16 @@ <h3>Triples</h3>
577577

578578
<p>The three components (|s|, |p|, |o|) of an [=RDF triple=] are respectively called the <dfn class=export >subject</dfn>, <dfn class=export >predicate</dfn> and <dfn class=export >object</dfn> of the triple.</p>
579579

580+
<p><dfn>Triple equality</dfn>:
581+
Two triples (|s|, |p|, |o|) and (<var>s'</var>, <var>p'</var>, <var>o'</var>)
582+
are considered equal if and only if all of the following three conditions holds.</p>
583+
584+
<ul>
585+
<li>|s| and <var>s'</var> are [=RDF term equality|equal=].</li>
586+
<li>|p| and <var>p'</var> are [=RDF term equality|equal=].</li>
587+
<li>|o| and <var>o'</var> are [=RDF term equality|equal=].</li>
588+
</ul>
589+
580590

581591
<p class="note">The definition of <a>triple</a> is recursive.
582592
That is, a <a>triple</a> can itself have an
@@ -599,6 +609,17 @@ <h3>RDF Terms</h3>
599609
nor to a blank node with the <a>blank node identifier</a>
600610
<code>http://example.org/</code>.</p>
601611

612+
<p><dfn>RDF term equality</dfn>:
613+
Two [=RDF terms=] |t| and <var>t'</var> are considered equal if and only if
614+
one of the following four conditions holds:</p>
615+
616+
<ul>
617+
<li>|t| and <var>t'</var> are [=IRIs=] that are [=IRI equality|equal=].</li>
618+
<li>|t| and <var>t'</var> are [=literals=] that are [=literal term equality|equal=].</li>
619+
<li>|t| and <var>t'</var> are [=blank nodes=] that are [=blank node equality|equal=].</li>
620+
<li>|t| and <var>t'</var> are [=triple terms=] that are [=triple term equality|equal=].</li>
621+
</ul>
622+
602623
<p>The set of <span id="dfn-nodes"><!-- obsolete term--></span><dfn data-lt="node">nodes</dfn> of an <a>RDF graph</a>
603624
is the set of <a>subjects</a> and <a>objects</a> of the <a>asserted triples</a> of the graph.
604625
It is possible for a [=predicate=] [=IRI=] to also occur as a [=node=] in
@@ -848,6 +869,9 @@ <h3>Blank Nodes</h3>
848869
the set of possible blank nodes is arbitrary. RDF makes no reference to
849870
any internal structure of blank nodes.</p>
850871

872+
<p><dfn>Blank node equality</dfn>:
873+
Two blank nodes are considered equal if and only if they are the same blank node.</p>
874+
851875
<div class="note" id="note-bnode-id">
852876
<p><span id="dfn-blank-node-identifiers"><!-- obsolete term--></span><dfn data-lt="blank node identifier">Blank node identifiers</dfn>
853877
are local identifiers that are used in some
@@ -877,7 +901,7 @@ <h3>Blank Nodes</h3>
877901
<h3>Triple Terms</h3>
878902

879903
<p>An [=RDF triple=] used as the [=object=] of another [=triple=] is called a <dfn class=export >triple term</dfn>.
880-
In a given [=RDF graph=], a [=triple=] can appear as a [=triple term=], an [=asserted triple=], or both.
904+
In a given [=RDF graph=], a [=triple=] can appear as a [=triple term=], as an [=asserted triple=], or both.
881905
</p>
882906

883907
<p>The set of [=RDF terms=] <dfn class=export data-lt="appear">appearing</dfn> in an [=RDF triple=] |t| is defined inductively as follows:</p>
@@ -889,6 +913,9 @@ <h3>Triple Terms</h3>
889913

890914
<p>By extension, an [=RDF term=] is said to [=appear=] in an [=RDF graph=] if it appears in an [=asserted triple=] of that graph. An [=RDF triple=] is said to [=appear=] in an [=RDF graph=] if it is either an [=asserted triple=] of that graph or a [=triple term=] [=appearing=] in that graph.</p>
891915

916+
<p><dfn>Triple term equality</dfn>:
917+
Since triple terms are [=triples=], equality of triple terms is the same as [=triple equality=].</p>
918+
892919
<p class="note">Every <a>triple</a> with a <a>triple term</a> as its [=object=] SHOULD
893920
use <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies</code> (<code>rdf:reifies</code>)
894921
as its <a>predicate</a>.
@@ -913,9 +940,9 @@ <h3>Graph Comparison</h3>
913940
<ul>
914941
<li>|M| is bijective.</li>
915942
<li>For every [=blank node=] |b|, |M|(|b|) is a [=blank node=] (but not necessarily the same as |b|).</li>
916-
<li>For every [=literal=] |lit|, |M|(|lit|) = |lit|.</li>
917-
<li>For every [=IRI=] |iri|, |M|(|iri|) = |iri|.</li>
918-
<li>For every [=triple term=] |tt| of the form (|s|, |p|, |o|), |M|(|tt|) is the triple term ( |M|(|s|), |M|(|p|), |M|(|o|) ).</li>
943+
<li>For every [=literal=] |lit|, |M|(|lit|) is a [=literal=] that is [=literal term equality|equal=] to |lit|.</li>
944+
<li>For every [=IRI=] |iri|, |M|(|iri|) is an [=IRI=] that is [=IRI equality|equal=] to |iri|.</li>
945+
<li>For every [=triple term=] |tt|, |M|(|tt|) is a [=triple term=] that is [=triple term equality|equal=] to |tt|.</li>
919946
</ul>
920947

921948
<p id="section-graph-equality">Two [=RDF graphs=] |G| and <var>G'</var> are
@@ -925,8 +952,6 @@ <h3>Graph Comparison</h3>
925952
the triple (|s|, |p|, |o|) is in |G| if and only if
926953
the triple ( |M|(|s|), |M|(|p|), |M|(|o|) ) is in <var>G'</var>.</p>
927954

928-
<p>See also: <a>IRI equality</a>, <a>literal term equality</a>.</p>
929-
930955
<p>With this definition, <var>M</var> shows how each blank node
931956
in <var>G</var> can be replaced with
932957
a new blank node to give <var>G'</var>. Graph isomorphism
@@ -1064,9 +1089,12 @@ <h3>RDF Dataset Comparison</h3>
10641089
the triple ( |M|(|s|), |M|(|p|), |M|(|o|) ) is in |DG2|.</li>
10651090
<li>The [=named graph=] (|n|, |G|) is in |NG1| if and only if
10661091
there is a [=named graph=] (<var>n'</var>, <var>G'</var>) in |NG2| such that
1067-
|M|(|n|) = <var>n'</var> and
1068-
the triple (|s|, |p|, |o|) is in |G| if and only if
1069-
the triple ( |M|(|s|), |M|(|p|), |M|(|o|) ) is in <var>G'</var>.</li>
1092+
<ul>
1093+
<li>|M|(|n|) is [=RDF term equality|equal=] to <var>n'</var> and</li>
1094+
<li>the triple (|s|, |p|, |o|) is in |G| if and only if
1095+
the triple ( |M|(|s|), |M|(|p|), |M|(|o|) ) is in <var>G'</var>.</li>
1096+
</ul>
1097+
</li>
10701098
</ul>
10711099

10721100
</section>
@@ -1989,11 +2017,12 @@ <h2>Changes between RDF 1.1 and RDF 1.2</h2>
19892017
Implementations can either follow the advice to normalize to lower case,
19902018
use the recommended BCP47 format,
19912019
or do something else, as long it is performed consistently.</li>
2020+
<li>Added explicit definitions of [=blank node equality=], [=RDF term equality=], and [=triple equality=].</li>
19922021
<li>Removed the section on the canonical mapping for the <a>rdf:XMLLiteral</a> datatype.</li>
19932022
<li>Refer to the definition and discussion of
19942023
<a data-cite="RDF12-SEMANTICS#dfn-recognize">RDF Semantics, "recognizing"</a>
19952024
datatype IRIs, instead of <em>Recognized datatype IRIs</em>.</li>
1996-
<li>The informal terminolgy "RDF processor" has been removed.</li>
2025+
<li>The informal terminology "RDF processor" has been removed.</li>
19972026
</ul>
19982027

19992028
<p class="note">A detailed overview of the differences between RDF versions&nbsp;1.1

0 commit comments

Comments
 (0)