HI, I tesed your code and it didn't display the mimetype. Here is what I have
in my template now. It displays the proper thumbnail for the bitstream, or the
default icon. I can can get all the details of the bitstream, except the mime
type. If there any docs explaining how to use/read the mets ?
<a class="image-link" href="{$href}">
<xsl:choose>
<xsl:when test="//mets:fileGrp[@USE='THUMBNAIL']">
<img alt="Thumbnail">
<xsl:attribute name="src">
<xsl:value-of
select="//mets:fileGrp[@USE='THUMBNAIL']/mets:file/mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<img alt="Icon" src="{concat($theme-path,
'/images/mime.png')}" style="height: {$thumbnail.maxheight}px;"/>
</xsl:otherwise>
</xsl:choose>
</a>
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of helix84
Sent: Tuesday, February 12, 2013 10:16 AM
To: Drover, Matt
Cc: [email protected]
Subject: Re: [Dspace-tech] Getting mimetype from
ancestor::mets:METS//mets:fileGrp[@USE='THUMBNAIL']...
On Tue, Feb 12, 2013 at 2:36 PM, Drover, Matt <[email protected]> wrote:
> Hi, I'm using this code to get the bitstream url:
> ancestor::mets:METS//mets:fileGrp[@USE='THUMBNAIL']/mets:file/mets:FLo
> cat[@LOCTYPE='URL']/@xlink:href
Hi Matt,
I'm not familiar with the ancestor:: syntax, but assuming you're using it
successfully, this should just work to get the mime type of the same bitstream:
ancestor::mets:METS//mets:fileGrp[@USE='THUMBNAIL']/mets:file/mets:FLocat[@LOCTYPE='URL']/@MIMETYPE
Regards,
~~helix84
Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-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