Skip to content

Instantly share code, notes, and snippets.

@CliffordAnderson
Created March 27, 2015 17:29
Show Gist options
  • Save CliffordAnderson/5fa512fcc60e1a125263 to your computer and use it in GitHub Desktop.
Save CliffordAnderson/5fa512fcc60e1a125263 to your computer and use it in GitHub Desktop.
A working example of the Say-Howdy function
xquery version "3.0";
declare function local:say-howdy ($name as xs:string*) as xs:string
{
if (fn:count($name) >1) then "Howdy, " || fn:string-join($name, " and ") || "!"
else "Howdy, " || $name || "!"
};
(: local:say-howdy("Dave") :)
local:say-howdy(("Dave", "Laura"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment