Tim; Yes, you can pass any resource (URI, or "object" or "instance",
if you like) as an argument to a SPIN template.  For example, using
the kennedys model, the resource kennedys:JosephKennedy is an
"instance" that contains a "list" of children - multiple values for
the object property kennedys:child.  You can pass
kennedys:JosephKennedy to any template and then query its contents -
e.g. suppose you pass that resource as ?arg1, then {?arg1
kennedys:child ?child} gets the list of children.  You can create any
data structure and pass to a SPIN function, template, or magic
property as an argument, then query its contents in the SPARQL
definition.

If by "list" you mean an RDF list, which is *occasionally* useful,
then pass the resource representing the list to the template and use {?
arg1 rdf:rest*/rdf:first ?listmember} to find all members of the list.

-- Scott

On Aug 24, 6:37 am, Tim Darr <[email protected]> wrote:
> Is it possible to pass a list as an argument to a SPIN template. I
> want to be able to pass in an instance and then a list of instances
> where the list are object property values on the first instance.
>
> If so, what does the SPARQL code look like to process the list?
>
> -Thanks-

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