Cocoon And Manakin
From Dryad wiki
Revision as of 10:24, 23 March 2018 by Ryan Scherle
The DSpace user interface layer is called Manakin. It is based on Apache Cocoon.
- An "aspect" is a bit of java code that creates XML to be inserted into a page. Aspects usually represent things that are repeated on multiple pages (e.g., the user's login status and associated menu items)
- A "theme" applies XSL to create HTML, which dictates the content's basic layout. We use separate themes for the Dryad look-and-feel, and the DryadLab look-and-feel.
- CSS dictates how the layout is rendered.
To see basic Cocoon features in action, navigate to:
The code for these are in:
Flow of control
- the theme directs a call to the sitemap.xmap for each abstract that is active
- sitemap.xmap determines what Java classes to call
- A pipeline in the sitemap
- may include a selector (decides which section of a pipeline to follow)
- must have a generator and serializer.
- there are generators (see xmlui sitemap) for ORE, directory listing, reading a file, etc. -- e.g., org.dspace.app.xmlui.cocoon.?????OREGenerator
- may have an optional number of transformers in between
- may have "actions" -- like transformers, but don't output xml (they are intended to produce a side effect)
- may have matchers that turn pieces of the sitemap on and off for certain URLs.
- pipeline transformer classes modify the DRI
- the serializer runs the DRI through XSL in i18n
- the resultant page is sent to the browser, which may apply a CSS
- adding ?XSL to the URL is similar to adding /DRI, but it doesn't do the internationalization step -- so strings aren't replaced....
- sitemaps (or just one?) define the ordering of the compile-time overlays -- right now, the items in the "current directory" for the sitemap have precedence, then items explicitly defined in the sitemap, and finally other things from the mvn dependency analysis
- when you get an exception, you see all of the cocoon pieces that have run (not quite the same as a regular stack trace)