Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate graphs with blank node graph name #146

Open
pmaria opened this issue Nov 25, 2024 · 4 comments
Open

Generate graphs with blank node graph name #146

pmaria opened this issue Nov 25, 2024 · 4 comments

Comments

@pmaria
Copy link
Collaborator

pmaria commented Nov 25, 2024

In R2RML a graph map always generates an IRI. However in RDF there is no such requirement. See also the draft https://www.w3.org/TR/rdf12-concepts/#dfn-graph-name.

Should RML allow graphs with blank node graph names?

@pmaria pmaria changed the title Generate blank node graphs Generate graphs with blank node graph name Nov 25, 2024
@chrdebru
Copy link
Contributor

If you look at Section 4 of https://www.w3.org/TR/rdf11-concepts/ : "Zero or more named graphs. Each named graph is a pair consisting of an IRI or a blank node (the graph name), and an RDF graph. Graph names are unique within an RDF dataset."

Then the answer would be yes. It makes, to me, a lot more sense for non-constant graph maps. The mapper should know that referring to a constant blank node that may have metadata in the mapping: e.g.,

_:a123 dc:title "blank!".

and its "counterpart in the mappings will not refer to the same node.

@pmaria
Copy link
Collaborator Author

pmaria commented Dec 2, 2024

@chrdebru I'm not sure I follow.

and its "counterpart in the mappings will not refer to the same node.

Or did you mean, its counterpart in the output dataset?

@chrdebru
Copy link
Contributor

chrdebru commented Dec 2, 2024

Indeed, in the output dataset, first, if I use _:a123 as a BN identifier in my mapping, then it does not guarantee that the same BN identifier is used in the output dataset. In (R2)RML, this is even more general, as values yielded by templates are not to be used for BN identifiers in the output dataset; it's just a mapping from such values to internal identifiers.

If I have in my mapping:

<#sm> rml:graph _:a123 . and elsewhere in that file declare that ```_:a123 dc:title "blank!".```` then the resulting RDF will only refer to a blank node (potentially with the same BN identifier, but not guaranteed) and thus the two BNs will refer to two different resources.

See the following note https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node: "Blank node identifiers are local identifiers that are used in some concrete RDF syntaxes or RDF store implementations. They are always locally scoped to the file or RDF store, and are not persistent or portable identifiers for blank nodes. Blank node identifiers are not part of the RDF abstract syntax, but are entirely dependent on the concrete syntax or implementation. The syntactic restrictions on blank node identifiers, if any, therefore also depend on the concrete RDF syntax or implementation. Implementations that handle blank node identifiers in concrete syntaxes need to be careful not to create the same blank node from multiple occurrences of the same blank node identifier except in situations where this is supported by the syntax."

Base IRIs (available in Turtle and not in n-triples) are used to resolve relative IRIs. Using base IRIs to "scope" blank nodes is a misuse of base IRIs.

@pmaria
Copy link
Collaborator Author

pmaria commented Dec 2, 2024

Yes, so we maintain the rule of no constant blank nodes, as with the other term maps, however allow for blank nodes to be generated by non-constant graph maps.

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

No branches or pull requests

2 participants