-
Notifications
You must be signed in to change notification settings - Fork 0
/
text.concat.xml
39 lines (32 loc) · 1.27 KB
/
text.concat.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<sampleQuery>select text from {table} where text.key1 = "http://farm" and text.key3 = ".static.flickr.com/" and text.key5 = "/" and text.key7 = "_" and text.key9 = ".jpg" and (text.key2, text.key4, text.key6, text.key8) in (select farm, server, id, secret from flickr.photos.search where text = "fish");</sampleQuery>
<author>Tom Hughes-Croucher (@sh1mmer) croucher@yahoo-inc.com, Gabriel Barros gbarros@yahoo-inc.com</author>
</meta>
<bindings>
<select itemPath="" produces="XML">
<urls>
<url></url>
</urls>
<inputs>
<map id='text' type='xs:string' paramType='variable' required="true" />
</inputs>
<execute><![CDATA[
var results = "";
var keys = [];
for (k in text) {
keys.push(k);
}
keys.sort();
for (var i=0;i<keys.length;i++) {
key = keys[i];
value = text[key];
results += value;
}
results = <entry><text>{results}</text></entry>;
response.object = results;
]]></execute>
</select>
</bindings>
</table>