Project

General

Profile

1
<?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:key name="mapping" match="//*[local-name()='map']" use="@measurement" />
44
	
45
	<xsl:template name="annotation">
46
			
47
		<table align="center" border="0" cellpadding="5" cellspacing="0" width="100%">
48
			<tr>
49
				<th class="tablehead" colspan="2">
50
					Annotation
51
				</th>
52
			</tr>
53
			<tr class="subpanel">
54
				<th	style="text-align: left" colspan="2">Details</th>
55
			</tr>
56
			<tr class="subpanel">	
57
				<td class="text_plain" colspan="2">
58
					ID: <xsl:value-of select="./@id"/>
59
					<br />
60
					Data Package: <xsl:value-of select="./@emlPackage"/>
61
					<br />
62
					Data Table: <xsl:value-of select="./@dataTable"/>
63
				</td>
64
			</tr>
65
			<tr class="subpanel">
66
				<th	style="text-align: left">
67
					Entity
68
				</th>
69
				<th	style="text-align: left"> 	
70
					Measurement
71
				</th>
72
			</tr>
73
	
74
			<xsl:for-each select="./*[local-name()='observation']">
75
				<tr valign="top" class="subpanel">
76
					<xsl:attribute name="class">
77
	              			<xsl:choose>
78
						    <xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
79
						    <xsl:when test="position() mod 2 = 0">roweven</xsl:when>
80
						</xsl:choose>
81
					</xsl:attribute>
82
	
83
					<!-- observation entity -->
84
					<td class="text_plain">
85
						Class: <xsl:value-of select="substring-after(./*[local-name()='entity']/@id, ':')"/>
86
						<br/>
87
						Ontology: <xsl:value-of select="fn:namespace-uri-for-prefix(substring-before(./*[local-name()='entity']/@id, ':'), .)"/>
88
						<br />
89
						(Label: <xsl:value-of select="./@label"/>)
90
					</td>
91
					<!-- measurement -->
92
					<td class="text_plain">
93
						<xsl:for-each select="./*[local-name()='measurement']">
94
							<xsl:for-each select="key('mapping', @label)">
95
								Column: <xsl:value-of select="./@attribute" />
96
								<br />
97
							</xsl:for-each>
98
							<!-- 
99
							<xsl:value-of select="./@label" />
100
							<br />
101
							-->
102
							Characteristic[s]: 
103
							<xsl:for-each select="./*[local-name()='characteristic']">
104
								<xsl:value-of select="./@id" />
105
							</xsl:for-each>
106
							<br/>
107
							Standard: <xsl:value-of select="./*[local-name()='standard']/@id" />
108
							<br/>
109
							Protocol: <xsl:value-of select="./*[local-name()='protocol']/@id" />
110
							<hr/>
111
						</xsl:for-each>
112
					</td>
113
					
114
				</tr>
115
				<tr class="searchresultsdivider">
116
					<td colspan="5">
117
					</td>
118
				</tr>
119
	
120
			</xsl:for-each>
121
		</table>
122
	</xsl:template>
123

    
124
</xsl:stylesheet>
(3-3/21)