(:~
 : This is a little DBA example query.
 : @author Christian Grün, BaseX GmbH, 2014-15
 :)

(:~
 : Creates a textual report from the specified XML node.
 : @param  $xml  xml input
 : @return report
 :)
declare function local:report($xml as element()) as xs:string+ {
  "Title: " || $xml//title,
  "Text : " || $xml//text
};

local:report(<xml>
  <title>Hello World</title>
  <text>This is a little example query.</text>
</xml>)