xquery version "1.0";
declare namespace session="http://exist-db.org/xquery/session";
declare namespace util="http://exist-db.org/xquery/util";
declare namespace i18n="http://apache.org/cocoon/i18n/2.1";
import module namespace classmenu="http://www.risten.no/shared/classmenu" at "../xquery/classmenu.xqm";
(: Main function - retrieves some request attributes,
forks further processing to other defined functions depending
on the retrieved values :)
declare function local:main() as element()+
{ (: previous selections are stored in session attributes, and used
for preselecting the same values as in the previous edit :)
let $class := session:get-attribute("class" ),
$top := session:get-attribute("newrectop" ),
$mid := session:get-attribute("newrecmid" ),
$botm := session:get-attribute("newrecbotm"),
$lang := session:get-attribute("newreclang"),
$pos := session:get-attribute("newrecpos" ),
$date := current-dateTime()
return (
{ classmenu:get-classification("SD-class") }
)
};
{ let $start := util:system-time() return
(
local:main(),