thanks :)

On Jan 13, 3:49 am, Holger Knublauch <[email protected]> wrote:
> Hi Andrew,
>
> under certain conditions you could solve this with a recursive SPIN function. 
> Assuming you have a way of accessing the sub-strings with an index, then you 
> could define a function that takes the index and the partial solution as 
> arguments, and then recursively calls itself (with index + 1) until it has 
> reached the end of the list, accumulating the results with fn:concat in each 
> recursion.
>
> So roughly:
>
> SPIN function my:strConcat
> Arguments: ?list, ?index, ?base
> body:
>
>         SELECT ?result
>         WHERE {
>                 ?list my:member ( ?element ?index ) .
>                 LET (?c := fn:concat(?base, ?element)) .
>                 LET (?result := my:strConcat(?list, ?index + 1, ?c)
>         }
>
> This requires though that the results are available in some triple form so 
> that you can walk the results (here: using a magic property my:member). [This 
> would work with magic SPIN properties if SPARQL would allow to place 
> variables in the OFFSET clause, but unfortunately it doesn't].
>
> Otherwise, I also see SPARQLMotion as the only option, because it provides 
> iteration modules and is - unlike SPARQL - stateful.
>
> Regards,
> Holger
>
> On Jan 12, 2010, at 11:25 AM, AndrewB wrote:
>
>
>
> > if i have a result set
>
> > a,bz
> > a,ha
>
> > Can I concatenate it into
>
> > a,bzha   ?
>
> > Maybe using spin?
>
> > Thanks!
>
> > -Andrew
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "TopBraid Composer Users" group.
> > 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 
> > athttp://groups.google.com/group/topbraid-composer-users?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
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-composer-users?hl=en.


Reply via email to