source: trunk/gsdl3/interfaces/default/transform/about.xsl@ 3436

Last change on this file since 3436 was 3436, checked in by kjdon, 22 years ago

now library name is read from config variables

  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4xmlns:java="http://xml.apache.org/xslt/java"
5extension-element-prefixes="java">
6
7<xsl:include href="style.xsl"/>
8
9<xsl:output method="html"/>
10
11<xsl:template match="page">
12<html>
13<xsl:call-template name="greenstoneHead"/>
14<body xsl:use-attribute-sets="body-style">
15<center>
16<xsl:apply-templates select="response/collection"/>
17</center>
18<xsl:call-template name="greenstoneFooter"/>
19</body>
20</html>
21</xsl:template>
22
23<xsl:template match="collection">
24
25<xsl:call-template name="collectionPageBanner">
26<xsl:with-param name="collName"><xsl:value-of select="@name"/></xsl:with-param>
27<xsl:with-param name="collIcon"><xsl:value-of select="metadataList/metadata[@name='iconCollection']"/></xsl:with-param>
28</xsl:call-template>
29<p/><xsl:apply-templates select="metadataList">
30<xsl:with-param name="collName"><xsl:value-of select="@name"/></xsl:with-param>
31</xsl:apply-templates>
32<p/><xsl:apply-templates select="serviceList">
33<xsl:with-param name="collName"><xsl:value-of select="@name"/></xsl:with-param>
34</xsl:apply-templates>
35</xsl:template>
36
37
38<xsl:template match="metadataList">
39<xsl:param name="collName">coll-name</xsl:param>
40<h2>Collection description</h2>
41<p/>
42<table>
43<xsl:for-each select="metadata">
44<tr><td><xsl:value-of select="@name"/></td><td><xsl:value-of select="."/></td></tr>
45</xsl:for-each>
46</table>
47</xsl:template>
48
49<xsl:template match="serviceList">
50<xsl:param name="collName">coll-name</xsl:param>
51<xsl:variable name="library" select="ancestor::page/config/library_name"/>
52<h2>Services available</h2>
53<table>
54<xsl:for-each select="service[@type='query']">
55<xsl:variable name="serviceName"><xsl:value-of select="@name"/></xsl:variable>
56<tr>
57<xsl:if test="contains($serviceName, 'Query')">
58<xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Query')"/></xsl:variable>
59<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/>
60<td><xsl:call-template name="text"><xsl:with-param name="key">common/search</xsl:with-param></xsl:call-template></td>
61<td><a href="{$library}?a=q&amp;sa={$lower-type}&amp;c={$collName}"><xsl:value-of select="$orig-type"/></a></td>
62</xsl:if>
63<xsl:if test="contains($serviceName, 'Browse')">
64<xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Browse')"/></xsl:variable>
65<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/>
66<td><xsl:call-template name="text"><xsl:with-param name="key">common/browse</xsl:with-param></xsl:call-template></td>
67<td><a href="{$library}?a=b&amp;sa={$lower-type}&amp;c={$collName}"><xsl:value-of select="$orig-type"/></a></td>
68</xsl:if>
69<xsl:if test="contains($serviceName, 'Applet')">
70<xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Applet')"/></xsl:variable>
71<td><xsl:call-template name="text"><xsl:with-param name="key">common/applet</xsl:with-param></xsl:call-template></td>
72<td><a href="{$library}?a=a&amp;sa=d&amp;sn={$orig-type}&amp;c={$collName}"><xsl:value-of select="$orig-type"/></a></td>
73</xsl:if>
74</tr>
75
76</xsl:for-each>
77</table>
78<xsl:call-template name="greenBar"/>
79</xsl:template>
80
81
82</xsl:stylesheet>
83
Note: See TracBrowser for help on using the repository browser.