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 value of ?person
}
No need for tops:foreach here.
See
http://www.w3.org/Submission/2011/SUBM-spin-modeling-20110222/#spin-magic
for details on how to create magic properties in SPIN.
Holger
On Jun 4, 2011, at 10:28 PM, sofiangeletou wrote:
> 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 <[email protected]> wrote:
>> 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.
>>
>> Holger
>
> --
> 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
--
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