source: trunk/gsdl3/web/interfaces/classic/transform/home.xsl@ 8532

Last change on this file since 8532 was 8532, checked in by kjdon, 19 years ago

tidied up the style stuff - now uses css. pageHead is now defined by style, with pageTitle and pageStyle in each page. got rid of the attribute sets and colors in style - uses css instead.

  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:java="http://xml.apache.org/xslt/java"
5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 extension-element-prefixes="java util"
7 exclude-result-prefixes="java util">
8
9 <!-- style includes global params interface_name, library_name -->
10 <xsl:include href="style.xsl"/>
11
12 <xsl:output method="html"/>
13
14 <xsl:template name="pageTitle">
15 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
16 </xsl:template>
17
18 <!-- page specific style goes here -->
19 <xsl:template name="pageStyle"/>
20
21
22 <xsl:template match="pageResponse">
23 <xsl:call-template name="greenstonePageBanner"/>
24 <xsl:apply-templates select="collectionList"/>
25 </xsl:template>
26
27 <xsl:template match="collectionList">
28 <xsl:for-each select="collection">
29 <xsl:variable name="ct"><xsl:choose><xsl:when test="metadataList/metadata[@name='buildType']='mgpp'">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:variable>
30
31 <p>
32 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
33 <img width="150" border="1">
34 <xsl:attribute name="src">
35 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:choose><xsl:when test="displayItem[@name='smallicon']"><xsl:value-of select="displayItem[@name='smallicon']"/></xsl:when><xsl:otherwise><xsl:value-of select="displayItem[@name='icon']"/></xsl:otherwise></xsl:choose>
36 </xsl:attribute>
37 <xsl:attribute name="alt">
38 <xsl:value-of select="displayItem[@name='name']"/>
39 </xsl:attribute>
40 </img>
41 </a>
42 </p>
43 </xsl:for-each>
44 <xsl:call-template name="collWarning"/>
45 <xsl:call-template name="dividerBar"/>
46 </xsl:template>
47
48 <xsl:template name="collWarning">
49 <p><xsl:value-of select="util:getInterfaceText('classic', /page/@lang, 'home.coll_warning')"/>
50 </p>
51 </xsl:template>
52</xsl:stylesheet>
53
54
Note: See TracBrowser for help on using the repository browser.