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 predicate then, where a magic predicate would return multiple results.

I think Holger just sent a link about magic predicates in a separate thread :-)

Gokhan


On 6/4/2011 7:17 AM, sofiangeletou wrote:
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(?f, ?arg1, ?arg2) AS ?cond) .
}

arg3 has an (unknown) number of features ?f and I want to see how many
of these satisfy the condition given ?arg1 and ?arg2. I have
implemented it as above and this works in sparql view where i
explicitly state the value of ?arg3:= :theArgIwant. But when I try to
parameterise it in a function in the way shown above i get all results
that apply to any instance of objectType instead of the ones that
apply on ?arg3.
Cannot I pass the function argument in a nested select? My other
alternative is to put the nested select in another function but then i
am stuck on the problem of iterating over these results.
Many thanks
Sofia


--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to