Re: [topbraid-users] passing function arguments in nested selects in the function body

2011-06-04 Thread Gokhan Soydan
Sofia, Could you send how your function and the function call looks like? Also, if you want to get multiple results, then you cannot use a BIND function, because a BIND function can only return one result set with one result for a given input. I would instead suggest you to use a magic predic

Re: [topbraid-users] Re: tops#foreach has no registered function factory

2011-06-04 Thread Holger Knublauch
Sofia, you need to turn the kennedys function into a magic property. Magic properties can return multiple values - normal functions only return a single value. Then do something like WHERE { kennedys:Person kennedys:getTheKennedys ?person . # The rest of the query is executed for each v

RE: [topbraid-users] Re: tops#foreach has no registered function factory

2011-06-04 Thread Irene Polikoff
Sofia, There are cases when it is not possible to do what is needed in a single query. SPARQLMotion provides a good solution in these situations. It has iteration modules (and other program control modules) that enable you to do all sorts of things in a body of iteration. I have not looked into d

[topbraid-users] passing function arguments in nested selects in the function body

2011-06-04 Thread sofiangeletou
Hi all, I am trying to work around the problem of iterating over a set of objects as shown below. SELECT ((SUM(?cond)) AS ?sum) WHERE { { SELECT ?f WHERE { ?arg3 hasFeature ?f . ?arg3 a objectType. } } . ?f a oubo:feature . BIND (:isSatisfied(?

[topbraid-users] Re: tops#foreach has no registered function factory

2011-06-04 Thread sofiangeletou
Thank you Holger. but what is the alternative to iterate over the results of kennedys:getTheKennedys(kennedys:Person) ? Sofia On Jun 4, 1:18 pm, Holger Knublauch wrote: > On Jun 4, 2011, at 10:58 AM, sofiangeletou wrote: > > >   let(?x:= tops:foreach (kennedys:getTheKennedys(kennedys:Person))) >

Re: [topbraid-users] Re: tops#foreach has no registered function factory

2011-06-04 Thread Holger Knublauch
On Jun 4, 2011, at 10:58 AM, sofiangeletou wrote: > let(?x:= tops:foreach (kennedys:getTheKennedys(kennedys:Person))) This explains it - tops:foreach is a "magic property" and not a FILTER/LET/BIND function. So you can only use it in the triple syntax like in Scott's example, but not in a LET