xquery version "1.0"; import module namespace request="http://exist-db.org/xquery/request"; import module namespace xdb = "http://exist-db.org/xquery/xmldb"; import module namespace correction="http://exist-db.org/xquery/rebind/correction" at "correction.xqm"; if (starts-with($exist:path, "/backups")) then let $user := xdb:get-current-user() return if (not(xdb:is-admin-user($user))) then else else if ($exist:path eq "/") then else if ($exist:resource eq "admin.xql") then ( let $panel := request:get-parameter("panel", ()) return { if ($panel eq 'install') then (: Apply xsltforms.xsl stylesheet :) else if ($panel eq 'correction') then ( correction:dispatch() )else() } ) else if ($exist:resource eq "report.xql") then ( ) else if ($exist:resource eq "validation.xql") then ( (: paths starting with /libs/ will be loaded from the webapp directory on the file system :) ) else if (starts-with($exist:path, "/libs/")) then else if (contains($exist:path, "$shared/")) then else