On 09/03/12 18:59, Andy Seaborne wrote:

I'm currently working on a shortest path problem that does have a
fixed property. In my application, icons can optionally be associated
with types and I'd like entities to use the "closest" icon(s) (i.e.
direct type(s), then parent(s), then grandparent(s), etc.). Assuming
no RDFS inferencing were performed, to get the icon(s) for particular
instance you'd do something like:

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX ex:<http://example.org/>
select ?icon
where {
ex:Entity1 rdf:type/SHORTEST(rdfs:subClassOf*/ex:hasIcon) ?icon .
}


Thought: the length is well defines and not a multiple value. The operator could return the length: e.g.:

SHORTEST(:path, ?length)

        Andy

Reply via email to