The MarkLogic semantics documentation mentions that all SPARQL 1.1 property paths are supported, with the exception of negation. I have been unable to get the syntax where path length is specified to work, i.e.
elt{n,m} A path between n and m occurrences of elt.
elt{n} Exactly n occurrences of elt. A fixed length path.
elt{n,} n or more occurrences of elt.
elt{,n} Between 0 and n occurrences of elt.
If I try something like:
select ?leaf ?distance {
select ?leaf (count(?mid) as ?distance) {
?leaf <http://schemas.abbvienet.com/ontologies/infrastructure.owl#manager>{1,2} ?mid .
?mid <http://schemas.abbvienet.com/ontologies/infrastructure.owl#manager>{1,2} <http://rdf.abbvienet.com/infrastructure/person/10019933> .
}
group by ?leaf
}
I get the following error:
XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected {
Does this work for anyone else, or does anyone know whether this path syntax is supported or not in MarkLogic?
!:p
is supported. – UninformedUserp{n,m}
) isn't in SPARQL 1.1., though it was in earlier drafts of the property path syntax. stackoverflow.com/questions/37489420/… mentions that some endpoints still support it, and also describes some workarounds. – Joshua Taylor