Here is an update, the @THUMBNAIL is only available for bitstreams that have a 
thumbnail generated by the system. See this this mets xml:

<mets:fileSec>
<mets:fileGrp USE="CONTENT">
<mets:file CHECKSUMTYPE="MD5" GROUPID="group_file_5375" ID="file_5375" 
MIMETYPE="image/jpeg" SIZE="4405" CHECKSUM="65822652647e210ef9c61caeb2f1eff0">
<mets:FLocat LOCTYPE="URL" xlink:title="0-0-0.jpg" xlink:type="locator" 
xlink:href="/bitstream/handle/stor/reg-2011-08-26--15-49-33-1212/0-0-0.jpg?sequence=1"/>
</mets:file>
</mets:fileGrp>
<mets:fileGrp USE="THUMBNAIL">
<mets:file CHECKSUMTYPE="MD5" GROUPID="group_file_5375" ID="file_9910" 
MIMETYPE="image/jpeg" SIZE="1979" CHECKSUM="2748c477d25072a224bc385d3d1a3dd5">
<mets:FLocat LOCTYPE="URL" xlink:title="0-0-0.jpg.jpg" xlink:label="Generated 
Thumbnail" xlink:type="locator" 
xlink:href="/bitstream/handle/stor/reg-2011-08-26--15-49-33-1212/0-0-0.jpg.jpg?sequence=3"/>
</mets:file>
</mets:fileGrp>
</mets:fileSec>

I want the data from CONTENT, as not all my items have the THUMBNAIL section. I 
tried this and I get nothing.  <xsl:value-of 
select="//mets:fileGrp[@USE=CONTENT]/mets:file/@MIMETYPE"/>

-Matt

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of helix84
Sent: Tuesday, February 12, 2013 11:39 AM
To: Drover, Matt
Cc: [email protected]
Subject: Re: [Dspace-tech] Getting mimetype from 
ancestor::mets:METS//mets:fileGrp[@USE='THUMBNAIL']...

Sorry, my previous example was wrong. This should work in your example 
(assuming the thumbnail exists):
<xsl:value-of select="//mets:fileGrp[@USE='THUMBNAIL']/mets:file/@MIMETYPE"/>

Unrelated to your question, do you have a particular reason to use "//"? I 
understand it's less efficient than the original code.
E.g. you basically used this:
//mets:fileGrp[@USE='THUMBNAIL']
instead of this:
$context/mets:fileSec/mets:fileGrp[@USE='THUMBNAIL']


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

Reply via email to