Hi Jose,
I assume you know what is DRI and how to view it for each page (speak
up if you don't).
There are basically two ways how you can add/change things in XSLT:
1) you find the content you want to replace or add something before/after it
2) you find something specific in DRI and create a template that matches it
So:
1) Usually you're orienting in page content by:
a) "id" or "name" attributes or specific attribute contents (like
style="...") you can search for in .xsl files
b) interface messages - In this case you have to remember that the
English text you see is in messages.xml, so you first look it up here
(e.g. "Go to DSpace home"), then you take the corresponding message
key ("xmlui.general.go_home") and search for it in the .xsl files
Here's the search command I use:
~/dspace-src/dspace-xmlui/src/main/webapp/themes/$ grep --color=auto
-RnI --exclude-dir=.git --exclude-dir=target "xmlui.general.go_home" *
2) An example of this approach is here:
https://wiki.duraspace.org/display/DSPACE/TechnicalFaq#TechnicalFaq-HowdoIremovethesearchboxfromthefrontpageinXMLUI?
You have to keep in mind that a more specific template, e.g.
<xsl:template name="disable_front-page-search"
match="dri:div[@id='aspect.discovery.SiteViewer.div.front-page-search']">
</xsl:template>
overrides a generic template
<xsl:template name="xyz" match="dri:div">
something here
</xsl:template>
So in this case, something that would be rendered from DRI by a
generic template (the search box) is overriden by an empty template
with a higher priority. So the result is that the search box will not
be displayed.
Now you know basically all I know. All you need is a little practice :)
Don't hesitate to ask if something is unclear. I'm sure you'll start
to like XSLT once you get to know it a little. The one thing to
remember is - it's not a programming language, it's a templating
(matching) language.
Regards,
~~helix84
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech