-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxhtml.xsl
More file actions
128 lines (110 loc) · 3.67 KB
/
Copy pathxhtml.xsl
File metadata and controls
128 lines (110 loc) · 3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl"
xmlns:navigation="http://www.evilcode.net/Exhibition/namespaces/navigation"
xmlns:form="http://www.evilcode.net/Exhibition/namespaces/form"
xmlns:table="http://www.evilcode.net/Exhibition/namespaces/table"
xmlns:debug="http://www.evilcode.net/Exhibition/namespaces/debug"
extension-element-prefixes="php navigation form table debug">
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" indent="yes" />
<xsl:include href="xhtml.navigation.xsl" />
<xsl:include href="xhtml.form.xsl" />
<xsl:include href="xhtml.table.xsl" />
<xsl:include href="xhtml.debug.xsl" />
<xsl:template match="/document">
<html>
<!-- <xsl:attribute name="xmlns">http://www.w3.org/1999/xhtml</xsl:attribute> -->
<head>
<title><xsl:if test="apptitle">
<xsl:value-of select="apptitle" /></xsl:if>
<xsl:if test="pagetitle">
<xsl:text> :: </xsl:text><xsl:value-of select="pagetitle" />
</xsl:if>
</title>
<link rel="stylesheet" type="text/css" href="/screen.css" />
</head>
<body>
<div id="wrapper">
<xsl:call-template name="header" />
<xsl:apply-templates select="navigation:navigation" />
<xsl:apply-templates />
<xsl:call-template name="footer" />
</div>
</body>
</html>
</xsl:template>
<xsl:template match="content">
<div id="{@style}">
<xsl:apply-templates />
</div>
</xsl:template>
<!-- HEADER -->
<xsl:template name="header">
<h1 id="header"><xsl:text> </xsl:text></h1>
</xsl:template>
<!-- FOOTER -->
<xsl:template name="footer">
<xsl:if test="/document/@uri != '/'">
<h1 id="footbanner"><xsl:text> </xsl:text></h1>
</xsl:if>
<div id="footer">
<xsl:value-of select="footer" />
<xsl:text>Page generation time: </xsl:text>
<xsl:value-of select="php:function('GenerationTime')"/>
<xsl:text> seconds :: Powered by Exhibition</xsl:text>
</div>
</xsl:template>
<!-- PARA -->
<xsl:template match="paras">
<xsl:for-each select="para">
<xsl:value-of select="." />
</xsl:for-each>
</xsl:template>
<!-- ERROR -->
<xsl:template match="error">
<h1><xsl:value-of select="code" />
<xsl:text> - </xsl:text>
<xsl:value-of select="title" /></h1><br />
<xsl:value-of select="description" />
</xsl:template>
<!-- Ignore anything not explicitly matched -->
<xsl:template match="text()" />
</xsl:stylesheet>
<!-- DIRECTORY
<xsl:template match="directory">
<xsl:variable name="path" select="path" />
<xsl:variable name="fspath" select="fspath" />
<h2>Directory Listing of <xsl:copy-of select="$fspath" /></h2>
<table class="ruler" id="directory">
<thead>
<tr>
<td><strong>Filename</strong></td>
<td><strong>Size</strong></td>
<td><strong>Permissions</strong></td>
<td><strong>Last Modified</strong></td>
</tr>
</thead>
<tbody>
<xsl:for-each select="descriptor">
<tr>
<td>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:if test="type='directory'">
<xsl:copy-of select="$path" /></xsl:if>
<xsl:value-of select="name"/>
<xsl:if test="type='directory'"><xsl:text>/</xsl:text></xsl:if>
</xsl:attribute>
<xsl:value-of select="name" />
<xsl:if test="type='directory'"><xsl:text>/</xsl:text></xsl:if>
</xsl:element>
</td>
<td><xsl:value-of select="size" /></td>
<td><xsl:value-of select="permissions" /></td>
<td><xsl:value-of select="modified" /></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</xsl:template>
-->