Manakin Reference

From Dryad wiki
Jump to: navigation, search

External References

External documents that pertain to Manakin:

  • The Manakin Developer's Guide is the essential reference, though it is badly outdated.
  • The Manakin page in the DSpace wiki.
  • (need to find a link for tutorial videos, particularly from OpenRepositories 2009)

Notes on Mirage-based theme

  • The Mirage.xsl controls the homepage and sends various pages to the various XSL files for rendering
  • Mirage/lib/xsl/core/page-structure.xsl controls the headers, footers, and general-purpose styling, including:
    • top-level menus
    • carousel behavior
    • home page sections?

Misc Notes

Some of these notes are available on the Flow of control (Manakin) page. This all needs to be cleaned up into more coherent text, and placed into a more central location.

  • Manakin notes
    • philosophy
      • Aspect creates XML, which describes content.
      • Theme applies XSL to create HTML, which dictates the content's basic layout.
      • CSS dictates how the layout is rendered.
      • JavaScript dictates how the rendering behaves.
    • samples
      • (repo)/xmltest/form/basic
      • (repo)/xmltest/form/inline
      • (repo)/xmltest/form/advanced
      • (repo)/xmltest/form/structural
      • (repo)/xmltest/form/HTML
    • how it works
      • theme directs a call to sitemap.xmap for each aspect
      • sitemap.xmap determines what classes to call
        • pipeline may include a selector (decides which section of a pipeline to follow)
        • pipeline must have a generator and serializer.
        • pipeline may have an optional number of transformers in between
        • all steps in a pipeline may be subject to matchers that turn pieces 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
          • (put this on the wiki)
    • it all ties together:
      • aspects, i8n, themes, use a standard naming convention
      • often the aspect will only insert structural tags and i8n messages into a document
    • browsing list
      • in DRI as aspect.artifactbrowser.Navigation.list.global
      • rendered by dri2html/structural.xsl (can just be removed)
    • static content
      • can be included in theme, but there needs to be a way to reference it.
      • all text goes through the internationaliztion module...
    • manakin processing begins with the theme.
      • The theme's sitemap sets up the order of processing, beginning with a call to a DRI URL to generate the full DRI content for this page.
      • The AspectMatcher determines which aspect to apply next.
      • sitemap.xmap (in dspace-xmlui/dspace-xmlui-api/src/main/resources/aspects) maps transformer steps to the actual classes, while submission.js provides some helper methods
    • aspects are controlled by aspects.xmap and themes are controlled by themes.xmap, but these are parameterized, and most configuration can be performed through xmlui.xconf.
    • static content is available via theme URL like:

http://datadryad.org/repo/themes/Dryad/myfile.txt

    • aspects modify DRI (any number of aspects may be used), and a theme transforms DRI into XHTML
    • raw DRI is available for any URL by inserting DRI like:

http://datadryad.org/repo/DRI/handle/10255/dryad.25

    • most themes are extensions of of dri2xhtml, in which
      • structural.xsl lays out the basic structure of the page
        • almost everything in here comes directly from the dri file, so changes must be made to the dri to affect what is rendered
      • DIM-Handler does all of the detailed metadata processing, but it can be overridden by the specific theme file
      • General-Handler does some processing of specific sections, like the logos, bitstreams, and thumbnails
    • to make a new aspect:
      • copy a sample class from dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect
        • the XMLTest aspect is a nice simple aspect to start with
        • it is helpful to copy both a "regular" class and the Navigation.java class (for adding menu items)
      • copy a sample sitemap from dspace-xmlui/dspace-xmlui-api/src/main/resources/aspects