- Timestamp:
- 2011-07-01T21:05:19+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/config_format.xsl
r24198 r24219 77 77 </xsl:choose> 78 78 </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 <!-- 98 In the collection's format statement, could have the following javascript+XSLT in place of 99 the gsf:equivlinkgs3 element (which resolves to the XSLT in config_format.xsl and icons.xsl). 100 <xsl:text disable-output-escaping="yes"><script>var equivDocIcon= [ " 101 </xsl:text> 102 <gsf:metadata name="equivDocIcon" separator="", "" multiple="true"/> 103 <xsl:text disable-output-escaping="yes">"];var equivDocStartLink= [ " 104 </xsl:text> 105 <gsf:metadata name="equivDocLink" separator="","" multiple="true"/> 106 <xsl:text disable-output-escaping="yes">"];var equivDocEndLink= [ " 107 </xsl:text> 108 <gsf:metadata name="/equivDocLink" separator="","" multiple="true"/> 109 <xsl:text disable-output-escaping="yes">"];for (var i=0; i<equivDocIcon.length; i++) { document.write(equivDocStartLink[i]+ equivDocIcon[i] + equivDocEndLink[i]); }</script> 110 </xsl:text> 111 --> 112 80 113 <xsl:template match="gsf:metadata[@format]"> 81 114 <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.