(: this script executes some long-running queries providing basic summaries about the repositories content. it is meant to be run once on dataset-changed, the results stored in cache :) import module namespace cmd-model = "http://spraakbanken.gu.se/clarin/xquery/model" at "xmldb:exist:///db/clarin/cmd-model.xqm"; let $model-max-depth := 8 (: clear cache :) (: get-collections :) let $dummy1 := cmd-model:get-collections('root', 'xml', 1), $dummy2 := cmd-model:get-collections('root', 'xml', 2) $dummy3 := cmd-model:get-collections('root', 'xml', 3) (: query-model:) let $components := cmd-model:query-model('Components', 'root', 'xml', 1) (: we have to iterate through the result and run the query-model for every child-term of Components; examples: ?q=teiHeader&maxdepth=8 ?q=olac&maxdepth=8 ?q=TextCorpusProfile&maxdepth=8 ?q=collection&maxdepth=8 :) for $comp-name in $components/Terms/Term/Term/@name let $dummy := cmd-model:query-model($comp-name, 'root', 'xml', $model-max-depth)