Files
DSpace/dspace/docs/html/XMLUI Base Theme Templates (dri2xhtml).html

182 lines
9.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>DSpace Documentation : XMLUI Base Theme Templates (dri2xhtml)</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
<tr>
<td valign="top" class="pagebody">
<div class="pageheader">
<span class="pagetitle">
DSpace Documentation : XMLUI Base Theme Templates (dri2xhtml)
</span>
</div>
<div class="pagesubheading">
This page last changed on Dec 15, 2010 by <font color="#0050B2">tdonohue</font>.
</div>
<h1><a name="XMLUIBaseThemeTemplates%28dri2xhtml%29-BaseTemplatesforCreatingXMLUIThemes"></a>Base Templates for Creating XMLUI Themes</h1>
<style type='text/css'>/*<![CDATA[*/
div.rbtoc1292432125383 {margin-left: 0px;padding: 0px;}
div.rbtoc1292432125383 ul {list-style: none;margin-left: 0px;}
div.rbtoc1292432125383 li {margin-left: 0px;padding-left: 0px;}
/*]]>*/</style><div class='rbtoc1292432125383'>
<ul>
<li><span class='TOCOutline'>1</span> <a href='#XMLUIBaseThemeTemplates%28dri2xhtml%29-dri2xhtml'>dri2xhtml</a></li>
<ul>
<li><span class='TOCOutline'>1.1</span> <a href='#XMLUIBaseThemeTemplates%28dri2xhtml%29-TemplateStructure'>Template Structure</a></li>
</ul>
<li><span class='TOCOutline'>2</span> <a href='#XMLUIBaseThemeTemplates%28dri2xhtml%29-dri2xhtmlalt'>dri2xhtml-alt</a></li>
<ul>
<li><span class='TOCOutline'>2.1</span> <a href='#XMLUIBaseThemeTemplates%28dri2xhtml%29-ConfigurationandInstallation'>Configuration and Installation</a></li>
<li><span class='TOCOutline'>2.2</span> <a href='#XMLUIBaseThemeTemplates%28dri2xhtml%29-Features'>Features</a></li>
<li><span class='TOCOutline'>2.3</span> <a href='#XMLUIBaseThemeTemplates%28dri2xhtml%29-TemplateStructure'>Template Structure</a></li>
</ul>
</ul></div>
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Two options for base templates to use</b><br />There are two main base templates you can use when creating an XMLUI Theme:
<ul>
<li><a href="#XMLUIBaseThemeTemplates%28dri2xhtml%29-dri2xhtml">dri2xhtml</a> - used in the generation of default Reference, Classic and Kubrick themes</li>
<li><a href="#XMLUIBaseThemeTemplates%28dri2xhtml%29-dri2xhtmlalt">dri2xhtml-alt</a> - used in the generation of default Mirage theme</li>
</ul>
<p>You only should use <b>one</b> of these two templates, based on which seems easier to you.</p></td></tr></table></div>
<h2><a name="XMLUIBaseThemeTemplates%28dri2xhtml%29-dri2xhtml"></a>dri2xhtml</h2>
<p>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. </p>
<p>The dri2xhtml base template is used in the following Themes:</p>
<ul>
<li>Reference - the default XMLUI theme</li>
<li>Classic - an XMLUI theme which looks similar to JSPUI</li>
<li>Kubrick</li>
</ul>
<h3><a name="XMLUIBaseThemeTemplates%28dri2xhtml%29-TemplateStructure"></a>Template Structure</h3>
<p>The dri2xhtml base template consists of five main XSLTs:</p>
<ul>
<li><tt>dri2xhtml/structural.xsl</tt> - this XSLT is in charge of creating the main layout/page structure of every page within DSpace</li>
<li><tt>dri2xhtml/General-Handler.xsl</tt> - this XSLT is in charge of displaying File download links throughout DSpace (it matches the METS &lt;fileSec&gt; element).</li>
<li><tt>dri2xhtml/DIM-Handler.xsl</tt> - 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.</li>
<li><tt>dri2xhtml/MODS-Handler.xsl</tt> - 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.</li>
<li><tt>dri2xhtml/QDC-Handler.xsl</tt> - 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.</li>
</ul>
<h2><a name="XMLUIBaseThemeTemplates%28dri2xhtml%29-dri2xhtmlalt"></a>dri2xhtml-alt</h2>
<p>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.</p>
<p>The dri2xhtml-alt base template is used in the following Themes:</p>
<ul>
<li><a href="Mirage Configuration and Customization.html" title="Mirage Configuration and Customization">Mirage</a></li>
</ul>
<h3><a name="XMLUIBaseThemeTemplates%28dri2xhtml%29-ConfigurationandInstallation"></a>Configuration and Installation</h3>
<p>The alternative basic templates is called "dri2xhtml-alt".<br/>
Any of the existing themes can be updated to reference this&nbsp;<font color="#222222">new</font>&nbsp;set of templates by replacing in your theme.xsl:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;xsl:stylesheet xmlns:i18n=<span class="code-quote">"http:<span class="code-comment">//apache.org/cocoon/i18n/2.1"</span>
</span> xmlns:dri=<span class="code-quote">"http:<span class="code-comment">//di.tamu.edu/DRI/1.0/"</span>
</span> xmlns:mets=<span class="code-quote">"http:<span class="code-comment">//www.loc.gov/METS/"</span>
</span> xmlns:xlink=<span class="code-quote">"http:<span class="code-comment">//www.w3.org/TR/xlink/"</span>
</span> xmlns:xsl=<span class="code-quote">"http:<span class="code-comment">//www.w3.org/1999/XSL/Transform"</span> version=<span class="code-quote">"1.0"</span>
</span> xmlns:dim=<span class="code-quote">"http:<span class="code-comment">//www.dspace.org/xmlns/dspace/dim"</span>
</span> xmlns:xhtml=<span class="code-quote">"http:<span class="code-comment">//www.w3.org/1999/xhtml"</span>
</span> xmlns:mods=<span class="code-quote">"http:<span class="code-comment">//www.loc.gov/mods/v3"</span>
</span> xmlns:dc=<span class="code-quote">"http:<span class="code-comment">//purl.org/dc/elements/1.1/"</span>
</span> xmlns=<span class="code-quote">"http:<span class="code-comment">//www.w3.org/1999/xhtml"</span>
</span> exclude-result-prefixes=<span class="code-quote">"i18n dri mets xlink xsl dim xhtml mods dc"</span>&gt;
&lt;!--
comment out original dri2xhtml
&lt;xsl:<span class="code-keyword">import</span> href=<span class="code-quote">"../dri2xhtml.xsl"</span>/&gt;
and enable dri2xhtml-alt
--&gt;
&lt;xsl:<span class="code-keyword">import</span> href=<span class="code-quote">"../dri2xhtml-alt/dri2xhtml.xsl"</span>/&gt;
&lt;xsl:output indent=<span class="code-quote">"yes"</span>/&gt;
</pre>
</div></div>
<p>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&nbsp;<font color="#222222">new</font>&nbsp;dri2xhtml-alt should not impose any changes in the rendering of the pages.</p>
<h3><a name="XMLUIBaseThemeTemplates%28dri2xhtml%29-Features"></a>Features</h3>
<ul>
<li>No changes to existing templates found in legacy dri2xhtml</li>
<li>Drops inclusion of Handlers other than DIM and Default</li>
<li>Templates divided out into files so they can be more easily located, divided by Aspect, Page and Functionality</li>
</ul>
<h3><a name="XMLUIBaseThemeTemplates%28dri2xhtml%29-TemplateStructure"></a>Template Structure</h3>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
/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
</pre>
</div></div>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="12" background="https://wiki.duraspace.org/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
</tr>
<tr>
<td align="center"><font color="grey">Document generated by Confluence on Dec 16, 2010 11:47</font></td>
</tr>
</table>
</body>
</html>