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

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

using the from attribute in the response rather than the name attribute in the collection elem, for the collection name - this makes it relative to the current site, not just the local name

  • 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<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"><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">
34<xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>
35</xsl:apply-templates>
36</xsl:template>
37
38
39<xsl:template match="metadataList">
40<xsl:param name="collName">coll-name</xsl:param>
41<h2>Collection description</h2>
42<p/>
43<table>
44<xsl:for-each select="metadata">
45<tr><td><xsl:value-of select="@name"/></td><td><xsl:value-of select="."/></td></tr>
46</xsl:for-each>
47</table>
48</xsl:template>
49
50<xsl:template match="serviceList">
51<xsl:param name="collName">coll-name</xsl:param>
52<xsl:variable name="library" select="ancestor::page/config/library_name"/>
53<h2>Services available</h2>
54<table>
55<xsl:for-each select="service[@type='query']">
56<xsl:variable name="serviceName"><xsl:value-of select="@name"/></xsl:variable>
57<tr>
58<xsl:if test="contains($serviceName, 'Query')">
59<xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Query')"/></xsl:variable>
60<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/>
61<td><xsl:call-template name="text"><xsl:with-param name="key">common/search</xsl:with-param></xsl:call-template></td>
62<td><a href="{$library}?a=q&amp;sa={$lower-type}&amp;c={$collName}"><xsl:value-of select="$orig-type"/></a></td>
63</xsl:if>
64<xsl:if test="contains($serviceName, 'Browse')">
65<xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Browse')"/></xsl:variable>
66<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/>
67<td><xsl:call-template name="text"><xsl:with-param name="key">common/browse</xsl:with-param></xsl:call-template></td>
68<td><a href="{$library}?a=b&amp;sa={$lower-type}&amp;c={$collName}"><xsl:value-of select="$orig-type"/></a></td>
69</xsl:if>
70<xsl:if test="contains($serviceName, 'Applet')">
71<xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Applet')"/></xsl:variable>
72<td><xsl:call-template name="text"><xsl:with-param name="key">common/applet</xsl:with-param></xsl:call-template></td>
73<td><a href="{$library}?a=a&amp;sa=d&amp;sn={$orig-type}&amp;c={$collName}"><xsl:value-of select="$orig-type"/></a></td>
74</xsl:if>
75</tr>
76
77</xsl:for-each>
78</table>
79<xsl:call-template name="greenBar"/>
80</xsl:template>
81
82
83</xsl:stylesheet>
84
Note: See TracBrowser for help on using the repository browser.