Changeset 26022


Ignore:
Timestamp:
07/25/12 16:43:31 (9 years ago)
Author:
sjm84
Message:

Some improvements to the gsf:image statement

File:
1 edited

Legend:

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

    r26020 r26022  
    4646
    4747    <xsl:template match="gsf:image">
    48         <xsl:variable name="metaName">
     48        <xslt:variable name="metaName">
    4949            <xsl:choose>
    5050                <xsl:when test="@type = 'thumb'">Thumb</xsl:when>
     
    5252                <xsl:when test="@type = 'source'">SourceFile</xsl:when>
    5353            </xsl:choose>
    54         </xsl:variable>
    55         <xsl:if test="(.//metadataList)[last()]/metadata[@name = $metaName]">
     54        </xslt:variable>
     55        <xslt:if test="(.//metadataList)[last()]/metadata[@name = $metaName]">
    5656            <img>
    5757                <xslt:attribute name='src'>
     
    6060                    <xslt:value-of disable-output-escaping="yes" select="/page/pageResponse/document/metadataList/metadata[@name = 'assocfilepath']"/>
    6161                    <xsl:text>/</xsl:text>
    62                     <xsl:choose>
    63                         <xsl:when test="@type = 'thumb'">
    64                             <xslt:value-of disable-output-escaping="yes" select="(.//metadataList)[last()]/metadata[@name = 'Thumb']"/>
    65                         </xsl:when>
    66                         <xsl:when test="@type = 'screen'">
    67                             <xslt:value-of disable-output-escaping="yes" select="(.//metadataList)[last()]/metadata[@name = 'Screen']"/>
    68                         </xsl:when>
    69                         <xsl:when test="@type = 'source'">
    70                             <xslt:value-of disable-output-escaping="yes" select="(.//metadataList)[last()]/metadata[@name = 'SourceFile']"/>
    71                         </xsl:when>
    72                     </xsl:choose>
     62                    <xslt:value-of disable-output-escaping="yes" select="(.//metadataList)[last()]/metadata[@name = $metaName]"/>
    7363                </xslt:attribute>
    7464            </img>
    75         </xsl:if>
     65        </xslt:if>
    7666    </xsl:template>
    7767
Note: See TracChangeset for help on using the changeset viewer.