source: trunk/gsdl3/web/interfaces/default/transform/home.xsl@ 13505

Last change on this file since 13505 was 13505, checked in by shaoqun, 17 years ago

replaced some div tags with ul and li tags

  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 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 <xsl:template name="pageTitle">
15 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
16 </xsl:template>
17
18 <!-- page specific style goes here -->
19 <xsl:template name="pageStyle"/>
20
21 <xsl:template match="pageResponse">
22 <xsl:call-template name="greenstonePageBanner"/>
23 <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
24 <xsl:apply-templates select="collectionList"/>
25 <xsl:apply-templates select="serviceClusterList"/>
26 <xsl:apply-templates select="serviceList"/>
27 </xsl:template>
28
29 <xsl:template match="collectionList">
30 <ul id="collectionlist">
31 <xsl:for-each select="collection">
32 <li>
33 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
34
35 <img>
36 <xsl:attribute name="src">
37 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
38 </xsl:attribute>
39 <xsl:attribute name="alt">
40 <xsl:value-of select="displayItem[@name='name']"/>
41 </xsl:attribute>
42 </img>
43 </a>
44 </li>
45 </xsl:for-each>
46 </ul>
47 </xsl:template>
48
49 <xsl:template match="serviceClusterList">
50 <xsl:for-each select="serviceCluster">
51 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a>
52 </xsl:for-each>
53 </xsl:template>
54
55 <xsl:template match="service[@name='TextQuery']">
56 <div class="QuickSearch">
57 <form name="QuickSearch" method="get" action="{$library_name}">
58 <input type="hidden" name="a" value="q"/>
59 <input type="hidden" name="rt" value="rd"/>
60 <input type="hidden" name="s" value="{@name}"/>
61 <input type="hidden" name="s1.collection" value="all"/>
62 <input type="text" name="s1.query" size="20"/>
63 <input type="submit" value="Quick Search"/>
64 </form>
65 </div>
66 </xsl:template>
67
68 <xsl:template match="serviceList">
69 <xsl:call-template name="dividerBar"/>
70 <ul id="servicelist">
71 <xsl:for-each select="service[@type='query']">
72 <li><a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
73 </xsl:for-each>
74 </ul>
75 </xsl:template>
76</xsl:stylesheet>
77
78
Note: See TracBrowser for help on using the repository browser.