Ignore:
Timestamp:
2011-07-01T21:05:19+12:00 (13 years ago)
Author:
ak19
Message:

Thanks to Sam, Veronica and Dr Bainbridge, can finally commit the changes necessary for ticket 449.

File:
1 edited

Legend:

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

    r24198 r24219  
    7777    </xsl:choose>
    7878  </xsl:template>
    79  
     79
     80  <!-- calls a template in icons.xsl in order to avoid xsl vs xslt issue -->
     81  <xsl:template match="gsf:equivlinkgs3">
     82    <xslt:call-template name="equivDocLinks">
     83      <xslt:with-param name="count" select="0"/>
     84    </xslt:call-template>
     85  </xsl:template>
     86
     87  <!-- Another way: build all the equivalent document links for the current document in one go. No looping necessary: handled in function call. -->
     88  <!--<xsl:template match="gsf:equivlinkgs3">
     89    <xslt:variable name="docicon" select="metadataList/metadata[contains(@name, 'equivDocIcon')]"/>
     90    <xslt:variable name="docStartlink" select="metadataList/metadata[contains(@name, 'all_*,*_equivDocLink')]"/>   
     91    <xslt:variable name="docEndlink" select="metadataList/metadata[contains(@name, '/equivDocLink')]"/>
     92
     93    <xslt:variable name="equivDocLinks" select="java:org.greenstone.gsdl3.util.XSLTUtil.getEquivDocLinks(',',$docicon, $docStartlink, $docEndlink, ' ')" />
     94    <xslt:value-of disable-output-escaping="yes" select="$equivDocLinks"/>
     95  </xsl:template>-->
     96
     97<!--
     98In the collection's format statement, could have the following javascript+XSLT in place of
     99the gsf:equivlinkgs3 element (which resolves to the XSLT in config_format.xsl and icons.xsl).
     100<xsl:text disable-output-escaping="yes">&lt;script&gt;var equivDocIcon= [ &quot;
     101</xsl:text>
     102<gsf:metadata name="equivDocIcon" separator="&quot;, &quot;" multiple="true"/>
     103<xsl:text disable-output-escaping="yes">&quot;];var equivDocStartLink= [ &quot;
     104</xsl:text>
     105<gsf:metadata name="equivDocLink" separator="&quot;,&quot;" multiple="true"/>
     106<xsl:text disable-output-escaping="yes">&quot;];var equivDocEndLink= [ &quot;
     107</xsl:text>
     108<gsf:metadata name="/equivDocLink" separator="&quot;,&quot;" multiple="true"/>
     109<xsl:text disable-output-escaping="yes">&quot;];for (var i=0; i&lt;equivDocIcon.length; i++) { document.write(equivDocStartLink[i]+ equivDocIcon[i] + equivDocEndLink[i]); }&lt;/script&gt;
     110</xsl:text>
     111-->
     112
    80113  <xsl:template match="gsf:metadata[@format]">
    81114    <xslt:value-of disable-output-escaping="yes"><xsl:attribute name="select">java:org.greenstone.gsdl3.util.XSLTUtil.<xsl:value-of select="@format"/>(metadataList/metadata[@name='<xsl:apply-templates select="." mode="get-metadata-name"/>'], /page/@lang )</xsl:attribute></xslt:value-of>
Note: See TracChangeset for help on using the changeset viewer.