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 | extension-element-prefixes="java">
|
---|
6 |
|
---|
7 | <xsl:include href="style.xsl"/>
|
---|
8 | <xsl:output method="html"/>
|
---|
9 | <!--
|
---|
10 | <xsl:output method="xml"/>
|
---|
11 | -->
|
---|
12 |
|
---|
13 |
|
---|
14 | <xsl:template match="page">
|
---|
15 | <xsl:variable name="collName" select="request/paramList/param[@name='c']/@value"/>
|
---|
16 |
|
---|
17 | <html>
|
---|
18 | <xsl:call-template name="greenstoneHead"/>
|
---|
19 | <!-- <head>
|
---|
20 | <title>
|
---|
21 | No title yet.
|
---|
22 | </title>
|
---|
23 | </head> -->
|
---|
24 |
|
---|
25 | <body xsl:use-attribute-sets="body-style">
|
---|
26 | <center>
|
---|
27 | <xsl:call-template name="collectionPageBanner">
|
---|
28 | <xsl:with-param name="collName" select="$collName"/>
|
---|
29 | </xsl:call-template>
|
---|
30 |
|
---|
31 | <!-- Display table of contents -->
|
---|
32 | <p/>
|
---|
33 | <table width="537" cellpadding="0" cellspacing="0">
|
---|
34 | <tr>
|
---|
35 | <xsl:apply-templates select="response/document">
|
---|
36 | <xsl:with-param name="collName" select="$collName"/>
|
---|
37 | </xsl:apply-templates>
|
---|
38 | </tr>
|
---|
39 | </table>
|
---|
40 |
|
---|
41 | <!-- Display document content -->
|
---|
42 | <p/>
|
---|
43 | <table width="537" cellpadding="0" cellspacing="0">
|
---|
44 | <tr>
|
---|
45 | <td align="left">
|
---|
46 | <xsl:value-of disable-output-escaping="yes" select="descendant::documentNode/documentNodeContent"/>
|
---|
47 | </td>
|
---|
48 | </tr>
|
---|
49 | </table>
|
---|
50 | </center>
|
---|
51 |
|
---|
52 | <xsl:call-template name="greenstoneFooter"/>
|
---|
53 | </body>
|
---|
54 | </html>
|
---|
55 | </xsl:template>
|
---|
56 |
|
---|
57 |
|
---|
58 | <xsl:template match="document">
|
---|
59 | <xsl:param name="collName">coll-name</xsl:param>
|
---|
60 |
|
---|
61 | <!-- Display table of contents -->
|
---|
62 | <td valign="top" align="left" width="200">
|
---|
63 | <img src="interfaces/default/images/cover.jpg"/> <!-- TO DO -->
|
---|
64 | </td>
|
---|
65 | <td valign="top">
|
---|
66 | <xsl:apply-templates select="documentNode[@nodeID]">
|
---|
67 | <xsl:with-param name="collName" select="$collName"/>
|
---|
68 | <xsl:with-param name="depth" select="0"/>
|
---|
69 | </xsl:apply-templates>
|
---|
70 | </td>
|
---|
71 | </xsl:template>
|
---|
72 |
|
---|
73 |
|
---|
74 | <xsl:template match="documentNode">
|
---|
75 | <xsl:param name="collName">coll-name</xsl:param>
|
---|
76 | <xsl:param name="depth"/>
|
---|
77 | <xsl:variable name="library" select="ancestor::page/config/library_name"/>
|
---|
78 | <xsl:variable name="space" select="$depth * 25"/>
|
---|
79 |
|
---|
80 | <table>
|
---|
81 | <tr valign="top">
|
---|
82 | <td>
|
---|
83 | <xsl:if test="not($depth = '0')">
|
---|
84 | <img src="interfaces/default/images/space.gif" width="{$space}"/>
|
---|
85 | </xsl:if>
|
---|
86 | </td>
|
---|
87 |
|
---|
88 | <!-- Display the appropriate image, depending on the node type -->
|
---|
89 | <td valign="top">
|
---|
90 | <a><xsl:attribute name="href"><xsl:value-of select='$library'/>?a=d&c=<xsl:value-of select='$collName'/>&d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if><xsl:if test="@nodeType='leaf'">&sib=1</xsl:if></xsl:attribute>
|
---|
91 | <xsl:apply-templates select="." mode="displayNodeIcon"/>
|
---|
92 | </a>
|
---|
93 | </td>
|
---|
94 |
|
---|
95 | <!-- Display associated title, bolded if the node has content -->
|
---|
96 | <td valign="top">
|
---|
97 | <xsl:choose>
|
---|
98 | <xsl:when test="documentNodeContent">
|
---|
99 | <b><xsl:value-of select="metadataList/metadata[@name='Title']"/></b>
|
---|
100 | </xsl:when>
|
---|
101 | <xsl:otherwise>
|
---|
102 | <xsl:value-of select="metadataList/metadata[@name='Title']"/>
|
---|
103 | </xsl:otherwise>
|
---|
104 | </xsl:choose>
|
---|
105 | </td>
|
---|
106 | </tr>
|
---|
107 | </table>
|
---|
108 |
|
---|
109 | <!-- Apply recursively to the children of this node -->
|
---|
110 | <xsl:apply-templates select="documentNode[@nodeID]">
|
---|
111 | <xsl:with-param name="collName" select="$collName"/>
|
---|
112 | <xsl:with-param name="depth" select="$depth + 1"/>
|
---|
113 | </xsl:apply-templates>
|
---|
114 | </xsl:template>
|
---|
115 |
|
---|
116 |
|
---|
117 | </xsl:stylesheet>
|
---|