source: greenstone3/trunk/web/interfaces/default/transform/about.xsl@ 18316

Last change on this file since 18316 was 18316, checked in by kjdon, 15 years ago

indented the xml nicely.

  • 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"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:java="http://xml.apache.org/xslt/java"
5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 extension-element-prefixes="java util"
7 exclude-result-prefixes="java util">
8
9 <!-- style includes global params interface_name, library_name -->
10 <xsl:include href="style.xsl"/>
11
12 <xsl:output method="html"/>
13
14 <!-- the main page layout template is here -->
15 <xsl:template match="page">
16 <html>
17 <head>
18 <title>
19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
21 </title>
22 <xsl:call-template name="globalStyle"/>
23 <xsl:call-template name="pageStyle"/>
24 </head>
25 <body>
26 <div id="globalwrapper">
27 <xsl:call-template name="response" />
28 <xsl:call-template name="greenstoneFooter"/>
29 </div>
30 </body>
31 </html>
32 </xsl:template>
33
34 <xsl:template name="pageTitle">
35 <xsl:value-of select="/page/pageResponse/*/displayItem[@name='name']"/>
36 </xsl:template>
37
38 <!-- page specific style goes here -->
39 <xsl:template name="pageStyle"/>
40
41 <xsl:template match="pageResponse">
42 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
43 <xsl:apply-templates select="collection|serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
44 </xsl:template>
45
46 <xsl:template match="collection|serviceCluster">
47 <xsl:param name="collName"/>
48 <xsl:call-template name="standardPageBanner">
49 <xsl:with-param name="collName" select="$collName"/>
50 </xsl:call-template>
51 <xsl:call-template name="navigationBar">
52 <xsl:with-param name="collName" select="$collName"/>
53 </xsl:call-template>
54 <div id="content">
55 <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
56 <xsl:apply-templates select="serviceList">
57 <xsl:with-param name="collName" select="$collName"/>
58 </xsl:apply-templates>
59 </div>
60 </xsl:template>
61
62
63 <xsl:template match="serviceList">
64 <xsl:param name="collName"/>
65 <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3>
66 <xsl:choose>
67 <xsl:when test="service">
68 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
69 </xsl:when>
70 <xsl:otherwise>
71 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
72 </xsl:otherwise>
73 </xsl:choose>
74
75 <xsl:if test="service">
76 <ul id="servicelist">
77 <xsl:for-each select="service">
78 <xsl:variable name="action"><xsl:choose>
79 <xsl:when test="@type='query'">q</xsl:when>
80 <xsl:when test="@type='browse'">b</xsl:when>
81 <xsl:when test="@type='process'">pr</xsl:when>
82 <xsl:when test="@type='applet'">a</xsl:when>
83 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
84 </xsl:choose></xsl:variable>
85 <xsl:if test="$action !='DO_NOT_DISPLAY'">
86 <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
87 </xsl:if>
88 </xsl:for-each>
89 </ul>
90 </xsl:if>
91 </xsl:template>
92
93</xsl:stylesheet>
94
Note: See TracBrowser for help on using the repository browser.