From 358399e2b25a3d21894ab0182bc944e5b9cc9ab9 Mon Sep 17 00:00:00 2001 From: Olaf Hartig Date: Tue, 25 Feb 2025 09:40:42 +0100 Subject: [PATCH 1/8] adds definitions of 'blank node equality', 'triple term equality', 'RDF term equality', and 'triple equality' --- spec/index.html | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/spec/index.html b/spec/index.html index 9b380fa..68d16fd 100644 --- a/spec/index.html +++ b/spec/index.html @@ -577,6 +577,16 @@

Triples

The three components (|s|, |p|, |o|) of an [=RDF triple=] are respectively called the subject, predicate and object of the triple.

+

Triple equality: + Two triples (|s|, |p|, |o|) and (s', p', o') + are considered equal if and only if all of the following three conditions holds.

+ + +

The definition of triple is recursive. That is, a triple can itself have an @@ -599,6 +609,17 @@

RDF Terms

nor to a blank node with the blank node identifier http://example.org/.

+

RDF term equality: + Two [=RDF terms=] |t| and t' are considered equal if and only if + one of the following four conditions holds:

+ + +

The set of nodes of an RDF graph is the set of subjects and objects of the asserted triples of the graph. It is possible for a [=predicate=] [=IRI=] to also occur as a [=node=] in @@ -848,6 +869,9 @@

Blank Nodes

the set of possible blank nodes is arbitrary. RDF makes no reference to any internal structure of blank nodes.

+

Blank node equality: + Two blank nodes are considered equal if and only if they are the same blank node.

+

Blank node identifiers are local identifiers that are used in some @@ -877,7 +901,7 @@

Blank Nodes

Triple Terms

An [=RDF triple=] used as the [=object=] of another [=triple=] is called a triple term. - In a given [=RDF graph=], a [=triple=] can appear as a [=triple term=], an [=asserted triple=], or both. + In a given [=RDF graph=], a [=triple=] can appear as a [=triple term=], as an [=asserted triple=], or both.

The set of [=RDF terms=] appearing in an [=RDF triple=] |t| is defined inductively as follows:

@@ -889,6 +913,9 @@

Triple Terms

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.

+

Triple term equality: + Since triple terms are [=triples=], equality of triple terms is the same as [=triple equality=].

+

Every triple with a triple term as its [=object=] SHOULD use http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies (rdf:reifies) as its predicate. @@ -913,9 +940,9 @@

Graph Comparison

Two [=RDF graphs=] |G| and G' are @@ -925,8 +952,6 @@

Graph Comparison

the triple (|s|, |p|, |o|) is in |G| if and only if the triple ( |M|(|s|), |M|(|p|), |M|(|o|) ) is in G'.

-

See also: IRI equality, literal term equality.

-

With this definition, M shows how each blank node in G can be replaced with a new blank node to give G'. Graph isomorphism @@ -1064,9 +1089,12 @@

RDF Dataset Comparison

the triple ( |M|(|s|), |M|(|p|), |M|(|o|) ) is in |DG2|.
  • The [=named graph=] (|n|, |G|) is in |NG1| if and only if there is a [=named graph=] (n', G') in |NG2| such that - |M|(|n|) = n' and - the triple (|s|, |p|, |o|) is in |G| if and only if - the triple ( |M|(|s|), |M|(|p|), |M|(|o|) ) is in G'.
  • + + @@ -1989,11 +2017,12 @@

    Changes between RDF 1.1 and RDF 1.2

    Implementations can either follow the advice to normalize to lower case, use the recommended BCP47 format, or do something else, as long it is performed consistently. +
  • Added explicit definitions of [=blank node equality=], [=RDF term equality=], and [=triple equality=].
  • Removed the section on the canonical mapping for the rdf:XMLLiteral datatype.
  • Refer to the definition and discussion of RDF Semantics, "recognizing" datatype IRIs, instead of Recognized datatype IRIs.
  • -
  • The informal terminolgy "RDF processor" has been removed.
  • +
  • The informal terminology "RDF processor" has been removed.
  • A detailed overview of the differences between RDF versions 1.1 From 1ec180786ad1f5c46519d9fa1b8cdc988fb5941c Mon Sep 17 00:00:00 2001 From: Olaf Hartig Date: Tue, 25 Feb 2025 15:42:34 +0100 Subject: [PATCH 2/8] revert incorrect change in definition of 'isomorphic RDF-term mapping' Co-authored-by: Pierre-Antoine Champin --- spec/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/index.html b/spec/index.html index 68d16fd..115c873 100644 --- a/spec/index.html +++ b/spec/index.html @@ -942,7 +942,7 @@

    Graph Comparison

  • For every [=blank node=] |b|, |M|(|b|) is a [=blank node=] (but not necessarily the same as |b|).
  • For every [=literal=] |lit|, |M|(|lit|) is a [=literal=] that is [=literal term equality|equal=] to |lit|.
  • For every [=IRI=] |iri|, |M|(|iri|) is an [=IRI=] that is [=IRI equality|equal=] to |iri|.
  • -
  • For every [=triple term=] |tt|, |M|(|tt|) is a [=triple term=] that is [=triple term equality|equal=] to |tt|.
  • +
  • For every [=triple term=] |tt| of the form (|s|, |p|, |o|), |M|(|tt|) is the triple term ( |M|(|s|), |M|(|p|), |M|(|o|) ).
  • Two [=RDF graphs=] |G| and G' are From 96c4ef2bd0a58f375b2666a5fd78e3538e8a9de5 Mon Sep 17 00:00:00 2001 From: Olaf Hartig Date: Tue, 25 Feb 2025 17:29:20 +0100 Subject: [PATCH 3/8] Apply suggestions from code review Co-authored-by: Pierre-Antoine Champin --- spec/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/index.html b/spec/index.html index 115c873..a67f384 100644 --- a/spec/index.html +++ b/spec/index.html @@ -614,10 +614,10 @@

    RDF Terms

    one of the following four conditions holds:

    The set of nodes of an RDF graph @@ -913,9 +913,9 @@

    Triple Terms

    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.

    -

    Triple term equality: +

    Triple term equality: Since triple terms are [=triples=], equality of triple terms is the same as [=triple equality=].

    - +

    Every triple with a triple term as its [=object=] SHOULD use http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies (rdf:reifies) as its predicate. From c8a7545e682d2b937331ea68b66ab2d2112d510a Mon Sep 17 00:00:00 2001 From: Olaf Hartig Date: Tue, 25 Feb 2025 21:09:34 +0100 Subject: [PATCH 4/8] Apply suggestions from code review Co-authored-by: Ted Thibodeau Jr --- spec/index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/index.html b/spec/index.html index a67f384..170f8f5 100644 --- a/spec/index.html +++ b/spec/index.html @@ -579,7 +579,7 @@

    Triples

    Triple equality: Two triples (|s|, |p|, |o|) and (s', p', o') - are considered equal if and only if all of the following three conditions holds.

    + are considered equal if and only if all of the following three conditions hold.