Thanks, Fabio. Much cleaner.

Jason Fowler, CA, MSLS
Archives and Special Collections Librarian
The Southern Baptist Theological Seminary
[email protected]
________________________________________
From: Fabio N. Kepler [[email protected]]
Sent: Tuesday, December 15, 2009 1:21 PM
To: Jason Fowler
Cc: [email protected]
Subject: Re: [Dspace-tech] Item preview in xmlui

Jason,

You're welcome.

The following works:
ancestor::mets:METS//mets:fileg...@use='THUMBNAIL']

And also:
ancestor::mets:METS/mets:fileSec/mets:fileg...@use='THUMBNAIL']

But there are probably better solutions.



On Tue, Dec 15, 2009 at 15:46, Jason Fowler 
<[email protected]<mailto:[email protected]>> wrote:
Fabio,

Thanks for your help. That solution didn't work for me, but I figured out the 
problem. The lines that directly preceded my section read

<xsl:template match="dim:dim" mode="itemSummaryView-DIM">
       <table class="ds-includeSet-table">

Since it was matching the dim:dim portion of the DIM, I was already below the 
element I needed. I simply traversed the DOM back up four levels (ie. 
../../../../), and it works now. It's a bit of a hack, but it works. I would 
welcome any suggestions for how to clean it up.

My code now looks like this:

<xsl:template match="dim:dim" mode="itemSummaryView-DIM">
       <table class="ds-includeSet-table">

           <tr class="ds-table-row odd">
               <td><span 
class="bold"><i18n:text>xmlui.dri2xhtml.METS-1.0.item-preview</i18n:text>:</span></td>
               <td>
                   <xsl:choose>
                       <xsl:when 
test="../../../../mets:fileSec/mets:fileg...@use='THUMBNAIL']">
                           <a class="image-link">
                               <xsl:attribute name="href"><xsl:value-of 
select="@OBJID"/></xsl:attribute>
                               <img alt="Thumbnail">
                                   <xsl:attribute name="src">
                                       <xsl:value-of 
select="../../../../mets:fileSec/mets:fileg...@use='THUMBNAIL']/
                                           
mets:file/mets:floc...@loctype='URL']/@xlink:href"/>
                                   </xsl:attribute>
                               </img>
                           </a>
                       </xsl:when>
                       <xsl:otherwise>
                           
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-preview</i18n:text>
                       </xsl:otherwise>
                   </xsl:choose>
               </td>
           </tr>



Jason Fowler, CA, MSLS
Archives and Special Collections Librarian
The Southern Baptist Theological Seminary
[email protected]<mailto:[email protected]>
________________________________________
From: Fabio N. Kepler [[email protected]<mailto:[email protected]>]
Sent: Tuesday, December 15, 2009 10:34 AM
To: Jason Fowler
Subject: Re: [Dspace-tech] Item preview in xmlui

Jason,

And if you insert

[...@groupid=current()/@GROUPID]/

between mets:fileSec/ and  mets:mets:floc...@loctype='URL']?

We use the code below (which is very similar to yours) and it works.


           <td>
               <xsl:choose>
                   <xsl:when 
test="($context/mets:fileSec/mets:fileg...@use='THUMBNAIL'])">
                       <a class="image-link">
                           <xsl:attribute name="href">
                               <xsl:value-of 
select="mets:floc...@loctype='URL']/@xlink:href"/>
                           </xsl:attribute>
                           <img alt="Thumbnail">
                               <xsl:attribute name="src">
                                   <xsl:value-of 
select="$context/mets:fileSec/mets:fileg...@use='THUMBNAIL']/mets:fi...@groupid=current()/@GROUPID]/mets:floc...@loctype='URL']/@xlink:href"/>
                               </xsl:attribute>
                           </img>
                       </a>
                   </xsl:when>
                   <xsl:otherwise>
                       
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-preview</i18n:text>
                   </xsl:otherwise>
               </xsl:choose>
           </td>



On Tue, Dec 15, 2009 at 13:11, Jason Fowler 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
 wrote:
Fred,

Thanks for the suggestion. This actually uses a different piece of code. It is 
below.

              <td>
                  <xsl:choose>
                      <xsl:when 
test="mets:fileSec/mets:fileg...@use='THUMBNAIL']">
                          <a class="image-link">
                              <xsl:attribute name="href"><xsl:value-of 
select="@OBJID"/></xsl:attribute>
                              <img alt="Thumbnail">
                                  <xsl:attribute name="src">
                                      <xsl:value-of 
select="mets:fileSec/mets:fileg...@use='THUMBNAIL']/
                                          
mets:file/mets:floc...@loctype='URL']/@xlink:href"/>
                                  </xsl:attribute>
                              </img>
                          </a>
                      </xsl:when>
                      <xsl:otherwise>
                          
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-preview</i18n:text>
                      </xsl:otherwise>
                  </xsl:choose>
              </td>



Jason Fowler, CA, MSLS
Archives and Special Collections Librarian
The Southern Baptist Theological Seminary
Vice President, ALABI
502-897-4573
[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
________________________________________
From: Fabio N. Kepler 
[[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
Sent: Monday, December 14, 2009 7:03 PM
To: Jason Fowler
Subject: Re: [Dspace-tech] Item preview in xmlui

Hi, Jason.

Check this thread. Maybe it's the same issue.

http://sourceforge.net/mailarchive/message.php?msg_name=4D8CF9806D2E52409A9E0D1AB3D8C61A5F0A2DE2F8%40MAIL04.austin.utexas.edu

Regards,
Fabio


On Mon, Dec 14, 2009 at 19:46, Jason Fowler 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>><mailto:[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>>
 wrote:
Hi all,

We're running DSpace 1.5.2 with xmlui, and we're using a modified version of 
the reference theme. We would like to have previews on the simple item view. I 
have uncommented what I thought was the appropriate section of the 
itemSummaryView-DIM to make thumbnails appear there. We have the appropriate 
thumbnail bitstreams generated for our images and we have the appropriate 
permissions in place. Unfortunately, DSpace still returns the "No preview 
available" message.

Does anyone have any suggestions for what steps I should take to make this work?

Thanks,

Jason Fowler, CA, MSLS
Archives and Special Collections Librarian
The Southern Baptist Theological Seminary
[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>><mailto:[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
DSpace-tech mailing list
[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>><mailto:[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
https://lists.sourceforge.net/lists/listinfo/dspace-tech



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
DSpace-tech mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/dspace-tech


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to