Project

General

Profile

1 5694 leinfelder
<?xml version="1.0"?>
2
	<!--
3
		* '$RCSfile$' * Authors: Jivka Bojilova * Copyright: 2000 Regents of
4
		the University of California and the * National Center for Ecological
5
		Analysis and Synthesis * For Details: http://www.nceas.ucsb.edu/ * *
6
		'$Author$' * '$Date: 2008-06-17 13:29:31 -0700 (Tue, 17
7
		Jun 2008) $' * '$Revision$' * * This program is free software;
8
		you can redistribute it and/or modify * it under the terms of the GNU
9
		General Public License as published by * the Free Software Foundation;
10
		either version 2 of the License, or * (at your option) any later
11
		version. * * This program is distributed in the hope that it will be
12
		useful, * but WITHOUT ANY WARRANTY; without even the implied warranty
13
		of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
		GNU General Public License for more details. * * You should have
15
		received a copy of the GNU General Public License * along with this
16
		program; if not, write to the Free Software * Foundation, Inc., 59
17
		Temple Place, Suite 330, Boston, MA 02111-1307 USA * * This is an XSLT
18
		(http://www.w3.org/TR/xslt) stylesheet designed to * convert an XML
19
		file with information about login action * into an HTML format
20
		suitable for rendering with modern web browsers.
21
	-->
22
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
23
	version="1.0">
24
	<xsl:output method="html" />
25
	<xsl:param name="qformat">default</xsl:param>
26
	<xsl:param name="contextURL" />
27
	<xsl:param name="cgi-prefix" />
28
29
	<xsl:variable name="this" select="/"/>
30
31
	<xsl:template match="/">
32
		<html>
33
			<head>
34
				<link rel="stylesheet" type="text/css"
35
					href="{$contextURL}/style/skins/{$qformat}/{$qformat}.css" />
36
				<script language="Javascript" type="text/JavaScript"
37
					src="{$contextURL}/style/skins/{$qformat}/{$qformat}.js" />
38
				<script language="Javascript" type="text/JavaScript"
39
					src="{$contextURL}/style/common/branding.js" />
40
			</head>
41
42
			<body>
43
				<table class="subGroup subGroup_border">
44
45
					<xsl:for-each select="distinct-values(./log/logEntry/docid)" >
46
						<xsl:variable name="uniqueDocid" select="string(.)"/>
47
						<tr>
48 5696 leinfelder
							<th colspan="2">
49
								Usage Statistics
50
							</th>
51
						</tr>
52
						<tr>
53
							<td>
54 5694 leinfelder
								Doc Id:
55 5696 leinfelder
							</td>
56
							<td>
57 5694 leinfelder
								<xsl:value-of select="$uniqueDocid" />
58 5696 leinfelder
							</td>
59 5694 leinfelder
						</tr>
60
						<tr>
61
							<td>
62
								Read:
63
							</td>
64
							<td>
65
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='read'])" />
66
							</td>
67
						</tr>
68
						<tr>
69
							<td>
70
								Insert:
71
							</td>
72
							<td>
73
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='insert'])" />
74
							</td>
75
						</tr>
76
						<tr>
77
							<td>
78
								Update:
79
							</td>
80
							<td>
81
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='update'])" />
82
							</td>
83
						</tr>
84
						<tr>
85
							<td>
86
								Delete:
87
							</td>
88
							<td>
89
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='delete'])" />
90
							</td>
91
						</tr>
92
						<tr>
93
							<td>
94
								Total:
95
							</td>
96
							<td>
97
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid])" />
98
							</td>
99
						</tr>
100
101
					</xsl:for-each>
102
103
				</table>
104
			</body>
105
106
		</html>
107
	</xsl:template>
108
</xsl:stylesheet>