Hi Glenn,
Can you attach Macro definition, it would help in trouble-shooting. If you are using any non-public services, may be just remove the url and attach ?
You can also add a display diagnostic statement just after directinvoke to check if the results are coming back from service invocation .
thanks,
raj
raj. chief masher @ jackbe
Hi raj,
I have created mashups for yahoo finace stocks for some differnt industries like goog,int,ibm,msft...
I have added emml scripts industry by industry..but i need to add all in one loop like foreach......
can u help me for how can i do in one loop.? and also That also input types are i called in string..i have to sort by volume means it comes error..how can i convert particular data from string to number or integer?
Regards,
Kalai
Hi kalai,
#1 Can u provide bit more details in pseudo-code or so, to further clarify your problem scenario.
If the goal is to merge all results from each of the Mashups in a single Document, you can use EMML <merge/> statement to merge multiple documents(i.e., results from each mashup invocation) into a single document.
#2 You can use XPath cast functions in sort statement i.e.,
<sort inputvariable="mydocument" sortexpr="/stocks/stock" sortkeys="xs:decimal(volume) descending" sortdir="ascending" outputvariable="result" />
In the above snippet, volume is casted as decimal for sorting.
doc reference:
http://www.jackbe.com/prestodocs/v3.0/emml/sortRefCmd.html#BHIDCDED
hth.
raj. chief masher @ jackbe



Hi,
I've created an emml Macro based on the video tutorial, and one of the existing macros (GeoAnnotater).
The primary differences between my macro and the existing GeoAnnotater are that mine is a user type macro so it is visible in Wires, it loops over a repeating node in the input and it allows selection of the address fields.
When I test the macro using the command line technique shown in the video, Everything works fine and I get the expected lat/long results added to my input document.
I then copy the macro to global.emml-macros and restart presto. My new macro is available in wires and I add it to my mashup and wire it up.
When I look at the output of the Macro, the Lat/Long nodes are added from my <Annotate> command, but the values are null.
Is there some problem using <directinvoke> within a macro/action called from Wires? Is there any way for me debug this beyond the commandline technique in the video? It seems like the <directinvoke> is not returning anything, but I don't see any errors, just missing output.
Thanks,
Glenn
EDIT:
I found my problem. It had to do with the way that path variables are input from wires vs. the values I had used in testing. I was using an xpath replace() function to get a usable path. replace() uses a regular expression to match the value to be replaced. I was treating the input value from wires as a string to be matched, but replace() was treating it as a regular expression that didn't match anything. Switching to substring-after() resolved my issue.