For multiple bindings, 

SELECT *
WHERE {
   ?x tops:split ("John Jacob Jingle Ivor Schmidt" " ")
}

parses and successively binds ?x to the tokens in the string.

If there are multiple return values and multiple bindings from the magic 
property, for example (I am making this up on the fly) , if I want to access 
the coordinates of vertex loop of a polygon using a magic property 
:vertexCoordinates that accesses the vertices of the polygon and returns their 
coordinates:

SELECT *
WHERE {
?ngon a :Polygon
(?i ?x ?y ?z) :vertexCoordinates (?ngon).
} ORDER BY ?i

 ?i  ?x  ?y  ?z ?ngon
 0   1    0    0   p1
 1   0    1    0   p1
 2   ...

On Jun 10, 2010, at 12:30 PM, Scott Henninger wrote:

> Arthur; I've always found top:split to be a good example of how this
> works.  Try the following on the kennedys model:
> 
> SELECT *
> WHERE {
>    ?person kennedys:name ?name .
>    ?x tops:split (?name " ")
> }
> 
> It's also a god example of what a magic property does.  It creates
> multiple bindings for the variable.  I say this because it seems like
> the example you gave earlier should be applied via  SPIN function
> because it would only generate one binding.  Then the syntax would be:
>  LET ?name := apf:concat(?firstName, ?lastName))
> 
> (...or did you mean fn:concat()?)
> 
> -- Scott
> 
> On Jun 10, 12:47 am, Holger Knublauch <[email protected]> wrote:
>> Yes, this is correct. Furthermore, a magic property can also have multiple 
>> variables on the left side, for each SELECT ?x ?y ?z variable.
>> 
>> Syntactically, the (...) is a short notation for RDF lists, BTW.
>> 
>> Holger
>> 
>> On Jun 10, 2010, at 3:32 PM, Arthur Keen wrote:
>> 
>>> In the SPIN documentation, there is a statement "Magic properties can also 
>>> take multiple arguments ..."  What is the syntax for passing in the other 
>>> arguments.
>>> The example  ?name apf:concat (?firstName ?lastName), indicates the syntax 
>>> is:  object propertyfunction (arg1 arg2), is that right?
>> 
>>> Arthur
>> 
>>> --
>>> 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

-- 
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