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

Last change on this file since 3655 was 3655, checked in by kjdon, 21 years ago

tidy up

  • Property svn:keywords set to Author Date Id Revision
File size: 4.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<xsl:variable name="collName" select="response/@from"/>
13<html>
14<xsl:call-template name="greenstoneHead"/>
15<body xsl:use-attribute-sets="body-style">
16<center>
17<xsl:apply-templates select="response/collection|response/serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
18</center>
19<xsl:call-template name="greenstoneFooter"/>
20</body>
21</html>
22</xsl:template>
23
24<xsl:template match="collection">
25<xsl:param name="collName">x</xsl:param>
26<xsl:call-template name="collectionPageBanner">
27<xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>
28<xsl:with-param name="collIcon"><xsl:value-of select="metadataList/metadata[@name='iconCollection']"/></xsl:with-param>
29</xsl:call-template>
30<p/><xsl:apply-templates select="metadataList">
31<xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>
32</xsl:apply-templates>
33<p/><xsl:apply-templates select="serviceList" mode="collection">
34<xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>
35</xsl:apply-templates>
36</xsl:template>
37
38<xsl:template match="serviceCluster">
39<xsl:param name="collName">x</xsl:param>
40<xsl:call-template name="clusterPageBanner">
41<xsl:with-param name="clusterName"><xsl:value-of select="$collName"/></xsl:with-param></xsl:call-template>
42<p/><xsl:apply-templates select="metadataList">
43<xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>
44</xsl:apply-templates>
45<p/><xsl:apply-templates select="serviceList" mode="cluster">
46<xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>
47</xsl:apply-templates>
48</xsl:template>
49
50
51
52<xsl:template match="metadataList">
53<xsl:param name="collName">coll-name</xsl:param>
54<h2><xsl:call-template name="text"><xsl:with-param name="key">about.description</xsl:with-param></xsl:call-template></h2>
55<p/>
56<table>
57<xsl:for-each select="metadata">
58<tr><td><b><xsl:value-of select="@name"/></b></td><td><xsl:value-of select="."/></td></tr>
59</xsl:for-each>
60</table>
61</xsl:template>
62
63<xsl:template match="serviceList" mode="collection">
64<xsl:param name="collName">coll-name</xsl:param>
65<xsl:variable name="library" select="ancestor::page/config/library_name"/>
66<h2><xsl:call-template name="text"><xsl:with-param name="key">about.services</xsl:with-param></xsl:call-template></h2>
67<table>
68<xsl:for-each select="service[@type='query']">
69<xsl:variable name="serviceName"><xsl:value-of select="@name"/></xsl:variable>
70<tr>
71<xsl:if test="contains($serviceName, 'Query')">
72<xsl:variable name="s-type"><xsl:value-of select="substring-before($serviceName, 'Query')"/></xsl:variable>
73<td><a href="{$library}?a=q&amp;sa={$s-type}&amp;c={$collName}"><xsl:value-of select="$serviceName"/></a></td>
74</xsl:if>
75<xsl:if test="contains($serviceName, 'Browse')">
76<xsl:variable name="s-type"><xsl:value-of select="substring-before($serviceName, 'Browse')"/></xsl:variable>
77<td><a href="{$library}?a=b&amp;sa={$s-type}&amp;c={$collName}"><xsl:value-of select="$serviceName"/></a></td>
78</xsl:if>
79<xsl:if test="contains($serviceName, 'Applet')">
80<xsl:variable name="s-type"><xsl:value-of select="substring-before($serviceName, 'Applet')"/></xsl:variable>
81<td><a href="{$library}?a=a&amp;sa=d&amp;s={$s-type}&amp;c={$collName}"><xsl:value-of select="$serviceName"/></a></td>
82</xsl:if>
83</tr>
84</xsl:for-each>
85</table>
86<xsl:call-template name="greenBar"/>
87</xsl:template>
88
89
90<xsl:template match="serviceList" mode="cluster">
91<xsl:param name="collName">coll-name</xsl:param>
92<xsl:variable name="library" select="ancestor::page/config/library_name"/>
93<h2><xsl:call-template name="text"><xsl:with-param name="key">about.services</xsl:with-param></xsl:call-template></h2>
94<table>
95<xsl:for-each select="service">
96<tr><td><a href="{$library}?a=pr&amp;sa=d&amp;c={$collName}&amp;s={@name}"><xsl:value-of select="@name"/></a></td></tr>
97</xsl:for-each>
98</table>
99<xsl:call-template name="greenBar"/>
100</xsl:template>
101
102</xsl:stylesheet>
103
Note: See TracBrowser for help on using the repository browser.