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

Last change on this file since 3790 was 3788, checked in by mdewsnip, 21 years ago

collName variable is now obtained from paramList rather than response element. Also used shorter xsl:with-param syntax for specifying values.

  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 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="request/paramList/param[@name='c']/@value"/>
13<html>
14<xsl:call-template name="greenstoneHead"/>
15<body xsl:use-attribute-sets="body-style">
16<center>
17<table width='537'>
18<tr><td>
19<xsl:apply-templates select="response/collection|response/serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
20</td></tr></table>
21</center>
22<xsl:call-template name="greenstoneFooter"/>
23</body>
24</html>
25</xsl:template>
26
27<xsl:template match="collection|serviceCluster">
28<xsl:param name="collName">coll-name</xsl:param>
29<xsl:if test='name()="collection"'>
30<xsl:call-template name="collectionPageBanner">
31<xsl:with-param name="collName" select="$collName"/>
32<xsl:with-param name="collIcon" select="metadataList/metadata[@name='colIcon']"/>
33</xsl:call-template>
34</xsl:if>
35<xsl:if test='name()="serviceCluster"'>
36<xsl:call-template name="clusterPageBanner">
37<xsl:with-param name="clusterName" select="$collName"/>
38</xsl:call-template>
39</xsl:if>
40<p/><xsl:apply-templates select="metadataList">
41<xsl:with-param name="collName" select="$collName"/>
42</xsl:apply-templates>
43<p/><xsl:apply-templates select="serviceList">
44<xsl:with-param name="collName" select="$collName"/>
45</xsl:apply-templates>
46</xsl:template>
47
48
49<xsl:template match="metadataList">
50<xsl:param name="collName">coll-name</xsl:param>
51<h2><xsl:call-template name="text"><xsl:with-param name="key">about.description</xsl:with-param></xsl:call-template></h2>
52<p/>
53<table width='537'>
54<xsl:for-each select="metadata">
55<tr valign='top'><td><b><xsl:value-of select="@name"/></b></td><td><xsl:value-of select="."/></td></tr>
56</xsl:for-each>
57</table>
58</xsl:template>
59
60<xsl:template match="serviceList">
61<xsl:param name="collName">coll-name</xsl:param>
62<xsl:variable name="library" select="ancestor::page/config/library_name"/>
63<h2><xsl:call-template name="text"><xsl:with-param name="key">about.services</xsl:with-param></xsl:call-template></h2>
64<table>
65<xsl:for-each select="service">
66<xsl:variable name="action"><xsl:choose>
67 <xsl:when test="@type='query'">q</xsl:when>
68 <xsl:when test="@type='browse'">b</xsl:when>
69 <xsl:when test="@type='process'">pr</xsl:when>
70 <xsl:when test="@type='applet'">a</xsl:when>
71 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
72</xsl:choose></xsl:variable>
73<xsl:if test="$action !='DO_NOT_DISPLAY'">
74<tr><td><a href="{$library}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="@name"/></a></td></tr>
75</xsl:if>
76</xsl:for-each>
77</table>
78<xsl:call-template name="greenBar"/>
79</xsl:template>
80
81
82
83</xsl:stylesheet>
84
Note: See TracBrowser for help on using the repository browser.