!!!Break-down of flow The request goes through the following stages: {{{ browser 1 -> search-entries.xq - create one XInclude for each selected collection 2 -> search-coll-entries.xq - this is where the real search is done 3 <- return original XML wrapped in , in small chunks search-coll-entries2html.xsl - transforms original XML to standardised XML - wraps up everything in a
4 <- search-entries2html.xsl - all searches now collected and wrapped in XML from search-entries.xq - transforms the XML to final HTML 5 <- browser }}} Below we'll go through each step, and comment them in turn. The numbers at the arrows correspond to the sections below. !!!1 search-entries.xq This XQuery simply breaks up the list of selected collections, and creates one XInclude element for each, adding the collection as a new request parameter. The XIncludes are then processed by the sitemap. Further details in the [architecture section.|../archi/sitemap.html] !!!2 search-coll-entries.xq This is were the real search happens. This script builds the search using available request parameters, and returns chunks of the total result-set. The XQuery itself can be located in three places, and is searched for in this order (the path is only an example): # collection-specific: {{query/terms/SD-terms}} # type-specific: {{query/terms}} # general: {{query}} The most specific search will be used. The search results are wrapped in the following XML: {{{