On 24/02/2019 15:51, Kevin Dreßler wrote:
Apologies for double posting, but I just tried to delete the "?" modifier as I 
only needed it in my original query and not in the example provided here.
After that, it works as expected. So it's not simply tied to inverse property 
paths but to this combination of inverse property path with optional property 
path.

Can anyone make sense of this?

https://www.w3.org/TR/sparql11-query/#defn_evalPP_ZeroOrOnePath

"path?" is any match with 0 or 1 occurrences and it is a set.

It is not "all zero matches union all one matches" as a multiset.

So ? suppresses a duplicate.

    Andy


On 24. Feb 2019, at 16:43, Kevin Dreßler <kvndrs...@gmail.com> wrote:

Hello ,

I have come across an unexpected behaviour with inverse property paths, but 
maybe I am just missing something basic here.
I wrote a query to get from the entries in an RDF list to the resource which 
has the list as predicate value using inverse property paths.
As I had duplicate entries in the list I expected to get duplicate 
QuerySolutions as I would when using the normal direction.
However, using inverse property paths seem to result in a behaviour as if I had 
specified DISTINCT in my query.
Please see the example gist here: 
https://gist.github.com/kdrsslr/c8711f962a7b793dc48222944fd3ed89 
<https://gist.github.com/kdrsslr/c8711f962a7b793dc48222944fd3ed89>

Is there an explanation for this kind of behaviour?

Thanks in advance,
Kevin


Reply via email to