===Paths===
A resource function must have a single ''Path Annotation''. It will be called if a URL matches the path segments and templates specified as argument. ''Path templates'' contain variables in curly brackets, and map path values to arguments of the function. The following example represents a path annotation with three segments and two templates. One of the function arguments is further specified with a data type:
<pre class="brush:xquery">
declare %rest:path("/a/path/{$with}/some/{$variable}")
function($with, $variableas xs:integer) { ... };
</pre>
<!-- TODO how matching works -->