1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 |
|
---|
3 | <xsl:stylesheet version="1.0"
|
---|
4 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
5 | xmlns:gslib="http://www.greenstone.org/XSL/Library"
|
---|
6 | exclude-result-prefixes="xalan gslib gsf xslt">
|
---|
7 |
|
---|
8 |
|
---|
9 | <xsl:output method="html"
|
---|
10 | doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
|
---|
11 | doctype-system="http://www.w3.org/TR/html4/loose.dtd"
|
---|
12 | />
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 | <!-- some global parameters - these are set by whoever is invoking the transformation -->
|
---|
17 | <xsl:param name="interface_name"/>
|
---|
18 | <xsl:param name="library_name"/>
|
---|
19 |
|
---|
20 | <!-- every pages ....................................................................... -->
|
---|
21 |
|
---|
22 | <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/></xsl:variable>
|
---|
23 | <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
|
---|
24 |
|
---|
25 | <xsl:template name="GS2LibDividerBar">
|
---|
26 | <xsl:param name='text'/>
|
---|
27 | <xsl:choose>
|
---|
28 | <xsl:when test="$text">
|
---|
29 | <div class="divbar"><xsl:value-of select="$text"/></div>
|
---|
30 | </xsl:when>
|
---|
31 | <xsl:otherwise>
|
---|
32 | <div class="divbar"><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text></div>
|
---|
33 | </xsl:otherwise>
|
---|
34 | </xsl:choose>
|
---|
35 | </xsl:template>
|
---|
36 |
|
---|
37 | <xsl:template match="error">
|
---|
38 | Error: <xsl:value-of select="."/>
|
---|
39 | </xsl:template>
|
---|
40 |
|
---|
41 | <!-- site home ....................................................................... -->
|
---|
42 |
|
---|
43 |
|
---|
44 | <xsl:template name="pageTitleLanguageDependant">
|
---|
45 | <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
|
---|
46 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/><xsl:text> </xsl:text>
|
---|
47 | </xsl:template>
|
---|
48 |
|
---|
49 |
|
---|
50 | <xsl:template name="greenstoneLogoAlternateText">
|
---|
51 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
|
---|
52 | </xsl:template>
|
---|
53 |
|
---|
54 |
|
---|
55 | <xsl:template name="collectionLinkWithImage">
|
---|
56 | <xsl:choose>
|
---|
57 | <xsl:when test="displayItem[@name='icon']">
|
---|
58 | <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
|
---|
59 | <img>
|
---|
60 | <xsl:attribute name="src">
|
---|
61 | <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
|
---|
62 | </xsl:attribute>
|
---|
63 | <xsl:attribute name="alt">
|
---|
64 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
65 | </xsl:attribute>
|
---|
66 | </img>
|
---|
67 | </a>
|
---|
68 | </xsl:when>
|
---|
69 | <xsl:otherwise>
|
---|
70 | <a class="noimage" href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
|
---|
71 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
72 | </a>
|
---|
73 | </xsl:otherwise>
|
---|
74 | </xsl:choose>
|
---|
75 | </xsl:template>
|
---|
76 |
|
---|
77 |
|
---|
78 | <xsl:template name="quickSearchForm">
|
---|
79 | <form name="QuickSearch" method="get" action="{$library_name}">
|
---|
80 | <input type="hidden" name="a" value="q"/>
|
---|
81 | <input type="hidden" name="rt" value="rd"/>
|
---|
82 | <input type="hidden" name="s" value="{/page/pageResponse/serviceList/service[@name='TextQuery']/@name}"/>
|
---|
83 | <input type="hidden" name="s1.collection" value="all"/>
|
---|
84 | <input type="text" name="s1.query" size="20"/>
|
---|
85 | <input type="submit" value="Quick Search"/>
|
---|
86 | </form>
|
---|
87 | </xsl:template>
|
---|
88 |
|
---|
89 |
|
---|
90 | <xsl:template match="serviceClusterList">
|
---|
91 | <xsl:for-each select="serviceCluster">
|
---|
92 | <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>
|
---|
93 | </xsl:for-each>
|
---|
94 | </xsl:template>
|
---|
95 |
|
---|
96 | <xsl:template name="test" match="pageResponse/serviceList">
|
---|
97 | <xsl:for-each select="service[@type='query']">
|
---|
98 | <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']"/>
|
---|
99 | </li>
|
---|
100 | </xsl:for-each>
|
---|
101 | <!--uncomment to display an authentication link-->
|
---|
102 | <!--<xsl:for-each select="service[@type='authen']">
|
---|
103 | <li><a href="{$library_name}?a=g&rt=r&sa=authen&s={@name}&s1.aup=Login&s1.un=&s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li> </xsl:for-each>-->
|
---|
104 | <!--uncomment to display a library interface link-->
|
---|
105 | <!--<li><a href="{$library_name}?a=p&sa=gli4gs3">The Librarian Interface</a></li>-->
|
---|
106 | </xsl:template>
|
---|
107 |
|
---|
108 |
|
---|
109 | <xsl:template name="poweredByGS3LanguageDependant">
|
---|
110 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
|
---|
111 | </xsl:template>
|
---|
112 |
|
---|
113 |
|
---|
114 |
|
---|
115 | </xsl:stylesheet>
|
---|
116 |
|
---|
117 |
|
---|