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