Hi Guillermo
I have only just joined this list and am not familiar with DSpace or its source
code yet, but I know XSLT and think I understand your confusion.
You seem to be looking at this file:
https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/webapp/themes/dri2xhtml.xsl
... and expecting to see another template to match dri:body, which you can
override (replace).
I think the instructions you link to are suggesting that this template should
be added to that file, rather than replacing a template within it. In terms of
the templates applied, the new template will override any others that already
apply to dri:body (subject to any other precedence in place). That's what
"override" means in that context.
So add that template code from the example after the <xsl:output/> element and
before the closing </xsl:stylesheet>.
Putting your overriding template in there will automatically give it a higher
precedence than templates in any other XSL files it imports. Template
precedence is explained briefly in section 1.2.2.4 of that tutorial:
https://wiki.duraspace.org/display/DSPACE/Manakin+theme+tutorial#Manakinthemetutorial-Overriderulesfortemplates:priority,importprecedence,andmodes.
Hope that all works for you and my lack of familiarity with DSpace does not
render this solution misguided!
Cheers
Hugh Barnes
Digital Access Coordinator
Library, Teaching and Learning
Ivey Hall
P O Box 85064
Lincoln University
Lincoln 7647
Christchurch
New Zealand
p +64 3 321 8924 | f +64 3 325 2944
e [email protected]<mailto:[email protected]> | w
lincoln.ac.nz<http://www.lincoln.ac.nz/>
Lincoln University, Te Whare Wanaka o Aoraki
New Zealand's Specialist Land-Based University
From: Guillermo Esteban Murillo Goussen [mailto:[email protected]]
Sent: Tuesday, 5 March 2013 10:02 a.m.
To: DSpace Tech
Subject: [Dspace-tech] Adding static pages
Hi! I'm trying to add some static pages to my DSpace installation (v3.1) later
I'll have to add a menu with links to this pages.
I'm following this tutorial, specifically the Cocoon-based method:
https://wiki.duraspace.org/display/DSPACE/Manakin+theme+tutorial
but when I got to the "override the <dri:body>" part, it says "edit
dri2xhtml.xsl with"
<xsl:template match="dri:body">
<xsl:variable name="meta"
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata"/>
<xsl:variable name="pageName"
select="$meta[@element='request'][@qualifier='URI']"/>
<xsl:variable name="doc" select="document(concat('pages/', $pageName,
'.xhtml'))"/>
<div id="ds-body">
<!-- when conditional to handle the call for {dspace-webhost}/about
-->
<xsl:choose>
<xsl:when
test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request'][@qualifier='URI']='about'">
<div>
<h1>This is a simple ABOUT page</h1>
<xsl:apply-templates />
</div>
</xsl:when>
[ e t c . . . ]
and I don't find anything like that on my different dri2xhtml.xsl files.
Can anyone help me? Thanks.
Guillermo Esteban Murillo Goussen
University of Costa Rica
www.kerwa.ucr.ac.cr<http://www.kerwa.ucr.ac.cr>
--
La pureza del alma no se pierde sin consentimiento
________________________________
P Please consider the environment before you print this email.
"The contents of this e-mail (including any attachments) may be confidential
and/or subject to copyright. Any unauthorised use,
distribution, or copying of the contents is expressly prohibited. If you have
received this e-mail in error, please advise the sender
by return e-mail or telephone and then delete this e-mail together with all
attachments from your system."
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette