Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add reference to Manakin tutorial

...

Info
titleFor more information & diagrams

For a more detailed overview of XMLUI/Manakin, see the following resources:

The XMLUI (aka Manakin) is built on Apache Cocoon framework. The XMLUI uses Cocoon to provide a modular, extendable, tiered interface framework

...

  1. A user visits an XMLUI page (by clicking a link or button, etc)
  2. That request begins in the root Cocoon sitemap.xmap (located at [xmlui]/sitemap.xmap). This is the main entry point for all requests
    1. Within that sitemap, various URL path matching takes place. If the request is to download a document, that document is returned immediately.
    2. 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.xmapfile, which controls all the Themes.
      1. The themes.xmap file will then load all "matching" themes which are configured in your [dspace]/config/xmlui.xconf file (see #Themes below).
      2. If more than one theme matches the current URL path, then the first match wins
      3. Once a matching theme is located, that theme's sitemap.xmapfile (located in its theme directory) is loaded and processed.
        1. The theme's sitemap.xmapis 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}"/>
        2. 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).
  3. Back in the root sitemap, the "DRI/**" call is matched. This causes the [xmlui]/aspects/aspects.xmapfile to be loaded. As the name suggests, this file obviously controls all the Aspects.
    1. The aspects.xmap file will then load all enabled Aspects which are configured in your [dspace]/config/xmlui.xconf file (see #Aspects below).
    2. 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.
    3. When an Aspect is loaded, its sitemap.xmapis loaded & processed
      • 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]/
    4. 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, see more instructions for debugging in Manakin theme tutorial.
  4. 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).
  5. 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.
  6. 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.

...