source: greenstone3/trunk/web/interfaces/gs2/transform/home.xsl@ 17019

Last change on this file since 17019 was 17019, checked in by max, 16 years ago

Move the HTML skeleton from style.xsl to the current XSL file.

  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 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 <!-- the main page layout template is here -->
15 <xsl:template match="page">
16 <html>
17 <head>
18 <title>
19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
21 </title>
22 <xsl:call-template name="globalStyle"/>
23 <xsl:call-template name="pageStyle"/>
24 </head>
25 <body class="bgimage">
26 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
27 <div id="page">
28 <xsl:apply-templates select="pageResponse"/>
29 <xsl:call-template name="greenstoneFooter"/>
30 </div>
31 </body>
32 </html>
33 </xsl:template>
34
35 <xsl:template name="pageTitle">
36 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
37 </xsl:template>
38
39 <!-- page specific style goes here -->
40 <xsl:template name="pageStyle"/>
41
42 <xsl:template match="pageResponse">
43 <xsl:call-template name="greenstonePageBanner"/>
44 <xsl:apply-templates select="collectionList"/>
45 <xsl:apply-templates select="serviceList"/>
46 </xsl:template>
47
48 <xsl:template match="collectionList">
49 <xsl:for-each select="collection">
50 <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>
51
52 <p>
53 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
54 <img width="150" border="1">
55 <xsl:attribute name="src">
56 <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>
57 </xsl:attribute>
58 <xsl:attribute name="alt">
59 <xsl:value-of select="displayItem[@name='name']"/>
60 </xsl:attribute>
61 </img>
62 </a>
63 </p>
64 </xsl:for-each>
65 <xsl:call-template name="collWarning"/>
66 </xsl:template>
67
68 <xsl:template name="collWarning">
69 <xsl:call-template name="dividerBar"/>
70 <div>
71 <xsl:value-of select="util:getInterfaceText('gs2', /page/@lang, 'home.coll_warning')"/>
72 </div>
73 </xsl:template>
74
75<xsl:template match="serviceList">
76 <!--<xsl:call-template name="dividerBar"/>-->
77 <ul id="servicelist">
78 <!--uncomment to display an authentication link-->
79 <!--<xsl:for-each select="service[@type='authen']">
80 <li><a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s={@name}&amp;s1.aup=Login&amp;s1.un=&amp;s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li> <br/> </xsl:for-each>-->
81 <!--uncomment to display a library interface link-->
82 <!--<li><a href="{$library_name}?a=p&amp;sa=gli4gs3">The Librarian Interface</a></li>-->
83 </ul>
84 </xsl:template>
85
86</xsl:stylesheet>
87
88
Note: See TracBrowser for help on using the repository browser.