function page:search($term as xs:string) {
<ul>{
for $result in db:openpre('large-db')//*[text() = $term]
return <li>{ $result }</li>
}</ul>
declare %rest:path('/app/ok') function local:ok() {
'Stored documents: ' || count(db:openpre('app'))
};
</syntaxhighlight>
function page:cities() {
element cities {
db:openpre('factbook')//city/name
}
};