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 | xmlns:gslib="http://www.greenstone.org/skinning"
|
---|
7 | extension-element-prefixes="java util"
|
---|
8 | exclude-result-prefixes="java util">
|
---|
9 |
|
---|
10 | <!-- style includes global params interface_name, library_name -->
|
---|
11 | <xsl:include href="style.xsl"/>
|
---|
12 |
|
---|
13 | <xsl:output method="html"/>
|
---|
14 |
|
---|
15 | <!-- the main page layout template is here -->
|
---|
16 | <xsl:template match="page">
|
---|
17 | <xsl:choose>
|
---|
18 | <!-- if we are using the classic GS2 look and feel use this template otherwise use the default GS3 look and feel template -->
|
---|
19 | <xsl:when test="$interface_name = 'gs2'">
|
---|
20 | <html>
|
---|
21 | <head>
|
---|
22 | <title>
|
---|
23 | <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
|
---|
24 | <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
|
---|
25 | </title>
|
---|
26 | <xsl:call-template name="globalStyle"/>
|
---|
27 | <xsl:call-template name="pageStyle"/>
|
---|
28 | </head>
|
---|
29 | <body>
|
---|
30 | <div id="page-wrapper">
|
---|
31 | <xsl:apply-templates select="pageResponse"/>
|
---|
32 | <xsl:call-template name="greenstoneFooter"/>
|
---|
33 | </div>
|
---|
34 | </body>
|
---|
35 | </html>
|
---|
36 | </xsl:when>
|
---|
37 | <!-- default gs3 mode -->
|
---|
38 | <xsl:otherwise>
|
---|
39 | <html>
|
---|
40 | <head>
|
---|
41 | <title>
|
---|
42 | <gslib:aboutCollectionPageTitle/>
|
---|
43 | </title>
|
---|
44 | <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/>
|
---|
45 | </head>
|
---|
46 |
|
---|
47 | <body><gslib:textDirectionAttribute/>
|
---|
48 |
|
---|
49 | <div id="page-wrapper">
|
---|
50 | <gslib:displayErrorsIfAny/>
|
---|
51 |
|
---|
52 | <div id="banner">
|
---|
53 | <p>
|
---|
54 | <gslib:collectionHomeLinkWithLogoIfAvailable/>
|
---|
55 | </p>
|
---|
56 | <ul id="bannerlist">
|
---|
57 | <li><gslib:homeButtonTop/></li>
|
---|
58 | <li><gslib:helpButtonTop/></li>
|
---|
59 | <li><gslib:preferencesButtonTop/></li>
|
---|
60 | </ul>
|
---|
61 | </div>
|
---|
62 |
|
---|
63 | <!--If some services are available for the current collection display the navigation bar-->
|
---|
64 | <xsl:choose>
|
---|
65 | <xsl:when test="$this-element/serviceList/service">
|
---|
66 | <div id="navbar">
|
---|
67 | <ul id="navbarlist">
|
---|
68 | <gslib:servicesNavigationBar/>
|
---|
69 | </ul>
|
---|
70 | </div>
|
---|
71 | </xsl:when>
|
---|
72 | <!--Otherwise simply display a blank divider bar-->
|
---|
73 | <xsl:otherwise>
|
---|
74 | <div class="divbar"><gslib:noTextBar/></div>
|
---|
75 | </xsl:otherwise>
|
---|
76 | </xsl:choose>
|
---|
77 |
|
---|
78 | <div id="content">
|
---|
79 | <!--Display the description text of the current collection,
|
---|
80 | and if some services are available then create a list
|
---|
81 | of links for each service within a <ul id="servicelist"> element.-->
|
---|
82 | <gslib:collectionDescriptionTextAndServicesLinks/>
|
---|
83 | </div>
|
---|
84 |
|
---|
85 | <div id="footer">
|
---|
86 | <div class="divbar"><gslib:poweredByGS3TextBar/></div>
|
---|
87 | </div>
|
---|
88 | </div>
|
---|
89 |
|
---|
90 | <span id="language" style="display: none;"><xsl:value-of select="/page/@lang" /></span>
|
---|
91 | <span id="interface" style="display: none;"><xsl:value-of select="$interface_name" /></span>
|
---|
92 |
|
---|
93 | <script type="text/javascript"><xsl:text>var placeholder = false;</xsl:text></script>
|
---|
94 | <script type="text/javascript" src="jquery.js"><xsl:comment>jQuery</xsl:comment></script>
|
---|
95 | <script type="text/javascript" src="test.js"><xsl:comment>Client side transforms</xsl:comment></script>
|
---|
96 | </body>
|
---|
97 | </html>
|
---|
98 | </xsl:otherwise>
|
---|
99 | </xsl:choose>
|
---|
100 | </xsl:template>
|
---|
101 |
|
---|
102 |
|
---|
103 |
|
---|
104 |
|
---|
105 | <xsl:template name="pageTitle">
|
---|
106 | Sample XML Texts Collection
|
---|
107 | </xsl:template>
|
---|
108 |
|
---|
109 | <!-- page specific style goes here -->
|
---|
110 | <xsl:template name="pageStyle"/>
|
---|
111 |
|
---|
112 | <xsl:template match="pageResponse">
|
---|
113 | <xsl:apply-templates select="collection"/>
|
---|
114 | </xsl:template>
|
---|
115 |
|
---|
116 | <!-- this is for gs2 mode -->
|
---|
117 | <xsl:template match="collection" priority="5">
|
---|
118 | <xsl:if test="$interface_name = 'gs2'">
|
---|
119 | <xsl:variable name="collName" select="@name"/>
|
---|
120 | <xsl:call-template name="standardPageBanner">
|
---|
121 | <xsl:with-param name="collName" select="$collName"/>
|
---|
122 | <xsl:with-param name="pageType">about</xsl:with-param>
|
---|
123 | </xsl:call-template>
|
---|
124 | <xsl:call-template name="navigationBar">
|
---|
125 | <xsl:with-param name="collName" select="$collName"/>
|
---|
126 | </xsl:call-template>
|
---|
127 | </xsl:if>
|
---|
128 | <p/><xsl:value-of select="displayItem[@name='description']" disable-output-escaping='yes'/>
|
---|
129 | <p/><xsl:apply-templates select="documentList">
|
---|
130 | <xsl:with-param name="collName" select="@name"/>
|
---|
131 | </xsl:apply-templates>
|
---|
132 | </xsl:template>
|
---|
133 |
|
---|
134 | <xsl:template match="documentList">
|
---|
135 | <xsl:param name="collName"/>
|
---|
136 | <ul>
|
---|
137 | <xsl:for-each select="document">
|
---|
138 | <li><a href="{$library_name}?a=xd&sa=toc&sc=full&c={$collName}&d={@name}"><xsl:value-of select="metadataList/metadata[@name='Title']"/></a></li>
|
---|
139 | </xsl:for-each>
|
---|
140 | </ul>
|
---|
141 | </xsl:template>
|
---|
142 | </xsl:stylesheet> |
---|