You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one wants to know all claimed colors of :Violets, there is currently no way to express this in a SPARQL (1.2) query, without knowing all nested quoted triple depths beforehand.
Since this topic is part of a broader problem of generalizing path expressions in SPARQL, the WG decided not to design an ad-hoc solution that is specific to paths over nested quoted triples (given the limited charter of the WG), but defer to a future group. Hence, I am opening this issue here to make sure we keep track of it.
Previous work
This issue is related to proposals for extending property path expressions:
Some possible solutions to this specific problem of nested quoted triples can be found below.
But ideally, this should be solved in a more generic manner that captures the requirements from the issues linked above.
Extending property path syntax to allow recursing into nested quoted triples:
:Alice :says*' << :Violets :haveColor ?color >>
An alternative approach that is inspired by the GRAPH syntax
could allow the QUOTED keyword to be used to access any quoted triple (at any nested depth):
SELECT ?person ?color {
{
QUOTED ?qOuter {
?person :says ?qInner
}
} UNION { # Union is necessary because :Alice's statement about :Red is not quoted
?person :says ?qInner
}
QUOTED ?qInner {
:Violets :haveColor ?color
}
}
Considerations for backward compatibility
N/A
The text was updated successfully, but these errors were encountered:
Adrian asked me to add the link for the deck of slides that I had presented at the 2022 Knowledge Graph Conference, but I am not sure how I can edit this page. So, I am providing the link here in this comment. Please add it to the "Previous Work" section or wherever appropriate. Thanks. "Neighborhood-Aware Path Traversal", Souripriya Das.
Why?
A topic that was recently discussed in the RDF-star WG, is the ability to query nested quoted triples at an unknown depth.
For example, given the following dataset:
If one wants to know all claimed colors of
:Violets
, there is currently no way to express this in a SPARQL (1.2) query, without knowing all nested quoted triple depths beforehand.Since this topic is part of a broader problem of generalizing path expressions in SPARQL, the WG decided not to design an ad-hoc solution that is specific to paths over nested quoted triples (given the limited charter of the WG), but defer to a future group. Hence, I am opening this issue here to make sure we keep track of it.
Previous work
This issue is related to proposals for extending property path expressions:
Proposed solution
Some possible solutions to this specific problem of nested quoted triples can be found below.
But ideally, this should be solved in a more generic manner that captures the requirements from the issues linked above.
Extending property path syntax to allow recursing into nested quoted triples:
An alternative approach that is inspired by the
GRAPH
syntaxcould allow the
QUOTED
keyword to be used to access any quoted triple (at any nested depth):Considerations for backward compatibility
N/A
The text was updated successfully, but these errors were encountered: