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 | <xsl:include href="classifiertools.xsl"/>
|
---|
12 | <!-- classifiertools needs this-->
|
---|
13 | <xsl:include href="berrytools.xsl"/>
|
---|
14 | <xsl:output method="html"/>
|
---|
15 |
|
---|
16 | <!-- the main page layout template is here -->
|
---|
17 | <xsl:template match="page">
|
---|
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>
|
---|
28 | <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
|
---|
29 | <div id="page-wrapper">
|
---|
30 | <xsl:apply-templates select="pageResponse"/>
|
---|
31 | <xsl:call-template name="greenstoneFooter"/>
|
---|
32 | </div>
|
---|
33 | </body>
|
---|
34 | </html>
|
---|
35 | </xsl:template>
|
---|
36 |
|
---|
37 | <xsl:template name="pageTitle">
|
---|
38 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
|
---|
39 | </xsl:template>
|
---|
40 |
|
---|
41 | <!-- page specific style goes here -->
|
---|
42 | <xsl:template name="pageStyle"/>
|
---|
43 |
|
---|
44 | <xsl:template match="pageResponse">
|
---|
45 | <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
|
---|
46 | <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
|
---|
47 | <xsl:variable name="cl" select="/page/pageRequest/paramList/param[@name='cl']/@value"/>
|
---|
48 | <xsl:variable name="clTop">
|
---|
49 | <xsl:choose>
|
---|
50 | <xsl:when test="contains($cl, '.')"><xsl:value-of select="substring-before($cl, '.')"/></xsl:when>
|
---|
51 | <xsl:otherwise>
|
---|
52 | <xsl:value-of select="$cl"/>
|
---|
53 | </xsl:otherwise>
|
---|
54 | </xsl:choose>
|
---|
55 | </xsl:variable>
|
---|
56 | <xsl:call-template name="standardPageBanner">
|
---|
57 | <xsl:with-param name="collName" select="$collName"/>
|
---|
58 | <xsl:with-param name="pageType">browse</xsl:with-param>
|
---|
59 | <xsl:with-param name="clTop" select="$clTop"/>
|
---|
60 | </xsl:call-template>
|
---|
61 | <xsl:call-template name="navigationBar">
|
---|
62 | <xsl:with-param name="collName" select="$collName"/>
|
---|
63 | <xsl:with-param name="clTop" select="$clTop"/>
|
---|
64 | </xsl:call-template>
|
---|
65 | <div class="document">
|
---|
66 | <xsl:apply-templates select="classifier">
|
---|
67 | <xsl:with-param name="collName" select="$collName"/>
|
---|
68 | <xsl:with-param name="serviceName" select="$serviceName"/>
|
---|
69 | </xsl:apply-templates>
|
---|
70 | </div>
|
---|
71 | </xsl:template>
|
---|
72 |
|
---|
73 | <xsl:template match="classifierList">
|
---|
74 | <xsl:param name="collName"/>
|
---|
75 | <xsl:param name="serviceName"/>
|
---|
76 | <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/>
|
---|
77 | <ul id="classifierlist">
|
---|
78 | <xsl:for-each select="classifier">
|
---|
79 | <xsl:choose>
|
---|
80 | <xsl:when test="@name=$selected">
|
---|
81 | <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
|
---|
82 | </xsl:when>
|
---|
83 | <xsl:otherwise>
|
---|
84 | <li><a href="{$library_name}?a=b&rt=r&s={$serviceName}&c={$collName}&cl={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></li></xsl:otherwise></xsl:choose>
|
---|
85 |
|
---|
86 | </xsl:for-each>
|
---|
87 | </ul>
|
---|
88 | </xsl:template>
|
---|
89 |
|
---|
90 |
|
---|
91 | </xsl:stylesheet>
|
---|
92 |
|
---|
93 |
|
---|
94 |
|
---|
95 |
|
---|
96 |
|
---|
97 |
|
---|