Old Release

This documentation relates to an old version of DSpace, version 6.x. Looking for another version? See all documentation.

Support for DSpace 6 ended on July 1, 2023.  See Support for DSpace 5 and 6 is ending in 2023

Two options for base templates to use

There are two main base templates you can use when creating an XMLUI Theme:

  • dri2xhtml - used in the generation of default Reference, Classic and Kubrick themes
  • dri2xhtml-alt - used in the generation of default Mirage theme

You only should use one of these two templates, based on which seems easier to you.

dri2xhtml

The dri2xhtml base template is the original template for creating XMLUI themes. It attempts to provide generic XSLT templates which are then applied across the entire DSpace site, thus making it easier to make site-wide changes.

The dri2xhtml base template is used in the following Themes:

  • Reference - the default XMLUI theme
  • Classic - an XMLUI theme which looks similar to JSPUI
  • Kubrick

Template Structure

The dri2xhtml base template consists of five main XSLTs:

  • dri2xhtml/structural.xsl - this XSLT is in charge of creating the main layout/page structure of every page within DSpace
  • dri2xhtml/General-Handler.xsl - this XSLT is in charge of displaying File download links throughout DSpace (it matches the METS <fileSec> element).
  • dri2xhtml/DIM-Handler.xsl - this XSLT is in charge of displaying all DIM (DSpace Intermediate Metadata) metadata throughout DSpace (it matches any DIM metadata in the METS). By default, this is the template used to display all metadata.
  • dri2xhtml/MODS-Handler.xsl - this XSLT is in charge of displaying all MODS metadata throughout DSpace (it matches any MODS metadata in the METS). By default, this template is not used, as MODS metadata is not generated by XMLUI by default.
  • dri2xhtml/QDC-Handler.xsl - this XSLT is in charge of displaying all Qualified Dublin Core (QDC) metadata throughout DSpace (it matches any QDC metadata in the METS). By default, this template is not used, as QDC metadata is not generated by XMLUI by default.

dri2xhtml-alt

The dri2xhtml-alt base template is an alternative template for creating XMLUI themes. It contains the same XSLT templates from dri2xhtml, but they are divided into multiple files and folders. Each file attempts to group XSLT templates together based on their function, in order to make it easier to find the templates related to the feature you're trying to modify.

The dri2xhtml-alt base template is used in the following Themes:

Configuration and Installation

The alternative basic templates is called "dri2xhtml-alt".
Any of the existing themes can be updated to reference this new set of templates by replacing in your theme.xsl:

<xsl:stylesheet xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
	xmlns:dri="http://di.tamu.edu/DRI/1.0/"
	xmlns:mets="http://www.loc.gov/METS/"
	xmlns:xlink="http://www.w3.org/TR/xlink/"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
	xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
	xmlns:xhtml="http://www.w3.org/1999/xhtml"
	xmlns:mods="http://www.loc.gov/mods/v3"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns="http://www.w3.org/1999/xhtml"
	exclude-result-prefixes="i18n dri mets xlink xsl dim xhtml mods dc">

    <!--
        comment out original dri2xhtml
        <xsl:import href="../dri2xhtml.xsl"/>
        and enable dri2xhtml-alt
    -->

    <xsl:import href="../dri2xhtml-alt/dri2xhtml.xsl"/>

    <xsl:output indent="yes"/>

Because the contents of dri2xhtml-alt is identical to the current dri2xhtml.xsl and its derivatives, updating any of the existing themes to reference the new dri2xhtml-alt should not impose any changes in the rendering of the pages.

Features

  • No changes to existing templates found in legacy dri2xhtml
  • Drops inclusion of Handlers other than DIM and Default
  • Templates divided out into files so they can be more easily located, divided by Aspect, Page and Functionality

Template Structure

/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes/dri2xhtml-alt/

├── aspect
│   ├── administrative
│   │   └── harvesting.xsl
│   ├── artifactbrowser
│   │   ├── COinS.xsl
│   │   ├── ORE.xsl
│   │   ├── artifactbrowser.xsl
│   │   ├── collection-list.xsl
│   │   ├── collection-view.xsl
│   │   ├── common.xsl
│   │   ├── community-list.xsl
│   │   ├── community-view.xsl
│   │   ├── item-list.xsl
│   │   └── item-view.xsl
│   └── general
│       └── choice-authority-control.xsl
├── core
│   ├── attribute-handlers.xsl
│   ├── elements.xsl
│   ├── forms.xsl
│   ├── global-variables.xsl
│   ├── navigation.xsl
│   ├── page-structure.xsl
│   └── utils.xsl
└── dri2xhtml.xsl
  • No labels