xquery version "3.0"; declare variable $exist:path external; declare variable $exist:resource external; declare variable $exist:controller external; declare variable $exist:prefix external; declare variable $exist:root external; if ($exist:path eq "/") then (: forward root path to index.xql :) else if (ends-with($exist:resource, ".html")) then (: the html page is run through view.xql to expand templates :) (: Requests for javascript libraries are resolved to the file system :) else if (contains($exist:path, "/libs/")) then else (: everything else is passed through :)