galgonek opened a new issue, #2996: URL: https://github.com/apache/jena/issues/2996
### Version 5.3.0 ### What happened? The service enhancer does not take variable scope into account when performing substitutions. For example, the following query should return some solutions: ```sparql PREFIX dcterms: <http://purl.org/dc/terms/> SELECT * WHERE { VALUES ?O { "string" } SERVICE <loop:https://idsm.elixir-czech.cz/sparql/endpoint/idsm> { SELECT ?S WHERE { ?S dcterms:issued ?O. } } } ``` However, no solution is returned because the service enhancer performs the following call with an incorrect substitution of the variable `?O`: ```sparql SELECT ?S WHERE { ?S <http://purl.org/dc/terms/issued> "string" } ``` On the other hand, the following query returns some results, even though it should not: ```sparql PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?S WHERE { VALUES ?O { "string" } SERVICE <loop:https://idsm.elixir-czech.cz/sparql/endpoint/idsm> { ?S dcterms:issued ?X. minus { ?S dcterms:issued ?O. } } } ``` This is again caused by incorrect substitution: ```sparql SELECT * WHERE { ?S <http://purl.org/dc/terms/issued> ?X MINUS { ?S <http://purl.org/dc/terms/issued> "string" } } ``` ### Relevant output and stacktrace ```shell ``` ### Are you interested in making a pull request? None -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
