Skip to content

Conversation

@dachafra
Copy link
Member

@pmaria I don't know why output-dataset was included in #244, but please, use this PR to review the whole section.

@dachafra dachafra requested a review from pmaria October 10, 2025 11:03
Copy link
Collaborator

@pmaria pmaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output dataset section is missing descriptions on multivalued term maps and on language maps and datatype maps.

@dachafra dachafra requested a review from pmaria October 14, 2025 11:07
@dachafra
Copy link
Member Author

Descriptions of datatype/language maps and multivalues are provided

@dachafra
Copy link
Member Author

@pmaria can we merge this PR?

Copy link
Collaborator

@pmaria pmaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some notes on parts of the text that were merged earlier and I cannot comment on in this PR:

line 93 and 94. The mentions of [=URI=] can be left out, since a URI is an IRI.

I notice in the Adding Triples to the Output Dataset section two points that are new compared to R2RML:

  1. RDF graphs MUST NOT contain duplicate triples. Adding multiple identical triples to the same graph has the same effect as adding it once.

I cannot recall discussing this in the group. But I do not agree with this point. Deduping does not matter in many cases, and should depend on the implementation and the use case.

  1. The scope of blank nodes is limited to the output dataset being generated.

This is true, but seems somewhat misplaced in this section. I think it would make more sense in the Generated RDF Term of a Term Map section.

- **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`).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **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`).

May have to mark class IRIs as definition.

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:

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**.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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**.

- 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**.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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 **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**.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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**.

- **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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **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 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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=].

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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=].

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=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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=].

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 <dfn>term generation rules</dfn> define how a concrete RDF term is generated from a given value:
The <dfn>term generation rules</dfn> define how a concrete RDF term is generated from each value from the [=expression evaluation result=]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The <dfn>term generation rules</dfn> define how a concrete RDF term is generated from each value from the [=expression evaluation result=]:
The <dfn>term generation rules</dfn> define how a concrete RDF term is generated from each value from an [=expression evaluation result=]:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants