Closed hartig closed 3 years ago
There is a positive syntax test for embedded triples with VALUES included in PR #110.
Looks good. Thanks. The only issue: you have put it in the category of tests related to the annotation syntax while it is not actually related to the annotation syntax.
Good point - will fix (side effect of dealing with many tests at once).
Slight problem: EmbTP
allows variables so use in [ ] DataBlockValue ::= EmbTP | ...
allows variables, and we have variables in VALUES
.
Here are some productions to address this:
[ ] DataBlockValue ::= EmbTD | iri | RDFLiteral | NumericLiteral | BooleanLiteral | 'UNDEF'
[ ] EmbTP ::= ...
[ ] EmbTD ::= '<<' DataValueTerm ( iri | 'a' ) DataValueTerm '>>'
[ ] DataValueTerm ::= EmbTD | iri | RDFLiteral | NumericLiteral | BooleanLiteral
DataValueTerm
stops UNDEF
inside a << >>
. I've left DataBlockValue
in full form so it is more like the SPARQL 1.1 text but it is also DataValueTerm | 'UNDEF'
.
Putting EmbTD
after EmbTP
adds a little clarity.
(EmbTD
is just following the naming style - there may be a better name).
I will add a bad syntax test case to PR #110.
The case of the use of <<>>
and annotation syntax in INSERT DATA
and DELETE DATA
is already covered by grammar note 8 that bans variables.
Nice catch. Thanks!
I think the above is what @afs wrote. But jut to be clear all embedded triples used in a VALUE clause should be completely known, which is what I enforced for when working on implementing RDF-star for RDFlib. I used the name KnownEmbTP
for what @afs calls EmbTD
.
Yes, triples that can be passed via a VALUES clause as per this proposal here are RDF-star triples and not SPARQL-star triple patterns with variables.
During today's telco we have agreed to implement this proposal. I will create a PR for it.
PR #128 implements the proposal to add the option for triples in the VALUES clause.
Closing this issue as PR #128 has been merged now.
By using the VALUES clause of SPARQL, users can specify solution mappings that feed into the evaluation process. Given that SPARQL-star solution mappings may bind variables to triples, the VALUES clause should be extended accordingly for SPARQL-star.
I propose to implement this idea by adding
EmbTP
as another alternative to theDataBlockValue
production in the SPARQL grammar:However, let's wait with this change until the work on PR #106 (annotation syntax for SPARQL-star) has been finished and that PR has been merged.