source: greenstone3/trunk/web/interfaces/default/transform/home.xsl@ 17018

Last change on this file since 17018 was 17017, 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: 4.3 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>
26 <div id="globalwrapper">
27 <xsl:call-template name="response" />
28 <xsl:call-template name="greenstoneFooter"/>
29 </div>
30 </body>
31 </html>
32 </xsl:template>
33
34 <xsl:template name="pageTitle">
35 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
36 </xsl:template>
37
38 <!-- page specific style goes here -->
39 <xsl:template name="pageStyle"/>
40
41 <xsl:template match="pageResponse">
42 <xsl:call-template name="greenstonePageBanner"/>
43 <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
44 <xsl:apply-templates select="collectionList"/>
45 <xsl:apply-templates select="serviceClusterList"/>
46 <xsl:apply-templates select="serviceList"/>
47 </xsl:template>
48
49 <xsl:template match="collectionList">
50 <ul id="collectionlist">
51 <xsl:for-each select="collection">
52 <li>
53
54 <xsl:choose>
55 <xsl:when test="displayItem[@name='icon']">
56 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
57 <img>
58 <xsl:attribute name="src">
59 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
60 </xsl:attribute>
61 <xsl:attribute name="alt">
62 <xsl:value-of select="displayItem[@name='name']"/>
63 </xsl:attribute>
64 </img>
65 </a>
66 </xsl:when>
67 <xsl:otherwise>
68 <a class="noimage" href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
69 <xsl:value-of select="displayItem[@name='name']"/>
70 </a>
71 </xsl:otherwise>
72 </xsl:choose>
73
74 </li>
75 </xsl:for-each>
76 </ul>
77 </xsl:template>
78
79 <xsl:template match="serviceClusterList">
80 <xsl:for-each select="serviceCluster">
81 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a>
82 </xsl:for-each>
83 </xsl:template>
84
85 <xsl:template match="service[@name='TextQuery']">
86 <div class="QuickSearch">
87 <form name="QuickSearch" method="get" action="{$library_name}">
88 <input type="hidden" name="a" value="q"/>
89 <input type="hidden" name="rt" value="rd"/>
90 <input type="hidden" name="s" value="{@name}"/>
91 <input type="hidden" name="s1.collection" value="all"/>
92 <input type="text" name="s1.query" size="20"/>
93 <input type="submit" value="Quick Search"/>
94 </form>
95 </div>
96 </xsl:template>
97
98 <xsl:template match="serviceList">
99 <xsl:call-template name="dividerBar"/>
100 <ul id="servicelist">
101 <xsl:for-each select="service[@type='query']">
102 <li><a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
103 </xsl:for-each>
104 <!--uncomment to display an authentication link-->
105 <!--<xsl:for-each select="service[@type='authen']">
106 <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> </xsl:for-each>-->
107 <!--uncomment to display a library interface link-->
108 <!--<li><a href="{$library_name}?a=p&amp;sa=gli4gs3">The Librarian Interface</a></li>-->
109 </ul>
110 </xsl:template>
111</xsl:stylesheet>
112
113
Note: See TracBrowser for help on using the repository browser.