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 the values of the actual request path to the function arguments.
The following example represents contains a path annotation with three segments and two templates. One of the function arguments is further specified with a data type, which means that the value for <code>$variable</code> will be cast to an <code>xs:integer</code> before being bound:
<pre class="brush:xquery">