1
|
<?xml version="1.0"?>
|
2
|
<!--
|
3
|
* resultset.xsl
|
4
|
*
|
5
|
* Authors: Matt Jones
|
6
|
* Copyright: 2000 Regents of the University of California and the
|
7
|
* National Center for Ecological Analysis and Synthesis
|
8
|
* For Details: http://www.nceas.ucsb.edu/
|
9
|
* Created: 2000 April 5
|
10
|
* File Info: '$Id: resultset.xsl 86 2000-05-08 19:52:16Z jones $'
|
11
|
*
|
12
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
13
|
* convert an XML file showing the resultset of a query
|
14
|
* into an HTML format suitable for rendering with modern web browsers.
|
15
|
-->
|
16
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
17
|
|
18
|
<xsl:output method="html"/>
|
19
|
|
20
|
<xsl:template match="/">
|
21
|
<html>
|
22
|
<head>
|
23
|
<link rel="stylesheet" type="text/css" href="/xmltodb/rowcol.css" />
|
24
|
</head>
|
25
|
<body class="emlbody">
|
26
|
<center>
|
27
|
<h1>Query Results</h1>
|
28
|
<h3>for querystring <xsl:value-of select="resultset/query"/>
|
29
|
</h3>
|
30
|
</center>
|
31
|
|
32
|
<form action="/servlets/MetaCatServlet" method="POST">
|
33
|
<input type="hidden" name="action" value="getdocument"/>
|
34
|
|
35
|
<xsl:text>Output Format: </xsl:text>
|
36
|
<select name="qformat">
|
37
|
<option value="html">HTML</option>
|
38
|
<option value="xml">XML</option>
|
39
|
</select>
|
40
|
|
41
|
<table width="100%">
|
42
|
<tr class="rowodd">
|
43
|
<th> </th>
|
44
|
<th><xsl:text>Document ID</xsl:text></th>
|
45
|
<th><xsl:text>Title</xsl:text></th>
|
46
|
</tr>
|
47
|
|
48
|
<xsl:for-each select="resultset/docid">
|
49
|
<tr valign="top">
|
50
|
<xsl:attribute name="class">
|
51
|
<xsl:choose>
|
52
|
<xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>
|
53
|
<xsl:when test="position() mod 2 = 0">rowlight</xsl:when>
|
54
|
</xsl:choose>
|
55
|
</xsl:attribute>
|
56
|
|
57
|
<td>
|
58
|
<input type="radio" name="docid">
|
59
|
<xsl:attribute name="value">
|
60
|
<xsl:value-of select="."/>
|
61
|
</xsl:attribute>
|
62
|
</input>
|
63
|
<input type="submit" value="Display"/>
|
64
|
<!--
|
65
|
<a>
|
66
|
<xsl:attribute name="href">
|
67
|
/servlets/MetaCatServlet?action=getdocument&docid=<xsl:value-of select="."/>
|
68
|
</xsl:attribute>
|
69
|
<xsl:text>Document </xsl:text><xsl:value-of select="."/>
|
70
|
</a>
|
71
|
-->
|
72
|
</td>
|
73
|
<td>
|
74
|
<xsl:text>Document </xsl:text><xsl:value-of select="."/>
|
75
|
</td>
|
76
|
<td>Fake title</td>
|
77
|
</tr>
|
78
|
</xsl:for-each>
|
79
|
</table>
|
80
|
</form>
|
81
|
|
82
|
</body>
|
83
|
</html>
|
84
|
</xsl:template>
|
85
|
|
86
|
</xsl:stylesheet>
|