source: greenstone3/trunk/web/ui/skins/oran/xsl/collectBrowse.xsl@ 16447

Last change on this file since 16447 was 16447, checked in by davidb, 16 years ago

More careful declaration of XSLT header information for produces XML, not HTML output. This is needed for the JAVA code that then takes some transformed code, parses it back in to a DOM (needs to be XML) and then does some final adjustments. When output was HTML, empty elements such as <script ../> could loose their closing />.

File size: 3.5 KB
Line 
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/skinning"
6 xmlns:xalan="http://xml.apache.org/xalan">
7
8<xsl:import href="./util.xsl"/>
9
10<xsl:template match="/">
11 <html>
12 <head>
13 <title>
14 <gslib:metadataItem name="siteName" />
15 /
16 <gslib:metadataItem name="collectionName" />
17 </title>
18
19 <gslib:css/>
20 <gslib:js/>
21 </head>
22 <body>
23 <div id="container">
24
25 <div id="header">
26 <div class="title_minor">
27
28 <a href="{$site_homeUrl}">
29 <gslib:metadataItem name="siteName" />
30 </a>
31 </div>
32
33 <div class="title_major">
34 <gslib:metadataItem name="collectionName" />
35 </div>
36
37 <div id="tablist" class="linklist">
38 <ul>
39 <xsl:for-each select="$services">
40 <li>
41 <a href="">
42 <xsl:attribute name="href"> <gslib:service_url/> </xsl:attribute>
43 <xsl:attribute name="title"> <gslib:service_description/> </xsl:attribute>
44 <gslib:service_title/>
45 </a>
46 </li>
47 </xsl:for-each>
48 <li>
49 <a href="{$collection_homeUrl}">
50 Home
51 </a>
52 </li>
53 </ul>
54 </div>
55
56 <div class="quicksearchBox" >
57 <form method="get" name="quickSearch">
58 <input type="text" name="s1.query" value="{$search_query}"/>
59
60 <input type="submit" value="Quick Search"/>
61 <gslib:search_hiddenInputs/>
62 </form>
63 </div>
64 </div>
65
66 <div id="content" class="noSidebar">
67 <div id="subServiceList" class="linklist">
68 <ul>
69 <xsl:for-each select="$classifiers">
70 <li>
71 <xsl:choose>
72 <xsl:when test=". = $currentClassifier">
73 <gslib:classifier_title/>
74 </xsl:when>
75 <xsl:otherwise>
76 <a>
77 <xsl:attribute name="title"><gslib:classifier_description/></xsl:attribute>
78 <xsl:attribute name="href"><gslib:classifier_url/></xsl:attribute>
79
80 <gslib:classifier_title/>
81 </a>
82 </xsl:otherwise>
83 </xsl:choose>
84 </li>
85 </xsl:for-each>
86 </ul>
87 </div>
88
89 <div id="classifierData">
90 <ul>
91 <xsl:for-each select="$topLevelClassifierNodes">
92 <xsl:call-template name="classifierNode"/>
93 </xsl:for-each>
94 </ul>
95 </div>
96 </div>
97
98 <div id="footer" >
99 <gslib:uiItem name="collectionFooter" />
100 </div>
101 </div>
102 </body>
103 </html>
104</xsl:template>
105
106<!-- default browsing format statements -->
107
108<xsl:template name="classifierNode">
109 <li>
110 <xsl:attribute name="class">
111 <xsl:choose>
112 <xsl:when test="./classifierNode or ./documentNode">expandedNode</xsl:when>
113 <xsl:otherwise>collapsedNode</xsl:otherwise>
114 </xsl:choose>
115 </xsl:attribute>
116
117 <a>
118 <xsl:attribute name="href"><gslib:classifierNode_url/></xsl:attribute>
119 <gslib:classifierNode_title/>
120 </a>
121
122 <xsl:if test="./documentNode or ./classifierNode">
123 <ul>
124 <xsl:for-each select="./classifierNode">
125 <xsl:call-template name="classifierNode"/>
126 </xsl:for-each>
127
128 <xsl:for-each select="./documentNode">
129 <xsl:call-template name="documentNode"/>
130 </xsl:for-each>
131 </ul>
132 </xsl:if>
133 </li>
134</xsl:template>
135
136<xsl:template name="documentNode">
137 <li class="leafNode">
138 <a>
139 <xsl:attribute name="href"><gslib:documentNode_url/>&amp;ec=1</xsl:attribute>
140 <gslib:documentNode_title/>
141 </a>
142 </li>
143</xsl:template>
144
145
146</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.