Page History
...
- A user visits an XMLUI page (by clicking a link or button, etc)
Wiki Markup That request begins in the root Cocoon {{sitemap.xmap}} (located at {{\[xmlui\]/sitemap.xmap}}). This is the main entry point for *all requests*
- Within that sitemap, various URL path matching takes place. If the request is to download a document, that document is returned immediately.
Wiki Markup However, in many cases, the request is for a page within the XMLUI. In this scenario, the root sitemap.xmap will load the {{\[xmlui\]/themes/themes.xmap}} file, which controls all the Themes.
Wiki Markup The {{themes.xmap}} file will then load all "matching" themes which are configured in your {{\[dspace\]/config/xmlui.xconf}} file (see [#Themes] below).
- If more than one theme matches the current URL path, then the first match wins
- Once a matching theme is located, that theme's
sitemap.xmap
file (located in its theme directory) is loaded and processed.- The theme's
sitemap.xmap
is in charge of actually loading the theme's XSLT, CSS, etc. However, before it does that, you'll notice it makes a call to generate the DRI document for the current page as follows:Code Block <map:generate type="file" src="cocoon://DRI/{1}"/>
- This DRI call generates a brand new, internal Cocoon request. This request is then processed back in the root
sitemap.xmap
(remember how we said that this sitemap is the main entry point for all requests).
- The theme's
Wiki Markup Back in the root sitemap, the "DRI/**" call is matched. This causes the {{\[xmlui\]/aspects/aspects.xmap}} file to be loaded. As the name suggests, this file obviously controls all the Aspects.
Wiki Markup The {{aspects.xmap}} file will then load all enabled Aspects which are configured in your {{\[dspace\]/config/xmlui.xconf}} file (see [#Aspects] below).
- Each aspect is loaded in the order that it appears. However, multiple aspects may be loaded for the same URL path. Remember, aspects can build upon each other (we call this an "aspect chain") as they work together to generate the final DRI document.
- When an Aspect is loaded, its
sitemap.xmap
is loaded & processedWiki Markup NOTE: An aspect's sitemap.xmap is actually compiled into the {{dspace-xmlui-api.jar}} file. However, if you have a copy of DSpace source handy, it can be found in: {{\[dspace-src]/dspace-xmlui/dspace-xmlui-api/src/main/resources/aspects/\[name-of-aspect\]/}}
- Each aspect is processed one-by-one (again in the order they are listed in
xmlui.xconf
). Each aspect may add, remove or change content within the DRI document. After the final aspect is finished processing, the DRI document is complete.- HINT: In the XMLUI you can always view the final DRI document by adding "?XML" or "&XML" on to the end of the current URL in your web browser.
- Once the final DRI document is complete (all aspects are done processing), the flow will return back to your Theme's
sitemap.xmap
(remember, this is the same location that triggered the loading of the Aspects in the first place). - At this point, your Theme's
sitemap.xmap
will continue its processing. Generally speaking, most themes will then perform one or more XSLT transformations (to transform the final DRI document into XHTML). They also may load up one or more CSS files to help stylize the final XHTML. - Finally, once the Theme has completed its processing (remember, only one theme is ever processed for a single request), the final generated XHTML document is displayed to the user.
...
Overview
Content Tools