1
|
<?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: leinfelder $' * '$Date: 2008-06-17 13:29:31 -0700 (Tue, 17
|
7
|
Jun 2008) $' * '$Revision: 5701 $' * * 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
|
<xsl:param name="simple">true</xsl:param>
|
29
|
|
30
|
|
31
|
<xsl:variable name="this" select="/"/>
|
32
|
|
33
|
<xsl:template match="/">
|
34
|
<html>
|
35
|
<head>
|
36
|
<link rel="stylesheet" type="text/css"
|
37
|
href="{$contextURL}/style/skins/{$qformat}/{$qformat}.css" />
|
38
|
<script language="Javascript" type="text/JavaScript"
|
39
|
src="{$contextURL}/style/skins/{$qformat}/{$qformat}.js" />
|
40
|
<script language="Javascript" type="text/JavaScript"
|
41
|
src="{$contextURL}/style/common/branding.js" />
|
42
|
</head>
|
43
|
|
44
|
<body>
|
45
|
|
46
|
<xsl:choose>
|
47
|
<xsl:when test="$simple='true'">
|
48
|
Views:
|
49
|
<xsl:for-each select="distinct-values(./log/logEntry/docid)" >
|
50
|
<xsl:variable name="uniqueDocid" select="string(.)"/>
|
51
|
<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='read'])" />
|
52
|
</xsl:for-each>
|
53
|
</xsl:when>
|
54
|
<xsl:otherwise>
|
55
|
<table class="subGroup subGroup_border">
|
56
|
|
57
|
<xsl:for-each select="distinct-values(./log/logEntry/docid)" >
|
58
|
<xsl:variable name="uniqueDocid" select="string(.)"/>
|
59
|
<tr>
|
60
|
<th colspan="2">
|
61
|
Usage Statistics
|
62
|
</th>
|
63
|
</tr>
|
64
|
<tr>
|
65
|
<td>
|
66
|
Doc Id:
|
67
|
</td>
|
68
|
<td>
|
69
|
<xsl:value-of select="$uniqueDocid" />
|
70
|
</td>
|
71
|
</tr>
|
72
|
<tr>
|
73
|
<td>
|
74
|
Read:
|
75
|
</td>
|
76
|
<td>
|
77
|
<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='read'])" />
|
78
|
</td>
|
79
|
</tr>
|
80
|
<tr>
|
81
|
<td>
|
82
|
Insert:
|
83
|
</td>
|
84
|
<td>
|
85
|
<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='insert'])" />
|
86
|
</td>
|
87
|
</tr>
|
88
|
<tr>
|
89
|
<td>
|
90
|
Update:
|
91
|
</td>
|
92
|
<td>
|
93
|
<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='update'])" />
|
94
|
</td>
|
95
|
</tr>
|
96
|
<tr>
|
97
|
<td>
|
98
|
Delete:
|
99
|
</td>
|
100
|
<td>
|
101
|
<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='delete'])" />
|
102
|
</td>
|
103
|
</tr>
|
104
|
<tr>
|
105
|
<td>
|
106
|
Total:
|
107
|
</td>
|
108
|
<td>
|
109
|
<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid])" />
|
110
|
</td>
|
111
|
</tr>
|
112
|
|
113
|
</xsl:for-each>
|
114
|
|
115
|
</table>
|
116
|
</xsl:otherwise>
|
117
|
</xsl:choose>
|
118
|
</body>
|
119
|
|
120
|
</html>
|
121
|
</xsl:template>
|
122
|
</xsl:stylesheet>
|