On Wed, Apr 25, 2012 at 07:54, Evelthon Prodromou
<[email protected]> wrote:
> If i was to use that, where should i add that piece of code and how
> should i call it to have the generated hash value in item-view.xsl ?
Hi Evelthon,
actually there already is an MD5 checksum calculated for each
bitstream. It's easy to construct the URL in XSL - in your stylesheet
override the <xsl:template match="mets:file"> from item-view.xsl.
You'll need to add the
xmlns:util="org.dspace.app.xmlui.utils.XSLUtils"
xmlns:exdate="http://exslt.org/dates-and-times"
attributes to the stylesheet tag
and "util" and "exdate" to its "exclude-result-prefixes" attribute.
To construct the URL, use these values down in "a href":
<xsl:value-of select="@CHECKSUM"/>
<xsl:value-of select="exdate:date-time()"/>
That's the easy part - displaying the link. Now to actually make that
link work, you have to change
dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/sitemap.xmap
starting from
<map:match pattern="bitstream/handle/*/*/**">
to include the new parameters - checksum and timestamp.
Then you have to make use of those parameters in
[dspace-src]/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/cocoon/BitstreamReader.java
That should be enough to point you in the right direction.
Anyway, I'm wondering what's the reason you want to do this?
Regards,
~~helix84
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech