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