Project

General

Profile

1 5536 leinfelder
<?xml version="1.0"?>
2
<!--
3
	*  '$RCSfile$'
4
	*      Authors: Matt Jones, CHad Berkley
5
	*    Copyright: 2000 Regents of the University of California and the
6
	*               National Center for Ecological Analysis and Synthesis
7
	*  For Details: http://www.nceas.ucsb.edu/
8
	*
9
	*   '$Author: leinfelder $'
10
	*     '$Date: 2010-08-30 23:34:14 +0000 (Mon, 30 Aug 2010) $'
11
	* '$Revision: 5533 $'
12
	*
13
	* This program is free software; you can redistribute it and/or modify
14
	* it under the terms of the GNU General Public License as published by
15
	* the Free Software Foundation; either version 2 of the License, or
16
	* (at your option) any later version.
17
	*
18
	* This program is distributed in the hope that it will be useful,
19
	* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
	* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
	* GNU General Public License for more details.
22
	*
23
	* You should have received a copy of the GNU General Public License
24
	* along with this program; if not, write to the Free Software
25
	* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
	*
27
	* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
	* convert an XML file showing the resultset of a query
29
	* into an HTML format suitable for rendering with modern web browsers.
30
-->
31
<xsl:stylesheet
32
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
33
	xmlns:sms="http://ecoinformatics.org/sms/annotation.0.9"
34
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
35
	version="2.0">
36
37
	<xsl:output method="html" />
38
	<xsl:param name="sessid" />
39
	<xsl:param name="qformat">semtools</xsl:param>
40
	<xsl:param name="enableediting">false</xsl:param>
41
	<xsl:param name="contextURL"/>
42
43
	<xsl:template name="annotation">
44
		<table align="center" border="0" cellpadding="5" cellspacing="0" width="100%">
45
			<tr>
46
				<th class="tablehead" colspan="2">
47
					Annotation
48
				</th>
49
			</tr>
50
			<tr class="subpanel">
51
				<th	style="text-align: left" colspan="2">Details</th>
52
			</tr>
53
			<tr class="subpanel">
54
				<td class="text_plain" colspan="2">
55
					ID: <xsl:value-of select="./@id"/>
56
					<br />
57
					Data Package: <xsl:value-of select="./@emlPackage"/>
58
					<br />
59
					Data Table: <xsl:value-of select="./@dataTable"/>
60
				</td>
61
			</tr>
62
			<tr class="subpanel">
63
				<th	style="text-align: left">
64
					Entity
65
				</th>
66
				<th	style="text-align: left">
67
					Measurement
68
				</th>
69
			</tr>
70
71
			<xsl:for-each select="./*[local-name()='observation']">
72
				<tr valign="top" class="subpanel">
73
					<xsl:attribute name="class">
74
	              			<xsl:choose>
75
						    <xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
76
						    <xsl:when test="position() mod 2 = 0">roweven</xsl:when>
77
						</xsl:choose>
78
					</xsl:attribute>
79
80
					<!-- observation entity -->
81
					<td class="text_plain">
82
						Class: <xsl:value-of select="substring-after(./*[local-name()='entity']/@id, ':')"/>
83
						<br/>
84
						Ontology: <xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='entity']/@id, ':'), .)"/>
85
						<br />
86
						(Label: <xsl:value-of select="./@label"/>)
87
					</td>
88
					<!-- measurement -->
89
					<td class="text_plain">
90
						<xsl:for-each select="./*[local-name()='measurement']">
91
							<!--
92
							<xsl:value-of select="./@label" />
93
							<br />
94
							-->
95
							Characteristic[s]:
96
							<xsl:for-each select="./*[local-name()='characteristic']">
97
								<xsl:value-of select="./@id" />
98
							</xsl:for-each>
99
							<br/>
100
							Standard: <xsl:value-of select="./*[local-name()='standard']/@id" />
101
							<br/>
102
							Protocol: <xsl:value-of select="./*[local-name()='protocol']/@id" />
103
							<hr/>
104
						</xsl:for-each>
105
					</td>
106
107
				</tr>
108
				<tr class="searchresultsdivider">
109
					<td colspan="5">
110
					</td>
111
				</tr>
112
113
			</xsl:for-each>
114
		</table>
115
	</xsl:template>
116
117
</xsl:stylesheet>