From cbafd1506122563192bad176a135cf30c1d8bec8 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Fri, 10 Oct 2025 13:00:57 +0200 Subject: [PATCH 01/29] generated RDF triples dfn --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index f5c81dc..51bbd76 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -20,7 +20,7 @@ RDF syntaxes and RDF APIs generally represent [=blank nodes=] with [=blank node This subsection describes the normative process by which [=RDF triples=] are generated from a [=Triples Map=]. This process contributes [=RDF triples=] to the [=output dataset=]. Each generated triple MUST be placed into one or more graphs of the output dataset. -The generated RDF triples are determined by the following algorithm. [=RML Processors=] MAY employ alternative implementations to compute the generated [=RDF triples=], provided that the resulting output dataset is semantically equivalent to the one obtained by this algorithm. +The generated RDF triples are determined by the following algorithm. [=RML Processors=] MAY employ alternative implementations to compute the generated [=RDF triples=], provided that the resulting output dataset is semantically equivalent to the one obtained by this algorithm. Let: From a514906016677819850a3b194edef7b8133159f7 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Fri, 10 Oct 2025 13:19:22 +0200 Subject: [PATCH 02/29] generated RDF triples dfn --- spec/section/output.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/section/output.md b/spec/section/output.md index 51bbd76..6202b5b 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -17,10 +17,9 @@ RDF syntaxes and RDF APIs generally represent [=blank nodes=] with [=blank node ## The Generated RDF Triples of a Triples Map +This subsection describes the process of generating RDF triples from a [=Triples Map=]. This process contributes [=RDF triples=] to the [=output dataset=]. Each generated triple MUST be placed into one or more graphs of the output dataset. -This subsection describes the normative process by which [=RDF triples=] are generated from a [=Triples Map=]. This process contributes [=RDF triples=] to the [=output dataset=]. Each generated triple MUST be placed into one or more graphs of the output dataset. - -The generated RDF triples are determined by the following algorithm. [=RML Processors=] MAY employ alternative implementations to compute the generated [=RDF triples=], provided that the resulting output dataset is semantically equivalent to the one obtained by this algorithm. +The [=generated RDF triples=] are determined by the following algorithm. [=RML Processors=] MAY employ alternative implementations to compute the generated [=RDF triples=], provided that the resulting output dataset is semantically equivalent to the one obtained by this algorithm. Let: From 92ca9bd970a132d1ce2268a14bda73cd5fae1b0e Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 13 Oct 2025 12:52:10 +0200 Subject: [PATCH 03/29] using iteration and not record --- spec/section/output.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/spec/section/output.md b/spec/section/output.md index 6202b5b..9c6952f 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -25,14 +25,14 @@ The [=generated RDF triples=] are determined by the following algorithm. [=RML P Let: - **sm** be the [=subject map=] of the [=Triples Map=]. -- **records** be the set of logical records obtained by evaluating the [=logical source=] of the [=Triples Map=] using its declared [=reference formulation=]. +- **iterations** be the set of [=logical iterations=] obtained by evaluating the [=logical source=] of the [=Triples Map=] using its declared [=reference formulation=]. - **classes** be the set of class [=IRIs=] defined in **sm** (via `rml:class`). - **sgm** be the set of [=graph maps=] attached to **sm**. -For each logical record **record** in **records**, apply the following steps: +For each [=logical iteration=] **iteration** in **iterations**, apply the following steps: -1. Let [=subject=] be the [=RDF term=] resulting from applying **sm** to **record**. -2. Let **subject_graphs** be the set of [=RDF term=] resulting from applying each graph map in **sgm** to **record**. +1. Let [=subject=] be the [=RDF term=] resulting from applying **sm** to **iteration**. +2. Let **subject_graphs** be the set of [=RDF term=] resulting from applying each graph map in **sgm** to **iteration**. 3. For each class [=IRI=] in **classes**, add a triple to the [=output dataset=] as follows: | Component | Value | @@ -44,10 +44,10 @@ For each logical record **record** in **records**, apply the following steps: 4. For each [=predicate-object map=] of the Triples Map, apply the following steps: - - Let **predicates** be the set of [=RDF terms=] resulting from applying each predicate map of the predicate-object map to **record**. - - Let **objects** be the set of [=RDF terms=] resulting from applying each object map (excluding [=referencing object maps=]) to **record**. + - Let **predicates** be the set of [=RDF terms=] resulting from applying each predicate map of the predicate-object map to **iteration**. + - Let **objects** be the set of [=RDF terms=] resulting from applying each object map (excluding [=referencing object maps=]) to **iteration**. - Let **pogm** be the set of graph maps of the predicate-object map. - - Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **record**. + - Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **iteration**. For each possible combination ``, where *predicate* ∈ **predicates** and *object* ∈ **objects**, add a triple to the output dataset as follows: @@ -63,15 +63,15 @@ For each [=referencing object map=] of a [=predicate-object map=] in the [=Tripl - Let **psm** be the [=subject map=] of the [=parent Triples Map=] referenced by [=referencing object map=]. - Let **pogm** be the set of [=graph maps=] of the [=predicate-object map=]. -- Let **joined_records** be the result of evaluating the [=join conditions=] defined by the [=referencing object map=], combining records from both the child and parent logical sources. +- Let **joined_iterations** be the result of evaluating the [=join conditions=] defined by the [=referencing object map=], combining iterations from both the child and parent logical sources. -For each pair `` in **joined_records**, apply the following steps: +For each pair `` in **joined_iterations**, apply the following steps: -1. Let **subject** be the [=RDF terms=] resulting from applying **sm** to **child_record**. -2. Let **predicates** be the set of [=RDF terms=] resulting from applying each [=predicate map=] of the [=predicate-object map=] to **child_record**. -3. Let **object** be the [=RDF terms=] resulting from applying **psm** to **parent_record**. -4. Let **subject_graphs** be the set of RDF terms resulting from applying each graph map in **sgm** to **child_record**. -5. Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **child_record**. +1. Let **subject** be the [=RDF terms=] resulting from applying **sm** to **child_iteration**. +2. Let **predicates** be the set of [=RDF terms=] resulting from applying each [=predicate map=] of the [=predicate-object map=] to **child_iteration**. +3. Let **object** be the [=RDF terms=] resulting from applying **psm** to **parent_iteration**. +4. Let **subject_graphs** be the set of RDF terms resulting from applying each graph map in **sgm** to **child_iteration**. +5. Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **child_iteration**. For each *predicate* in **predicates**, add a triple to the output dataset as follows: @@ -108,17 +108,17 @@ Execute the following steps: A [=term map=] defines how an [=RDF term=] is generated from the evaluation of a [=logical iteration=] over a [=logical source=]. -The result of evaluating a term map for a given logical record can be one of the following: +The result of evaluating a term map for a given [=logical iteration=] can be one of the following: - **Empty**, if any referenced value of the [=term map=] evaluates to a null, empty or missing value (each data format defines it in [RML-IO-Registry](https://w3id.org/kg-construct/rml-io-registry/)); - **An [=RDF term=]**, when evaluation produces a valid [=RDF term=]according to the [=term generation rules=]; - **A data error**, when a valid RDF term cannot be produced. -The [=generated RDF term=] of a [=term map=] for a given logical record is determined as follows: +The [=generated RDF term=] of a [=term map=] for a given [=logical iteration=] is determined as follows: 1. If the term map is a **constant-valued term map**, then the generated RDF term is the term map’s constant value. -2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the logical record and applying the *term generation rules* to the resulting value. -3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] against the logical record and applying the *term generation rules* to the resulting value. +2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the *term generation rules* to the resulting value. +3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] against the [=logical iteration=] and applying the *term generation rules* to the resulting value. The term generation rules define how a concrete RDF term is generated from a given value: From 146411a9b24a6a7aa5d30525f9f01c7b3d817bb2 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Tue, 14 Oct 2025 09:57:08 +0200 Subject: [PATCH 04/29] adding language and datatype map in the output dataset --- spec/section/output.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/section/output.md b/spec/section/output.md index 9c6952f..266d0b4 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -111,7 +111,7 @@ A [=term map=] defines how an [=RDF term=] is generated from the evaluation of a The result of evaluating a term map for a given [=logical iteration=] can be one of the following: - **Empty**, if any referenced value of the [=term map=] evaluates to a null, empty or missing value (each data format defines it in [RML-IO-Registry](https://w3id.org/kg-construct/rml-io-registry/)); -- **An [=RDF term=]**, when evaluation produces a valid [=RDF term=]according to the [=term generation rules=]; +- **An [=RDF term=]**, when evaluation produces a valid [=RDF term=] according to the [=term generation rules=]; - **A data error**, when a valid RDF term cannot be produced. The [=generated RDF term=] of a [=term map=] for a given [=logical iteration=] is determined as follows: @@ -140,8 +140,8 @@ The term generation rules define how a concrete RDF term is generated - Return a blank node that is unique in the target graph. 5. **If the term type is `rml:Literal`:** - - If the term map declares a [=language tag=], then return a literal with that language tag and the natural RDF lexical form corresponding to *value*. - - Otherwise, if the term map declares a non-empty [=datatype=] different from the natural RDF datatype corresponding to the value’s implicit datatype, then return an RDF literal with the specified datatype. + - If the term map declares a [=language map=], then evaluate the [=language map=] to obtain a [=language tag=] and return a literal with that [=language tag=] and the natural RDF lexical form corresponding to *value*. + - Otherwise, if the term map declares a [=datatype map=], then evaluate it to obtain a [=datatype IRI=] and return an RDF literal with that [=datatype=] and the natural RDF lexical form corresponding to *value*. - Otherwise, return the natural RDF literal corresponding to *value*. From 75d1dfa97d7b30a6921394435c69cfa7819e9360 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Tue, 14 Oct 2025 13:06:47 +0200 Subject: [PATCH 05/29] adding multivalues in ouput --- spec/section/output.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/section/output.md b/spec/section/output.md index 266d0b4..8c2cff7 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -117,10 +117,10 @@ The result of evaluating a term map for a given [=logical iteration=] can be one The [=generated RDF term=] of a [=term map=] for a given [=logical iteration=] is determined as follows: 1. If the term map is a **constant-valued term map**, then the generated RDF term is the term map’s constant value. -2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the *term generation rules* to the resulting value. -3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] against the [=logical iteration=] and applying the *term generation rules* to the resulting value. +2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. +3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. -The term generation rules define how a concrete RDF term is generated from a given value: +The term generation rules define how a concrete RDF term is generated from each value from the [=expression evaluation result=]: 1. **If the value is null, empty or missing**, then no RDF term is generated. From 59717c048b63d3cfdd5ef24f977b5c410fed4bd4 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:39:43 +0100 Subject: [PATCH 06/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 8c2cff7..fe6494f 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -26,7 +26,7 @@ Let: - **sm** be the [=subject map=] of the [=Triples Map=]. - **iterations** be the set of [=logical iterations=] obtained by evaluating the [=logical source=] of the [=Triples Map=] using its declared [=reference formulation=]. -- **classes** be the set of class [=IRIs=] defined in **sm** (via `rml:class`). +- **classes** be the set of [=class IRIs=] defined in **sm** (via `rml:class`). - **sgm** be the set of [=graph maps=] attached to **sm**. For each [=logical iteration=] **iteration** in **iterations**, apply the following steps: From 3c68cc370a02a59e8f692c0a6078e44d8f86ac7e Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:39:49 +0100 Subject: [PATCH 07/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index fe6494f..0694ef6 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -32,7 +32,7 @@ Let: For each [=logical iteration=] **iteration** in **iterations**, apply the following steps: 1. Let [=subject=] be the [=RDF term=] resulting from applying **sm** to **iteration**. -2. Let **subject_graphs** be the set of [=RDF term=] resulting from applying each graph map in **sgm** to **iteration**. +2. Let **subject_graphs** be the set of [=generated RDF terms=] resulting from applying each graph map in **sgm** to **iteration**. 3. For each class [=IRI=] in **classes**, add a triple to the [=output dataset=] as follows: | Component | Value | From a1398af22c3aa63aa36cee07b3599040d41bc3cf Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:39:58 +0100 Subject: [PATCH 08/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 0694ef6..c496f14 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -33,7 +33,7 @@ For each [=logical iteration=] **iteration** in **iterations**, apply the follo 1. Let [=subject=] be the [=RDF term=] resulting from applying **sm** to **iteration**. 2. Let **subject_graphs** be the set of [=generated RDF terms=] resulting from applying each graph map in **sgm** to **iteration**. -3. For each class [=IRI=] in **classes**, add a triple to the [=output dataset=] as follows: +3. For each [=class IRI=] in **classes**, add a triple to the [=output dataset=] as follows: | Component | Value | |------------|--------| From 17884060b53a3a9a85e1af656cb933b31ac7fc8b Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:40:07 +0100 Subject: [PATCH 09/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index c496f14..a8db75e 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -45,7 +45,7 @@ For each [=logical iteration=] **iteration** in **iterations**, apply the follo 4. For each [=predicate-object map=] of the Triples Map, apply the following steps: - Let **predicates** be the set of [=RDF terms=] resulting from applying each predicate map of the predicate-object map to **iteration**. - - Let **objects** be the set of [=RDF terms=] resulting from applying each object map (excluding [=referencing object maps=]) to **iteration**. + - Let **objects** be the set of [=generated RDF terms=] resulting from applying each [=object map=] (excluding [=referencing object maps=]) to **iteration**. - Let **pogm** be the set of graph maps of the predicate-object map. - Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **iteration**. From 3cf0a596246150ef46b7749c2ca9a9640ee53e16 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:40:15 +0100 Subject: [PATCH 10/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index a8db75e..aa88ef3 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -47,7 +47,7 @@ For each [=logical iteration=] **iteration** in **iterations**, apply the follo - Let **predicates** be the set of [=RDF terms=] resulting from applying each predicate map of the predicate-object map to **iteration**. - Let **objects** be the set of [=generated RDF terms=] resulting from applying each [=object map=] (excluding [=referencing object maps=]) to **iteration**. - Let **pogm** be the set of graph maps of the predicate-object map. - - Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **iteration**. + - Let **predicate_object_graphs** be the set of [=generated RDF terms=] resulting from applying each [=graph map=] in **pogm** to **iteration**. For each possible combination ``, where *predicate* ∈ **predicates** and *object* ∈ **objects**, add a triple to the output dataset as follows: From 96d71e2d96eb8f83ce99665c05d9d4db9a4c06c3 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:40:27 +0100 Subject: [PATCH 11/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index aa88ef3..5593803 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -142,7 +142,7 @@ The term generation rules define how a concrete RDF term is generated 5. **If the term type is `rml:Literal`:** - If the term map declares a [=language map=], then evaluate the [=language map=] to obtain a [=language tag=] and return a literal with that [=language tag=] and the natural RDF lexical form corresponding to *value*. - Otherwise, if the term map declares a [=datatype map=], then evaluate it to obtain a [=datatype IRI=] and return an RDF literal with that [=datatype=] and the natural RDF lexical form corresponding to *value*. - - Otherwise, return the natural RDF literal corresponding to *value*. + - Otherwise, return the [=natural RDF literal=] corresponding to *value*. From a144cc205a91231531cd2ce162efc5d6f62f85a7 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:40:54 +0100 Subject: [PATCH 12/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 5593803..21ffb79 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -141,7 +141,7 @@ The term generation rules define how a concrete RDF term is generated 5. **If the term type is `rml:Literal`:** - If the term map declares a [=language map=], then evaluate the [=language map=] to obtain a [=language tag=] and return a literal with that [=language tag=] and the natural RDF lexical form corresponding to *value*. - - Otherwise, if the term map declares a [=datatype map=], then evaluate it to obtain a [=datatype IRI=] and return an RDF literal with that [=datatype=] and the natural RDF lexical form corresponding to *value*. + - Otherwise, if the term map declares a [=datatype map=], then evaluate it to obtain a [=datatype-override RDF literal=] corresponding to *value* and the specified datatype. - Otherwise, return the [=natural RDF literal=] corresponding to *value*. From 8e22607ece76b9f0a348911b82d621fbf75e27d4 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:41:44 +0100 Subject: [PATCH 13/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 21ffb79..d4a82d8 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -116,7 +116,7 @@ The result of evaluating a term map for a given [=logical iteration=] can be one The [=generated RDF term=] of a [=term map=] for a given [=logical iteration=] is determined as follows: -1. If the term map is a **constant-valued term map**, then the generated RDF term is the term map’s constant value. +1. If the term map is a [=constant-valued term map=], then the generated RDF term is the term map’s [=constant value=]. 2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. 3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. From 5d761d8e6c8841b406c85a78e4d8a7d601f41dce Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:41:50 +0100 Subject: [PATCH 14/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index d4a82d8..21bb0e2 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -112,7 +112,7 @@ The result of evaluating a term map for a given [=logical iteration=] can be one - **Empty**, if any referenced value of the [=term map=] evaluates to a null, empty or missing value (each data format defines it in [RML-IO-Registry](https://w3id.org/kg-construct/rml-io-registry/)); - **An [=RDF term=]**, when evaluation produces a valid [=RDF term=] according to the [=term generation rules=]; -- **A data error**, when a valid RDF term cannot be produced. +- **A [=data error=]**, when a valid RDF term cannot be produced. The [=generated RDF term=] of a [=term map=] for a given [=logical iteration=] is determined as follows: From 0144a9abec627af740f46051d2b65dd939f97853 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:41:57 +0100 Subject: [PATCH 15/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 21bb0e2..9b2ac58 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -118,7 +118,7 @@ The [=generated RDF term=] of a [=term map=] for a given [=logical iteration=] i 1. If the term map is a [=constant-valued term map=], then the generated RDF term is the term map’s [=constant value=]. 2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. -3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. +3. If the term map is a [=template-valued term map=], then the generated RDF term is determined by applying the [=term generation rules=] to the [=template value=]. The term generation rules define how a concrete RDF term is generated from each value from the [=expression evaluation result=]: From 55403361c36fb0df1bf266182e100943e6b05f33 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:42:04 +0100 Subject: [PATCH 16/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 9b2ac58..62beee2 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -120,7 +120,7 @@ The [=generated RDF term=] of a [=term map=] for a given [=logical iteration=] i 2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. 3. If the term map is a [=template-valued term map=], then the generated RDF term is determined by applying the [=term generation rules=] to the [=template value=]. -The term generation rules define how a concrete RDF term is generated from each value from the [=expression evaluation result=]: +The term generation rules define how a concrete RDF term is generated from each value from an [=expression evaluation result=]: 1. **If the value is null, empty or missing**, then no RDF term is generated. From 936275e3a56db1a15a8419fff369eda069f2706b Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:42:09 +0100 Subject: [PATCH 17/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 62beee2..ec4192c 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -117,7 +117,7 @@ The result of evaluating a term map for a given [=logical iteration=] can be one The [=generated RDF term=] of a [=term map=] for a given [=logical iteration=] is determined as follows: 1. If the term map is a [=constant-valued term map=], then the generated RDF term is the term map’s [=constant value=]. -2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. +2. If the term map is a [=reference-valued term map=], then the generated RDF term is determined by applying the [=term generation rules=] to its [=reference value=]. 3. If the term map is a [=template-valued term map=], then the generated RDF term is determined by applying the [=term generation rules=] to the [=template value=]. The term generation rules define how a concrete RDF term is generated from each value from an [=expression evaluation result=]: From e812d9bdfab19733de4dcd99afaabe78e3e31807 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:42:19 +0100 Subject: [PATCH 18/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index ec4192c..43a8bd3 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -63,7 +63,7 @@ For each [=referencing object map=] of a [=predicate-object map=] in the [=Tripl - Let **psm** be the [=subject map=] of the [=parent Triples Map=] referenced by [=referencing object map=]. - Let **pogm** be the set of [=graph maps=] of the [=predicate-object map=]. -- Let **joined_iterations** be the result of evaluating the [=join conditions=] defined by the [=referencing object map=], combining iterations from both the child and parent logical sources. +- Let **joined_iterations** be the result of evaluating the [=join conditions=] defined by the [=referencing object map=], combining iterations from both the [=child logical source=] and [=parent logical sources=]. For each pair `` in **joined_iterations**, apply the following steps: From 4bd9bdcc522116769f3b4dda4ac564371b365470 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:42:31 +0100 Subject: [PATCH 19/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 43a8bd3..6aae9e1 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -71,7 +71,7 @@ For each pair `` in **joined_iterations**, ap 2. Let **predicates** be the set of [=RDF terms=] resulting from applying each [=predicate map=] of the [=predicate-object map=] to **child_iteration**. 3. Let **object** be the [=RDF terms=] resulting from applying **psm** to **parent_iteration**. 4. Let **subject_graphs** be the set of RDF terms resulting from applying each graph map in **sgm** to **child_iteration**. -5. Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **child_iteration**. +5. Let **predicate_object_graphs** be the set of [=generated RDF terms=] resulting from applying each graph map in **pogm** to **child_iteration**. For each *predicate* in **predicates**, add a triple to the output dataset as follows: From 0ede9599f1c1674d7c5c26e047144240675b6867 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:42:42 +0100 Subject: [PATCH 20/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 6aae9e1..65ed2e9 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -44,7 +44,7 @@ For each [=logical iteration=] **iteration** in **iterations**, apply the follo 4. For each [=predicate-object map=] of the Triples Map, apply the following steps: - - Let **predicates** be the set of [=RDF terms=] resulting from applying each predicate map of the predicate-object map to **iteration**. + - Let **predicates** be the set of [=generated RDF terms=] resulting from applying each predicate map of the predicate-object map to **iteration**. - Let **objects** be the set of [=generated RDF terms=] resulting from applying each [=object map=] (excluding [=referencing object maps=]) to **iteration**. - Let **pogm** be the set of graph maps of the predicate-object map. - Let **predicate_object_graphs** be the set of [=generated RDF terms=] resulting from applying each [=graph map=] in **pogm** to **iteration**. From 52fa018db157ee0071762a48f6d0e6978bafe0b7 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:42:55 +0100 Subject: [PATCH 21/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 65ed2e9..070556d 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -110,7 +110,7 @@ Execute the following steps: A [=term map=] defines how an [=RDF term=] is generated from the evaluation of a [=logical iteration=] over a [=logical source=]. The result of evaluating a term map for a given [=logical iteration=] can be one of the following: -- **Empty**, if any referenced value of the [=term map=] evaluates to a null, empty or missing value (each data format defines it in [RML-IO-Registry](https://w3id.org/kg-construct/rml-io-registry/)); +- **Empty**, if the [=expression evaluation result=] of the [=term map=] evaluates to a null, empty or missing value (each data format defines it in [RML-IO-Registry](https://w3id.org/kg-construct/rml-io-registry/)); - **An [=RDF term=]**, when evaluation produces a valid [=RDF term=] according to the [=term generation rules=]; - **A [=data error=]**, when a valid RDF term cannot be produced. From d82676a9c07b5027f61dbbdda1f28826e5e76a34 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:43:05 +0100 Subject: [PATCH 22/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 070556d..fc2325f 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -31,7 +31,7 @@ Let: For each [=logical iteration=] **iteration** in **iterations**, apply the following steps: -1. Let [=subject=] be the [=RDF term=] resulting from applying **sm** to **iteration**. +1. Let [=subject=] be the [=generated RDF term=] resulting from applying **sm** to **iteration**. 2. Let **subject_graphs** be the set of [=generated RDF terms=] resulting from applying each graph map in **sgm** to **iteration**. 3. For each [=class IRI=] in **classes**, add a triple to the [=output dataset=] as follows: From b914b74da00209ce3ff0f4de4cf9767b78ddd4fc Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:43:16 +0100 Subject: [PATCH 23/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index fc2325f..7891d04 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -67,7 +67,7 @@ For each [=referencing object map=] of a [=predicate-object map=] in the [=Tripl For each pair `` in **joined_iterations**, apply the following steps: -1. Let **subject** be the [=RDF terms=] resulting from applying **sm** to **child_iteration**. +1. Let **subject** be the [=generated RDF term=] resulting from applying **sm** to **child_iteration**. 2. Let **predicates** be the set of [=RDF terms=] resulting from applying each [=predicate map=] of the [=predicate-object map=] to **child_iteration**. 3. Let **object** be the [=RDF terms=] resulting from applying **psm** to **parent_iteration**. 4. Let **subject_graphs** be the set of RDF terms resulting from applying each graph map in **sgm** to **child_iteration**. From 482cd9a40b7f7a77af08799596c5dd235ce9afe0 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:43:27 +0100 Subject: [PATCH 24/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 7891d04..a3f540a 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -68,7 +68,7 @@ For each [=referencing object map=] of a [=predicate-object map=] in the [=Tripl For each pair `` in **joined_iterations**, apply the following steps: 1. Let **subject** be the [=generated RDF term=] resulting from applying **sm** to **child_iteration**. -2. Let **predicates** be the set of [=RDF terms=] resulting from applying each [=predicate map=] of the [=predicate-object map=] to **child_iteration**. +2. Let **predicates** be the set of [=generated RDF terms=] resulting from applying each [=predicate map=] of the [=predicate-object map=] to **child_iteration**. 3. Let **object** be the [=RDF terms=] resulting from applying **psm** to **parent_iteration**. 4. Let **subject_graphs** be the set of RDF terms resulting from applying each graph map in **sgm** to **child_iteration**. 5. Let **predicate_object_graphs** be the set of [=generated RDF terms=] resulting from applying each graph map in **pogm** to **child_iteration**. From 4d7b6b6b9f344a5bd978f3de4009c03465701ccc Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:43:39 +0100 Subject: [PATCH 25/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index a3f540a..111ef79 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -69,7 +69,7 @@ For each pair `` in **joined_iterations**, ap 1. Let **subject** be the [=generated RDF term=] resulting from applying **sm** to **child_iteration**. 2. Let **predicates** be the set of [=generated RDF terms=] resulting from applying each [=predicate map=] of the [=predicate-object map=] to **child_iteration**. -3. Let **object** be the [=RDF terms=] resulting from applying **psm** to **parent_iteration**. +3. Let **object** be the [=generated RDF term=] resulting from applying **psm** to **parent_iteration**. 4. Let **subject_graphs** be the set of RDF terms resulting from applying each graph map in **sgm** to **child_iteration**. 5. Let **predicate_object_graphs** be the set of [=generated RDF terms=] resulting from applying each graph map in **pogm** to **child_iteration**. From 123044f5065674a0f88931b5ca8e40a3b4e660f9 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Mon, 24 Nov 2025 07:43:50 +0100 Subject: [PATCH 26/29] Update spec/section/output.md Co-authored-by: Pano Maria --- spec/section/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/section/output.md b/spec/section/output.md index 111ef79..7d0aad5 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -70,7 +70,7 @@ For each pair `` in **joined_iterations**, ap 1. Let **subject** be the [=generated RDF term=] resulting from applying **sm** to **child_iteration**. 2. Let **predicates** be the set of [=generated RDF terms=] resulting from applying each [=predicate map=] of the [=predicate-object map=] to **child_iteration**. 3. Let **object** be the [=generated RDF term=] resulting from applying **psm** to **parent_iteration**. -4. Let **subject_graphs** be the set of RDF terms resulting from applying each graph map in **sgm** to **child_iteration**. +4. Let **subject_graphs** be the set of [=generated RDF terms=] resulting from applying each [=graph map=] in **sgm** to **child_iteration**. 5. Let **predicate_object_graphs** be the set of [=generated RDF terms=] resulting from applying each graph map in **pogm** to **child_iteration**. For each *predicate* in **predicates**, add a triple to the output dataset as follows: From cab81abee662c47821a3804071fce2cd6b339c2d Mon Sep 17 00:00:00 2001 From: David Chaves Date: Tue, 25 Nov 2025 10:31:27 +0100 Subject: [PATCH 27/29] adding class IRI dfn --- spec/section/mapping.md | 5 +++-- spec/section/terminology.md | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/section/mapping.md b/spec/section/mapping.md index 59e5ce9..8e0d559 100644 --- a/spec/section/mapping.md +++ b/spec/section/mapping.md @@ -62,13 +62,14 @@ A subject map is a [=term map=]. It specifies a rule for generating t ## Typing Resources (rml:class) -A [=subject map=] MAY have one or more _**class IRIs**_. They are represented by the `rml:class` property. +A class IRI is an [=IRI=] that denotes an [=RDFS class=]. +A [=subject map=] MAY have one or more [=class IRIs=]. They are represented by the `rml:class` property. The values of the `rml:class` property MUST be [=IRIs=]. For each [=RDF term=] generated by the [=subject map=], [=RDF triples=] with [=predicate=] `rdf:type` and the class [=IRI=] as [=object=] will be generated. diff --git a/spec/section/terminology.md b/spec/section/terminology.md index 0975a7c..2df33d5 100644 --- a/spec/section/terminology.md +++ b/spec/section/terminology.md @@ -27,6 +27,11 @@ This section lists some terms normatively defined in [[RDF11-CONCEPTS]] and used - resource - subject +## RDFS Terminology + +This section lists some terms normatively defined in [[RDF11-SCHEMA]] and used in RML: + +- RDFS class # XML Schema Definition Language (XSD) Terminology From be8ba559880e3c7432da62e169cbd34ed71043b3 Mon Sep 17 00:00:00 2001 From: David Chaves Date: Tue, 25 Nov 2025 10:37:03 +0100 Subject: [PATCH 28/29] removing URI from 92-93 --- spec/section/output.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/section/output.md b/spec/section/output.md index 7d0aad5..b41c00d 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -87,12 +87,12 @@ For each *predicate* in **predicates**, add a triple to the output dataset as fo “Add triples to the output dataset” is a process that takes the following inputs: -| Input | Description | -|--------|-------------------------------------------------| -| **Subject** | an [=IRI=], a [=URI=], [=blank node=], or empty | -| **Predicate** | an [=IRI=], a [=URI=], or empty | -| **Object** | an [=RDF term=] or empty | -| **Target graphs** | a set of zero or more [=IRIs=] | +| Input | Description | +|--------|---------------------------| +| **Subject** | an [=IRI=], [=blank node=], or empty | +| **Predicate** | an [=IRI=], or empty | +| **Object** | an [=RDF term=] or empty | +| **Target graphs** | a set of zero or more [=IRIs=] | Execute the following steps: From eb7c9266eb038b5a1303feaf160d26bf4763352e Mon Sep 17 00:00:00 2001 From: David Chaves Date: Tue, 25 Nov 2025 11:02:53 +0100 Subject: [PATCH 29/29] adding scope of BN --- spec/section/graphmap.md | 5 +++++ spec/section/output.md | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/spec/section/graphmap.md b/spec/section/graphmap.md index 3c264c5..beae6f5 100644 --- a/spec/section/graphmap.md +++ b/spec/section/graphmap.md @@ -81,3 +81,8 @@ However, in this example, RDF triples of the [=predicate=] `ex:title` are placed +## Scope of Blank Nodes + +[=Blank nodes=] in the [=output dataset=] are scoped to a single [=RDF graph=]. If the same [=blank node identifier=] occurs in multiple [=RDF triples=] that are in the same graph, then the triples will share the same blank node. If, however, the same blank node identifier occurs in multiple graphs, then a distinct blank node be created for each graph. An RML-generated blank node can never be shared by two triples in two different graphs. + +This implies that triples generated from a single logical source row will have different subjects if the subjects are blank nodes and the triples are placed into different graphs. \ No newline at end of file diff --git a/spec/section/output.md b/spec/section/output.md index b41c00d..3a83843 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -100,9 +100,9 @@ Execute the following steps: 2. Otherwise, generate an [=RDF triple=] ``. 3. If the set of target graphs includes `rml:defaultGraph`, add the triple to the [=default graph=] of the [=output dataset=]. 4. For each [=IRI=] in the set of target graphs not equal to `rml:defaultGraph`, add the triple to the [=named graph=] identified by that [=IRI=] in the [=output dataset=]. - - If the [=named graph=] does not yet exist, create it. -5. RDF graphs MUST NOT contain duplicate triples. Adding multiple identical triples to the same graph has the same effect as adding it once. -6. The scope of blank nodes is limited to the output dataset being generated. + - If the [=named graph=] does not yet exist, create it. + +RDF graphs MUST NOT contain duplicate triples. Adding multiple identical triples to the same graph has the same effect as adding it once. Also note the [[[#scope-of-blank-nodes]]]. ### Generated RDF Term of a Term Map