Hi Scott,

Thanks, the tops:split function will replace my two function approach. For 
some reason I looked at it and thought it wouldn't handle a complex REGEX. 

I am surprised at the Javascript reasoning, Javascript has Arrays which are 
a special type of object. This single Array object can be returned so how 
that's handled in the return to Composer's code is where you could convert 
the Array object. What I'm saying is, its likely possible to use Arrays in 
returning MagicProperties from Javascript and having the spinx functions 
suggested it was possible. In any case, I don't need it but maybe worth 
documenting. 

Thanks,
Mark

On Tuesday, September 16, 2014 12:25:43 PM UTC-4, Scott Henninger wrote:
>
>  Mark, have you taken a look at the magic property spif:split? given any 
> regular expression as a separator, you can process a string, such as a list 
> of URLs into a result set.
>
> In terms of converting an array of return values into a CSV list/file, you 
> can use the SPARQLMotion sml:CreateSpreadsheet module to take a SPARQL 
> SELECT statement and turn it into a delimited string, which can then be 
> saved via sml:ExportToTextFile or returned as a service response via 
> sml:ReturnText.
>
> No, it is not the case that SPINx - SPIN functions that call JavaScript - 
> can be magic properties because JavaScript functions are functional - they 
> can only return one value.
>
> -- Scott
>
> On 9/16/2014, 10:22 AM, Mark van Berkel wrote:
>  
> I need a function to extract list of urls from a string and created a 
> javascript function to do it. When I set the javascript up as a Magic 
> Property (so I can return multiple values) I don't get the javascript code 
> triggered. The spinx:javaScriptCode and spinx:javaScriptFile properties are 
> present (the domain includes MagicProperties) but it would appear like 
> they're not supported. Is MagicProperties javascript supported?  
>
>  For context, I've setup successfully several spin:Functions using 
> Javascript. For testing the same functionality I setup a spin:Function and 
> can convert array of return values to a CSV list. 
>  -- 
> -- You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include Enterprise 
> Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid 
> Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
> To post to this group, send email to
> [email protected] <javascript:>
> To unsubscribe from this group, send email to
> [email protected] <javascript:>
> 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 Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>  

-- 
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, 
SPARQLMotion, SPARQL Web Pages 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 Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to