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

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

added stuff for applets

  • 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"
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<h2>Services available</h2>
52<table>
53<xsl:for-each select="service[@type='query']">
54<xsl:variable name="serviceName"><xsl:value-of select="@name"/></xsl:variable>
55<tr>
56<xsl:if test="contains($serviceName, 'Query')">
57<xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Query')"/></xsl:variable>
58<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/>
59<td><xsl:call-template name="text"><xsl:with-param name="key">common/search</xsl:with-param></xsl:call-template></td>
60<td><a><xsl:attribute name="href">library?a=q&amp;sa=<xsl:value-of select="$lower-type"/>&amp;c=<xsl:value-of select="$collName"/></xsl:attribute><xsl:value-of select="substring-before($serviceName, 'Query')"/></a></td>
61</xsl:if>
62<xsl:if test="contains($serviceName, 'Browse')">
63<xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Browse')"/></xsl:variable>
64<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/>
65<td><xsl:call-template name="text"><xsl:with-param name="key">common/browse</xsl:with-param></xsl:call-template></td>
66<td><a><xsl:attribute name="href">library?a=b&amp;sa=<xsl:value-of select="$lower-type"/>&amp;c=<xsl:value-of select="$collName"/></xsl:attribute><xsl:value-of select="substring-before($serviceName, 'Browse')"/></a></td>
67</xsl:if>
68<xsl:if test="contains($serviceName, 'Applet')">
69<xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Applet')"/></xsl:variable>
70<td><xsl:call-template name="text"><xsl:with-param name="key">common/applet</xsl:with-param></xsl:call-template></td>
71<td><a><xsl:attribute name="href">library?a=a&amp;sa=d&amp;sn=<xsl:value-of select="$orig-type"/>&amp;c=<xsl:value-of select="$collName"/></xsl:attribute><xsl:value-of select="$orig-type"/></a></td>
72</xsl:if>
73</tr>
74
75</xsl:for-each>
76</table>
77<xsl:call-template name="greenBar"/>
78</xsl:template>
79
80
81</xsl:stylesheet>
82
Note: See TracBrowser for help on using the repository browser.