declare %rest:path("hello/{$world}")
%rest:GET %rest:header-param("User-Agent", "{$agent}") function page:hello($world as xs:string, $agent as xs:string*) { <response> <title>Hello { $world }!</title> <info>You requested this page with { $agent }.</info> </response>};</pre>
If the URI http://localhost:8984/restxq/hello/world is accessed, the result will be kind of