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

Last change on this file since 22569 was 22569, checked in by sjb48, 14 years ago

More work on javascript DOM manipulation using sortables and draggables

  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
RevLine 
[4047]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"
[4712]5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 extension-element-prefixes="java util"
7 exclude-result-prefixes="java util">
[4047]8
[17017]9 <!-- style includes global params interface_name, library_name -->
[4047]10 <xsl:include href="style.xsl"/>
[4883]11 <xsl:include href="classifiertools.xsl"/>
[12015]12 <xsl:include href="berrytools.xsl"/>
13
[17017]14 <xsl:output method="html"/>
15
16 <!-- the main page layout template is here -->
17 <xsl:template match="page">
[18316]18 <html>
19 <head>
20 <title>
21 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
22 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
23 </title>
24 <xsl:call-template name="globalStyle"/>
25 <xsl:call-template name="pageStyle"/>
26 </head>
27 <body>
[18388]28 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
29 <div id="page-wrapper">
[18316]30 <xsl:call-template name="response" />
31 <xsl:call-template name="greenstoneFooter"/>
32 </div>
33 </body>
34 </html>
[17017]35 </xsl:template>
36
[12152]37 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
[4872]38
[8526]39 <xsl:template name="pageTitle">
40 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
[4047]41 </xsl:template>
42
[8526]43 <!-- page specific style goes here -->
[12015]44 <xsl:template name="pageStyle">
[12152]45 <xsl:if test="$berrybasketswitch = 'on'">
[12028]46 <xsl:call-template name="berryStyleSheet"/>
47 <xsl:call-template name="js-library"/>
48 </xsl:if>
[12015]49 </xsl:template>
[8526]50
51
[4047]52 <xsl:template match="pageResponse">
[4712]53 <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
[4047]54 <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
[12028]55 <xsl:call-template name="standardPageBanner">
56 <xsl:with-param name="collName" select="$collName"/>
57 </xsl:call-template>
[13267]58
[5119]59 <xsl:call-template name="navigationBar">
60 <xsl:with-param name="collName" select="$collName"/>
61 </xsl:call-template>
[22569]62
63 <!-- Sam's div code -->
64
65 <!-- <xsl:if test="/page/pageRequest[@name='output']='debug'"> -->
66
67 <xsl:variable name="fmt">
68 <xsl:call-template name="xml-to-string">
69 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
70 </xsl:call-template>
71 </xsl:variable>
72
73 <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> -->
74
75 <div id="format">
76 <p>
77 <b>Format string here</b>
78 <i>
79 <xsl:value-of select="$fmt"/>
80 <!-- <xsl:value-of select="$tok"/> -->
81 </i>
82 </p>
83 </div>
84 <!-- </xsl:if> -->
85
86
[13505]87 <div id="content">
[13267]88 <xsl:apply-templates select="service/classifierList">
89 <xsl:with-param name="collName" select="$collName"/>
90 <xsl:with-param name="serviceName" select="$serviceName"/>
91 </xsl:apply-templates>
92
[18316]93 <xsl:if test="$berrybasketswitch = 'on'">
94 <xsl:call-template name="berrybasket" />
95 </xsl:if>
96 <xsl:apply-templates select="classifier">
97 <xsl:with-param name="collName" select="$collName"/>
98 <xsl:with-param name="serviceName" select="$serviceName"/>
99 </xsl:apply-templates>
[13267]100 </div>
[4047]101 </xsl:template>
102
103 <xsl:template match="classifierList">
104 <xsl:param name="collName"/>
105 <xsl:param name="serviceName"/>
[4712]106 <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/>
[18316]107 <ul id="classifierlist">
108 <xsl:for-each select="classifier">
109 <xsl:choose>
110 <xsl:when test="@name=$selected">
111 <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
112 </xsl:when>
113 <xsl:otherwise>
114 <li><a href="{$library_name}?a=b&amp;rt=r&amp;s={$serviceName}&amp;c={$collName}&amp;cl={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></li></xsl:otherwise></xsl:choose>
115
116 </xsl:for-each>
[13505]117 </ul>
[18316]118 </xsl:template>
[4872]119
[4047]120</xsl:stylesheet>
121
122
123
124
125
126
Note: See TracBrowser for help on using the repository browser.