Skip to content

Instantly share code, notes, and snippets.

@eedeebee
Created January 14, 2011 01:44
Show Gist options
  • Select an option

  • Save eedeebee/779001 to your computer and use it in GitHub Desktop.

Select an option

Save eedeebee/779001 to your computer and use it in GitHub Desktop.
Snippet #3 from Adding Maps to an AppBuilder application
xquery version "1.0-ml";
<locations>
{
let $pins := cts:search(/pin, cts:element-query(xs:QName("location"), cts:and-query(())))
for $pin in $pins
where fn:exists($pin/location/lat)
return
<location>
<url>/detail{fn:base-uri($pin)}</url>
<name>{$pin/name/text()}</name>
<lat>{$pin/location/lat/text()}</lat>
<long>{$pin/location/long/text()}</long>
</location>
}</locations>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment