source: main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl@ 38964

Last change on this file since 38964 was 38964, checked in by anupama, 7 weeks ago

Certain user-customised GLI Collage classifier options need to go into the pageResponse to be incorporated into the applet shim. 1. buildConfigxml.pm modified to push these options out into buildConfig.xml. 2. AbstractBrowse.java (classifier Service) has been modified to push out any classifier option subelements out into the pageResponse. 3. classifier.xsl has been modified to construct its applet HTML element's parameter elements taking into account any customised values in the pageResponse or using the old defaults for fallback. 4. The JavaScript code in webswing-collage.xsl doesn't have ready access to the pageResponse elements (this may need revisiting for if the applet element was accidentally removed from the page), but was already taking into account any applet parameters. webswing-collage.xsl has been modified to use any static/dynamic width and height attributes set on the applet parameter to reset the width and height on the div id=webswing-collage element, as webswing uses the dimensions set on the HTML element housing the webswing instance if running the instance as an applet. It does not resize the webswing applet thereafter. So the most transparent way to allow the user customised dimensions to control the dimensions of the webswing application as intended by the user, is to modify the dimensions set on the webswing-collage element's div before launching the webswing application.

File size: 24.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" xmlns:gslib="http://www.greenstone.org/skinning" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" extension-element-prefixes="java util" exclude-result-prefixes="java util gsf">
3
4 <!-- use the 'main' layout -->
5 <xsl:import href="layouts/main.xsl" />
6 <xsl:import href="layouts/webswing-collage.xsl" />
7 <xsl:import href="map-tools.xsl" />
8 <xsl:import href="panorama-viewer-tools.xsl" />
9
10 <!-- set page title -->
11 <xsl:template name="pageTitle">
12 <gslib:serviceName />
13 </xsl:template>
14
15 <!-- set page breadcrumbs -->
16 <xsl:template name="breadcrumbs">
17 <gslib:siteLink />
18 <gslib:rightArrow />
19 <gslib:groupLinks/>
20 <gslib:collectionNameLinked />
21 <gslib:rightArrow />
22 </xsl:template>
23
24 <!-- the page content -->
25 <xsl:template match="/page/pageResponse">
26 <xsl:call-template name="floatRightSidebar" />
27 <xsl:call-template name="classifierPre" />
28
29 <script type="text/javascript" src="interfaces/{$interface_name}/js/classifier_scripts.js">
30 <xsl:text> </xsl:text>
31 </script>
32 <gsf:script type="text/javascript">$(window).on("load", openStoredClassifiers);</gsf:script>
33
34 <!--
35 Show the clasifier results - you can change the appearance of the results
36 by editing the two templates at the bottom of this file
37 -->
38 <div id="results">
39 <xsl:variable name="collName">
40 <xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value" />
41 </xsl:variable>
42 <xsl:variable name="serviceName">
43 <xsl:value-of select="service/@name" />
44 </xsl:variable>
45
46 <xsl:call-template name="classifierResultsPre" />
47
48 <xsl:apply-templates select="classifier">
49 <xsl:with-param name="collName" select="$collName" />
50 <xsl:with-param name="serviceName" select="$serviceName" />
51 </xsl:apply-templates>
52
53 <xsl:call-template name="classifierResultsPost" />
54
55 <xsl:call-template name="classifierPost" />
56 </div>
57
58 <div class="clear">
59 <xsl:text> </xsl:text>
60 </div>
61 </xsl:template>
62
63 <xsl:template name="rightSidebar">
64 <div id="rightSidebar">
65 <xsl:comment>Filler to prevent empty div collapse, in event displayBasket empty</xsl:comment>
66 <gslib:displayBaskets />
67 </div>
68 </xsl:template>
69
70 <xsl:template match="classifier">
71 <xsl:param name="collName" />
72 <xsl:param name="serviceName" />
73 <div id="classifiers">
74 <xsl:variable name="cl_name">
75 <xsl:value-of select="@name" />
76 </xsl:variable>
77 <xsl:choose>
78 <xsl:when test="@childType = 'HList'">
79 <xsl:call-template name="HList">
80 <xsl:with-param name='collName' select='$collName' />
81 <xsl:with-param name='serviceName' select='$serviceName' />
82 </xsl:call-template>
83 </xsl:when>
84 <xsl:otherwise>
85 <table class="childrenlist" id="div{@nodeID}">
86
87 <!--<table id="classifiernodelist">-->
88 <xsl:text> </xsl:text>
89 <xsl:call-template name="processNodeChildren">
90 <xsl:with-param name='collName' select='$collName' />
91 <xsl:with-param name='serviceName' select='$serviceName' />
92 </xsl:call-template>
93 </table>
94 </xsl:otherwise>
95 </xsl:choose>
96 </div>
97 </xsl:template>
98
99 <xsl:template name="HList">
100 <xsl:param name="collName" />
101 <xsl:param name="serviceName" />
102 <xsl:variable name="selectedNode">
103 <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'cl']/@value" />
104 </xsl:variable>
105
106 <ul class="horizontalContainer">
107 <xsl:for-each select='classifierNode'>
108 <li id="title{@nodeID}">
109 <xsl:attribute name="class">
110<!-- <xsl:if test="$selectedNode = @nodeID or starts-with($selectedNode, concat(@nodeID, '.')) or (not(contains($selectedNode, '.')) and @nodeID = concat($selectedNode, '.1'))">selectedHorizontalClassifierNode </xsl:if>-->
111 <xsl:if test="$selectedNode = @nodeID or starts-with($selectedNode, concat(@nodeID, '.')) or (@nodeID = concat($selectedNode, '.1'))">selectedHorizontalClassifierNode </xsl:if>
112 <xsl:text>horizontalClassifierNode</xsl:text>
113 </xsl:attribute>
114 <xsl:apply-templates select='.'>
115 <xsl:with-param name='collName' select='$collName' />
116 <xsl:with-param name='serviceName' select='$serviceName' />
117 </xsl:apply-templates>
118 </li>
119 </xsl:for-each>
120 </ul>
121 <xsl:choose>
122 <!-- if the children are HLists-->
123 <xsl:when test="classifierNode[@childType = 'HList']">
124 <xsl:for-each select='classifierNode'>
125 <!-- there should be only one-->
126 <xsl:call-template name="HList">
127 <xsl:with-param name='collName' select='$collName' />
128 <xsl:with-param name='serviceName' select='$serviceName' />
129 </xsl:call-template>
130 </xsl:for-each>
131 </xsl:when>
132 <xsl:otherwise>
133
134 <div id="classifiernodelist{@nodeID}">
135 <xsl:for-each select='classifierNode'>
136 <xsl:if test="classifierNode|documentNode">
137 <table class="childrenlist" id="div{@nodeID}">
138 <xsl:call-template name="processNodeChildren">
139 <xsl:with-param name='collName' select='$collName' />
140 <xsl:with-param name='serviceName' select='$serviceName' />
141 </xsl:call-template>
142 </table>
143 </xsl:if>
144 </xsl:for-each>
145 </div>
146 </xsl:otherwise>
147 </xsl:choose>
148 </xsl:template>
149
150
151 <xsl:template name="collage-applet-shim">
152 <!--<xsl:text>TODO: Here is the collage applet</xsl:text>-->
153
154 <!-- Copied from GS2.88's about.dm (document.dm has more applet params).
155
156 Modified params: codebase, GsdlCollageApplet class' package, gwcgi, collection, classifier value="CL2.3", hrefMustHave value="cl=CL3.1". Param isJava2's value changed from auto to true.
157 And made all param XML elements self-closing.
158 -->
159 <!-- When run in the browser or as an application, it's enough to specify "applet" for codebase
160 as the relative folder where to find the jars (we seem to be in the "web" dir then,
161 so can directly look in web's "applet" subdirectory for the jar). But for running
162 this applet with the appletviewer, we need the "full URL path" to the applet folder,
163 which is off /greenstone3 (the servlet_context). Though once the collage applet is run
164 in the appletviewer, a securityexception is thrown as it appears to run in a sandbox
165 that has no permission to download URLs or follow external links or something. That's
166 as far as the Java appletviewer executable can run Greenstone's collage applet program.
167 But being able to run it through the appletviewer this far gives us some confidence that
168 the collage applet actually successfully starts running as an applet.
169
170TODO: double-quotes for attributes.
171 -->
172 <applet
173 style="display:none"
174 id="collage-applet-element"
175 code="org.greenstone.applet.GsdlCollageApplet.GsdlCollageApplet.class"
176 archive="GsdlCollageApplet.jar, webswing-api.jar">
177 <xsl:attribute name="codebase">/<xsl:value-of select="$servlet_context"/>/applet</xsl:attribute>
178 <xsl:choose>
179 <xsl:when test="option[@name='geometry']/@value">
180 <xsl:attribute name="width">
181 <xsl:value-of select="substring-before(option[@name='geometry']/@value, 'x')" />
182 </xsl:attribute>
183 <xsl:attribute name="height">
184 <xsl:value-of select="substring-after(option[@name='geometry']/@value, 'x')" />
185 </xsl:attribute>
186 </xsl:when>
187 </xsl:choose>
188
189 <!-- declaring some local variables -->
190 <xsl:variable name="coll_name">
191 <xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/>
192 </xsl:variable>
193 <xsl:variable name="classifier">
194 <xsl:value-of select="/page/pageRequest/paramList/param[@name='cl']/@value"/>
195 </xsl:variable>
196 <xsl:variable name="fullURL">
197 <xsl:value-of select="/page/pageRequest/@fullURL"/>
198 </xsl:variable>
199 <xsl:variable name="url_protocol_prefix">
200 <xsl:value-of select="substring-before (/page/pageRequest/@fullURL,'/')"/>
201 </xsl:variable>
202
203 <!-- setting the applet parameters: first the dynamic ones -->
204
205 <!-- pageRequest attribute "baseURL" lacks protocol prefix and looks like
206 e.g "//localhost:8383/greenstone3/", but we want to set xsl:variable "baseurl"
207 to all of e.g "http://localhost:8383/greenstone3/" -->
208 <param name="baseurl">
209 <xsl:attribute name="value">
210 <xsl:value-of select="$url_protocol_prefix"/><xsl:value-of select="/page/pageRequest/@baseURL"/>
211 </xsl:attribute>
212 </param>
213
214 <param name="library" value="{$library_name}" />
215 <param name="collection" value="{$coll_name}" />
216 <param name="classifier" value="{$classifier}.1" /><!-- e.g. "CL3.1".
217 The first level subclassifier (.1) contains the hidden classifier structure
218 that the collage app starts exploring from for images -->
219
220 <param name="documentroot" value="{$servlet_context}" /> <!-- e.g. "greenstone3" -->
221
222 <param name="hrefMustHave"><xsl:attribute name="value"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$coll_name"/>/browse/<xsl:value-of select="$classifier"/></xsl:attribute></param><!-- e.g. "library/collection/smallbea/browse/CL3" -->
223
224 <!-- applet parameters that are fixed for GS3 or we probably don't want to modify -->
225 <param name="gsdlversion" value="3" />
226 <param name="imageMustNotHave" value="interfaces/" />
227
228 <!-- applet parameters that can be manually adjusted -->
229 <!--
230 <param name="imageType" value=".jpg%.png" />
231 <param name="verbosity" value="3" />
232 <param name="maxDepth" value="500"/>
233 <param name="maxDisplay" value="25" />
234 <param name="refreshDelay" value="1500"/>
235 <param name="isJava2" value="auto"/>
236 <param name="bgcolor" value="#96c29a" />
237 -->
238 <!--<param name="imageType" value="{option[@name='imageType']/@value}" />-->
239 <xsl:call-template name="add-applet-param">
240 <xsl:with-param name="paramName">imageType</xsl:with-param>
241 <xsl:with-param name="paramDefaultValue">.jpg%.png</xsl:with-param>
242 </xsl:call-template>
243 <xsl:call-template name="add-applet-param">
244 <xsl:with-param name="paramName">verbosity</xsl:with-param>
245 <xsl:with-param name="paramDefaultValue">3</xsl:with-param>
246 </xsl:call-template>
247 <xsl:call-template name="add-applet-param">
248 <xsl:with-param name="paramName">maxDepth</xsl:with-param>
249 <xsl:with-param name="paramDefaultValue">500</xsl:with-param>
250 </xsl:call-template>
251 <xsl:call-template name="add-applet-param">
252 <xsl:with-param name="paramName">maxDisplay</xsl:with-param>
253 <xsl:with-param name="paramDefaultValue">25</xsl:with-param>
254 </xsl:call-template>
255 <xsl:call-template name="add-applet-param">
256 <xsl:with-param name="paramName">refreshDelay</xsl:with-param>
257 <xsl:with-param name="paramDefaultValue">1500</xsl:with-param>
258 </xsl:call-template>
259 <xsl:call-template name="add-applet-param">
260 <xsl:with-param name="paramName">isJava2</xsl:with-param>
261 <xsl:with-param name="paramDefaultValue">auto</xsl:with-param>
262 </xsl:call-template>
263 <xsl:call-template name="add-applet-param">
264 <xsl:with-param name="paramName">bgcolor</xsl:with-param>
265 <xsl:with-param name="paramDefaultValue">#96c29a</xsl:with-param>
266 </xsl:call-template>
267 The Collage Applet.
268 </applet>
269 </xsl:template>
270
271 <!-- https://our.umbraco.com/forum/developers/xslt/9274-Return-Value-from-a-Template -->
272 <xsl:template name="add-applet-param">
273 <xsl:param name = "paramName" />
274 <xsl:param name = "paramDefaultValue" />
275 <param name="{$paramName}">
276 <xsl:attribute name="value">
277 <xsl:choose>
278 <xsl:when test="option[@name=$paramName]/@value">
279 <xsl:value-of select="option[@name=$paramName]/@value"/>
280 </xsl:when>
281 <xsl:otherwise>
282 <xsl:value-of select="$paramDefaultValue"/>
283 </xsl:otherwise>
284 </xsl:choose>
285 </xsl:attribute>
286 </param>
287 </xsl:template>
288
289
290 <xsl:template name="Collage_javascript_deprecated">
291 <script type="text/javascript" src="interfaces/{$interface_name}/js/collage_scripts.js"><xsl:text> </xsl:text></script>
292 <div id="collagewrapper" style="width: 800px; height: 643px; position: relative; background-image:url('sites/{$site_name}/collect/twso/images/oldimagebackground1.png'); text-align: center;" alt="Click to start/stop a collage of images" title="Click to start/stop a collage of images" onmouseover="" onmouseout=""><xsl:text> </xsl:text></div>
293
294 </xsl:template>
295
296 <xsl:template name="processNodeChildren">
297 <xsl:param name="collName" />
298 <xsl:param name="serviceName" />
299
300 <xsl:choose>
301
302 <xsl:when test="@childType = 'VList' or @childType = 'DateList'">
303 <!--
304 <xsl:when test="@childType = 'VList' or @childType = 'HList' or @childType = 'DateList'"> - - **** mod ???? - -
305 -->
306
307 <xsl:value-of select="util:storeString('prevMonth', '')" />
308 <xsl:for-each select='classifierNode|documentNode'>
309 <tr>
310 <xsl:choose>
311 <xsl:when test="name()='documentNode'">
312 <xsl:if test="../@childType = 'DateList'">
313 <xsl:variable name="prevMonth">
314 <xsl:value-of select="util:getString('prevMonth')" />
315 </xsl:variable>
316 <xsl:variable name="currentDate">
317 <gsf:metadata name="Date" pos="1" />
318 </xsl:variable> <!-- note pos=1 won't work if a document can be included in a datelist multiple times. currently only the first date is used...-->
319 <xsl:variable name="currentMonth">
320 <xsl:value-of select="util:getDetailFromDate($currentDate, 'month', /page/@lang)" />
321 </xsl:variable>
322 <xsl:value-of select="util:storeString('prevMonth', $currentMonth)" />
323 <td>
324 <xsl:if test="not($currentMonth = $prevMonth)">
325 <xsl:value-of select="$currentMonth" />
326 </xsl:if>
327 <xsl:text> </xsl:text>
328 </td>
329 </xsl:if>
330 <td>
331 <table id="div{@nodeID}">
332 <tr>
333 <xsl:call-template name="documentNodeWrapper">
334 <xsl:with-param name='collName' select='$collName' />
335 <xsl:with-param name='serviceName' select='$serviceName' />
336 </xsl:call-template>
337 </tr>
338 </table>
339 </td>
340 </xsl:when>
341 <xsl:when test="name()='classifierNode' and (@childType = 'VList' or @childType = 'HList')">
342 <!-- *** mod -->
343 <td>
344 <table id="title{@nodeID}">
345 <tr>
346 <xsl:if test="not(/page/pageResponse/format[@type='browse']/gsf:option[@name='turnstyleClassifiers']) or /page/pageResponse/format[@type='browse']/gsf:option[@name='turnstyleClassifiers']/@value='true'">
347 <td class="headerTD">
348 <img id="toggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon turnstyleicon">
349 <xsl:attribute name="src">
350 <xsl:choose>
351 <xsl:when test="classifierNode or documentNode">
352 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'collapse_image')" />
353 </xsl:when>
354 <xsl:otherwise>
355 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'expand_image')" />
356 </xsl:otherwise>
357 </xsl:choose>
358 </xsl:attribute>
359 </img>
360 </td>
361 </xsl:if>
362 <xsl:apply-templates select='.'>
363 <xsl:with-param name='collName' select='$collName' />
364 <xsl:with-param name='serviceName' select='$serviceName' />
365 </xsl:apply-templates>
366 </tr>
367 </table>
368 </td>
369 <xsl:if test="child::classifierNode or child::documentNode">
370 <!--recurse into the children-->
371 <tr>
372 <td>
373 <table class="childrenlist" id="div{@nodeID}">
374
375 <xsl:apply-templates select='.' mode='process-all-children'>
376 <xsl:with-param name='collName' select='$collName' />
377 <xsl:with-param name='serviceName' select='$serviceName' />
378 </xsl:apply-templates>
379 </table>
380 </td>
381 </tr>
382 </xsl:if>
383 </xsl:when>
384 <xsl:otherwise>
385 <td>
386 Unknown classifier style specified:
387 <xsl:value-of select="name()" />
388 </td>
389 </xsl:otherwise>
390 </xsl:choose>
391 </tr>
392 </xsl:for-each>
393 </xsl:when>
394 <xsl:when test="@childType = 'HTML'">
395 <xsl:variable name="URL">
396 <xsl:value-of select="documentNode/@nodeID" />
397 </xsl:variable>
398 <iframe width="100%" height="600" frameborder="0">
399 <xsl:attribute name="src">
400 <xsl:value-of select="$URL" />
401 </xsl:attribute>
402 Frame for
403 <xsl:value-of select="$URL" />
404 </iframe>
405 </xsl:when>
406 <xsl:when test="@childType = 'Collage'">
407 <xsl:choose>
408 <!--test of not(*) means has no children, not(classNode) has no subelements classNode-->
409 <xsl:when test="not(classifierNode)">
410 <!-- the order of calling these templates now matters since the collage applet now
411 serves as a shim in the javascript that gets loaded in the 2nd template call:
412 the javascript now reads in the applet's parameters and uses them to configure
413 the webswing application/applet. It appeared better than the entirely javascript
414 solution we already had (which set the webswing arguments from the pageRequest
415 and xslt variables), as javascript requires familiarity with programming and
416 library designers/developers/we may find it easier to configure applet params
417 than learn/remember how to set webswing params or use javascript.
418 -->
419 <xsl:call-template name="collage-applet-shim" />
420 <xsl:call-template name="webswing-embed-collage"/>
421 </xsl:when>
422 <xsl:otherwise>
423 <xsl:apply-templates select='classifierNode|documentNode' mode='process-all-children'>
424 <xsl:with-param name='collName' select='$collName' />
425 <xsl:with-param name='serviceName' select='$serviceName' />
426 </xsl:apply-templates>
427 </xsl:otherwise>
428 </xsl:choose>
429 </xsl:when>
430 <xsl:otherwise>
431 we are in the other wise
432 </xsl:otherwise>
433 </xsl:choose>
434 </xsl:template>
435
436 <!-- processing for the recursive bit -->
437 <xsl:template match="classifierNode" mode="process-all-children">
438 <xsl:param name="collName" />
439 <xsl:param name="serviceName" />
440
441 <!--
442 ***mod: previous, simpler version
443 <xsl:call-template name="processNodeChildren">
444 <xsl:with-param name='collName' select='$collName'/>
445 <xsl:with-param name='serviceName' select='$serviceName'/>
446 </xsl:call-template>
447 -->
448
449 <xsl:choose>
450 <xsl:when test="@childType = 'HList'">
451 <tr><td>
452 <xsl:call-template name="HList">
453 <xsl:with-param name='collName' select='$collName' />
454 <xsl:with-param name='serviceName' select='$serviceName' />
455 </xsl:call-template>
456 </td></tr>
457 </xsl:when>
458 <xsl:otherwise>
459 <xsl:call-template name="processNodeChildren">
460 <xsl:with-param name='collName' select='$collName' />
461 <xsl:with-param name='serviceName' select='$serviceName' />
462 </xsl:call-template>
463 </xsl:otherwise>
464 </xsl:choose>
465
466 </xsl:template>
467
468 <!-- this is a wrapper node, which the interface can use to add stuff into the classifier display that isn't part of and doesn't depend on the documentNode template which may come from the collection -->
469 <xsl:template name="documentNodeWrapper">
470 <xsl:param name="collName" />
471 <xsl:param name="serviceName" />
472
473 <!-- The favourite star (optional) -->
474 <xsl:if test="$favouriteBasketOn">
475 <td valign="top">
476 <xsl:call-template name="documentFavouriteForClassifierOrSearchPage" />
477 </td>
478 </xsl:if>
479
480 <xsl:apply-templates select=".">
481 <xsl:with-param name="collName" select="$collName" />
482 <xsl:with-param name="serviceName" select="$serviceName" />
483 </xsl:apply-templates>
484
485 <xsl:call-template name="documentNodePost" />
486 </xsl:template>
487
488 <!--
489 TEMPLATE FOR DOCUMENTS
490 -->
491 <xsl:template match="documentNode">
492 <td valign="top">
493 <gsf:link type="document">
494 <gsf:icon type="document" />
495 </gsf:link>
496 </td>
497 <td valign="top">
498 <gsf:link type="source">
499 <gsf:choose-metadata>
500 <gsf:metadata name="thumbicon" />
501 <gsf:metadata name="srcicon" />
502 </gsf:choose-metadata>
503 </gsf:link>
504 </td>
505 <td valign="top">
506 <gsf:link type="document">
507 <!-- Defined in header.xsl -->
508 <xsl:call-template name="choose-title" />
509 <gsf:switch>
510 <gsf:metadata name="Source" />
511 <gsf:when test="exists">
512 <br />
513 <i>
514 (
515 <gsf:metadata name="Source" />
516 )
517 </i>
518 </gsf:when>
519 </gsf:switch>
520 </gsf:link>
521 </td>
522 </xsl:template>
523
524 <xsl:template name="documentNodePost">
525 <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
526 <xsl:if test="metadataList/metadata[@name='Latitude' or @name='Longitude' or @name='Coordinate']">
527 <xsl:call-template name="mapFeaturesIcon" />
528 </xsl:if>
529 </xsl:if>
530
531 <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
532 <xsl:if test="metadataList/metadata[@name = 'PhotoType']='Panorama' and ( metadataList/metadata[@name = 'Coordinate'] or ( metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']))">
533 <xsl:call-template name="panoramaViewerFeaturesIcon" />
534 </xsl:if>
535 </xsl:if>
536
537 </xsl:template>
538
539 <!--
540 TEMPLATE FOR GROUPS OF DOCUMENTS
541 -->
542 <xsl:template match="classifierNode[@classifierStyle = 'HList']">
543 <gsf:link type="classifier">
544 <gsf:metadata name="Title" />
545 </gsf:link>
546 </xsl:template>
547
548 <xsl:template match="classifierNode">
549 <td valign="top">
550 <gsf:link type="classifier" style="static">
551 <gsf:icon type="classifier" />
552 </gsf:link>
553 </td>
554 <td valign="top">
555 <gsf:link type="classifier">
556 <gsf:metadata name="Title" />
557 </gsf:link>
558 </td>
559 </xsl:template>
560
561 <xsl:template name="classifierPre">
562 <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
563 <xsl:call-template name="mapFeaturesJSONNodes" />
564 </xsl:if>
565
566 <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
567 <xsl:call-template name="panoramaViewerFeaturesJSONNodes" />
568 </xsl:if>
569
570 </xsl:template>
571
572 <xsl:template name="classifierResultsPre">
573 <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
574 <xsl:call-template name="mapFeaturesMap" />
575 </xsl:if>
576 <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
577 <xsl:call-template name="panoramaViewerFeatures" />
578 </xsl:if>
579 </xsl:template>
580
581 <xsl:template name="classifierResultsPost">
582 </xsl:template>
583
584 <xsl:template name="classifierPost">
585 </xsl:template>
586
587 <xsl:template match="/page/xsltparams">
588 <!-- suppress xsltparam block in page -->
589 </xsl:template>
590
591</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.