Changeset 29769

Show
Ignore:
Timestamp:
09.03.2015 14:44:00 (5 years ago)
Author:
kjdon
Message:

added in support for sorting gsf:foreach-metadata. Can add @sort=true, or <gsf:sort/> element. gsf:sort just mirrors xsl:sort element. see wiki page for details en:user:list_of_format_options

Files:
1 modified

Legend:

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

    r29271 r29769  
    543543      <xsl:attribute name="select"> 
    544544    (<xsl:if test="@type='collection'">/page/pageResponse/collection/</xsl:if>.//metadataList)[last()]/metadata[@name='<xsl:value-of select="$meta_name"/>'<xsl:if test="@lang"><xsl:text> and @lang=</xsl:text><xsl:value-of select="@lang"/></xsl:if><xsl:text>]</xsl:text> 
    545       </xsl:attribute><xsl:if test='@separator'><xslt:if test='position()>1'><xsl:value-of select='@separator'/></xslt:if></xsl:if> 
     545      </xsl:attribute><xsl:choose><xsl:when test='@sort'><xslt:sort/></xsl:when><xsl:when test="gsf:sort"><xslt:sort><xsl:copy-of select="gsf:sort/@*"/></xslt:sort></xsl:when></xsl:choose><xsl:if test='@separator'><xslt:if test='position()>1'><xsl:value-of select='@separator'/></xslt:if></xsl:if> 
    546546      <xsl:apply-templates/> 
    547547    </xslt:for-each>