On Thu, Mar 28, 2013 at 5:42 PM, Srijan Deshpande <[email protected]> wrote:
> No this isn't working. I think the problem is that the default metadata
> schema (dc) is being referred to instead of my custom schema (hmo). For
> instance, I need the hmo.title field to be displayed in the search results
> instead of the dc.title field. How do I do this? How do I select which
> metadata schema Discovery uses for its filters and searches?

You're right, that wouldn't work. I just looked again and only the dc
schema goes into DRI's pageMeta. In order get metadata from other schemas,
you have to access the METS document.

Here's a snippet that would work in the said template (<xsl:template match=
"dim:dim" mode="itemSummaryList-DIM-file">) that selects hmo.title:

<xsl:variable name="metsURL">
  <xsl:text>cocoon://metadata/</xsl:text>
  <xsl:value-of
select="dim:field[@element='contributor'][@qualifier='author']"/>
  <xsl:text>/mets.xml</xsl:text></xsl:variable>
<xsl:variable name="title"
select="document($metsURL)/mets:METS/mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim/dim:field[@mdschema='hmo'][@element='title']"/>


I haven't actually tested it, but it should put you on the right track.

Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
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