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

Last change on this file since 18316 was 18316, checked in by kjdon, 15 years ago

indented the xml nicely.

  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 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="pageBanner"/>
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 name="pageBanner">
50 <div id="banner">
51 <p>
52 <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
53 </img>
54 </p>
55 </div>
56 <div id="content">
57 <xsl:call-template name="dividerBar">
58 <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
59 </xsl:call-template>
60 </div>
61 </xsl:template>
62
63 <xsl:template match="collectionList">
64 <ul id="collectionlist">
65 <xsl:for-each select="collection">
66 <li>
67
68 <xsl:choose>
69 <xsl:when test="displayItem[@name='icon']">
70 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
71 <img>
72 <xsl:attribute name="src">
73 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
74 </xsl:attribute>
75 <xsl:attribute name="alt">
76 <xsl:value-of select="displayItem[@name='name']"/>
77 </xsl:attribute>
78 </img>
79 </a>
80 </xsl:when>
81 <xsl:otherwise>
82 <a class="noimage" href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
83 <xsl:value-of select="displayItem[@name='name']"/>
84 </a>
85 </xsl:otherwise>
86 </xsl:choose>
87
88 </li>
89 </xsl:for-each>
90 </ul>
91 </xsl:template>
92
93 <xsl:template match="serviceClusterList">
94 <xsl:for-each select="serviceCluster">
95 <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>
96 </xsl:for-each>
97 </xsl:template>
98
99 <xsl:template match="service[@name='TextQuery']">
100 <div class="QuickSearch">
101 <form name="QuickSearch" method="get" action="{$library_name}">
102 <input type="hidden" name="a" value="q"/>
103 <input type="hidden" name="rt" value="rd"/>
104 <input type="hidden" name="s" value="{@name}"/>
105 <input type="hidden" name="s1.collection" value="all"/>
106 <input type="text" name="s1.query" size="20"/>
107 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/></xsl:attribute></input>
108 </form>
109 </div>
110 </xsl:template>
111
112 <xsl:template match="serviceList">
113 <xsl:call-template name="dividerBar"/>
114 <ul id="servicelist">
115 <xsl:for-each select="service[@type='query']">
116 <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>
117 </xsl:for-each>
118 <!--uncomment to display an authentication link-->
119 <!--<xsl:for-each select="service[@type='authen']">
120 <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>-->
121 <!--uncomment to display a library interface link-->
122 <!--<li><a href="{$library_name}?a=p&amp;sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li>-->
123 </ul>
124 </xsl:template>
125</xsl:stylesheet>
126
127
Note: See TracBrowser for help on using the repository browser.