xquery version "1.0"; declare namespace util="http://exist-db.org/xquery/util"; declare namespace fn="http://exist-db.org/local-functions"; declare namespace i18n="http://apache.org/cocoon/i18n/2.1"; (: Main function - retrieves some request attributes, forks further processing to other defined functions depending on the retrieved values :) declare function fn:main() as element()+ { let $id := request:request-parameter("id", ""), $top := request:request-parameter("top", ""), $mid := request:request-parameter("mid", ""), $botm := request:request-parameter("botm", ""), $lang := request:get-session-attribute("entrylang"), $pos := request:get-session-attribute("pos"), $date := current-dateTime() return if(string-length($id) = 0) then

WARNING: There was an error with this request! Please check with the webmaster. Cause: No request record value.
ID = {$id}
Top = {$top}
Mid = {$mid}
Botm = {$botm}

else };
{ let $start := current-time() return ( fn:main(),

Søket tok { seconds-from-duration(current-time()-$start) } sekund.

) }