Ignore:
Timestamp:
2012-06-21T17:42:41+12:00 (12 years ago)
Author:
ak19
Message:

Asking for a piece of metadata like dc.Creator returns all values for dc.Creator. So multiple=true is always the case by default. No multiple=false was defined. Moreover, there was no way of getting a single value, which was the default in GS2 and which returned the first value for the requested metadata. Now multiple is no longer used, as all values are (still) returned by default. Instead the pos attribute has been introduced, which can be the terms first or last, or else it can be a number representing which value for that metadata needs to be returned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/config_format.xsl

    r25752 r25805  
    183183
    184184    <xsl:template match="gsf:metadata" mode="get-metadata-name">
    185         <xsl:if test="@multiple='true'">
    186             <xsl:text>all_</xsl:text>
     185        <xsl:if test="@pos">
     186            <xsl:text>pos</xsl:text>
     187            <xsl:value-of select='@pos'/>
     188            <xsl:text>_</xsl:text>
    187189        </xsl:if>
    188190        <xsl:if test='@select'>
     
    191193        </xsl:if>
    192194        <xsl:if test="@separator">
    193             <xsl:text>*</xsl:text>
     195            <xsl:text>*</xsl:text>
    194196            <xsl:value-of select='@separator'/>
    195197            <xsl:text>*_</xsl:text>
     
    197199        <xsl:value-of select="@name"/>
    198200    </xsl:template>
    199  
    200     <xsl:template match="gsf:metadata-old">
     201
     202    <xsl:template match="gsf:metadata-old" mode="get-metadata-name">
     203        <xsl:if test="@multiple='true'">
     204            <xsl:text>all_</xsl:text>
     205        </xsl:if>
     206        <xsl:if test='@select'>
     207            <xsl:value-of select='@select'/>
     208            <xsl:text>_</xsl:text>
     209        </xsl:if>
     210        <xsl:if test="@separator">
     211            <xsl:text>*</xsl:text>
     212            <xsl:value-of select='@separator'/>
     213            <xsl:text>*_</xsl:text>
     214        </xsl:if>
     215        <xsl:value-of select="@name"/>
     216    </xsl:template>
     217 
     218    <xsl:template match="gsf:metadata-older">
    201219        <xslt:value-of disable-output-escaping="yes">
    202220            <xsl:attribute name="select">
Note: See TracChangeset for help on using the changeset viewer.