1 |
1649
|
tao
|
<?xml version="1.0"?>
|
2 |
|
|
<!--
|
3 |
|
|
* '$RCSfile$'
|
4 |
|
|
* Authors: Jivka Bojilova
|
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$'
|
10 |
|
|
* '$Date$'
|
11 |
|
|
* '$Revision$'
|
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 that is valid with respect to the eml-file.dtd
|
29 |
|
|
* module of the Ecological Metadata Language (EML) into an HTML format
|
30 |
|
|
* suitable for rendering with modern web browsers.
|
31 |
|
|
-->
|
32 |
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
<xsl:output method="html" encoding="iso-8859-1"/>
|
36 |
|
|
<!-- This module is for datatable module-->
|
37 |
|
|
|
38 |
1652
|
tao
|
<xsl:template name="dataTable">
|
39 |
1649
|
tao
|
<xsl:param name="datatablefirstColStyle"/>
|
40 |
|
|
<xsl:param name="datatablesubHeaderStyle"/>
|
41 |
|
|
<xsl:param name="docid"/>
|
42 |
|
|
<xsl:param name="entityindex"/>
|
43 |
|
|
<table class="tabledefault" width="100%">
|
44 |
|
|
<xsl:choose>
|
45 |
|
|
<xsl:when test="references!=''">
|
46 |
|
|
<xsl:variable name="ref_id" select="references"/>
|
47 |
|
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
48 |
|
|
<xsl:for-each select="$references">
|
49 |
|
|
<xsl:call-template name="datatablecommon">
|
50 |
|
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
51 |
|
|
<xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
52 |
1652
|
tao
|
<xsl:with-param name="docid" select="$docid"/>
|
53 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
54 |
1649
|
tao
|
</xsl:call-template>
|
55 |
|
|
</xsl:for-each>
|
56 |
|
|
</xsl:when>
|
57 |
|
|
<xsl:otherwise>
|
58 |
|
|
<xsl:call-template name="datatablecommon">
|
59 |
|
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
60 |
|
|
<xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
61 |
1652
|
tao
|
<xsl:with-param name="docid" select="$docid"/>
|
62 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
63 |
1649
|
tao
|
</xsl:call-template>
|
64 |
|
|
</xsl:otherwise>
|
65 |
|
|
</xsl:choose>
|
66 |
|
|
</table>
|
67 |
|
|
</xsl:template>
|
68 |
|
|
|
69 |
|
|
<xsl:template name="datatablecommon">
|
70 |
|
|
<xsl:param name="datatablefirstColStyle"/>
|
71 |
|
|
<xsl:param name="datatablesubHeaderStyle"/>
|
72 |
|
|
<xsl:param name="docid"/>
|
73 |
|
|
<xsl:param name="entityindex"/>
|
74 |
|
|
<xsl:for-each select="entityName">
|
75 |
|
|
<xsl:call-template name="entityName">
|
76 |
|
|
<xsl:with-param name="entityfirstColStyle" select="$datatablefirstColStyle"/>
|
77 |
|
|
</xsl:call-template>
|
78 |
|
|
</xsl:for-each>
|
79 |
|
|
<xsl:for-each select="alternateIdentifier">
|
80 |
|
|
<xsl:call-template name="entityalternateIdentifier">
|
81 |
|
|
<xsl:with-param name="entityfirstColStyle" select="$datatablefirstColStyle"/>
|
82 |
|
|
</xsl:call-template>
|
83 |
|
|
</xsl:for-each>
|
84 |
|
|
<xsl:for-each select="entityDescription">
|
85 |
|
|
<xsl:call-template name="entityDescription">
|
86 |
|
|
<xsl:with-param name="entityfirstColStyle" select="$datatablefirstColStyle"/>
|
87 |
|
|
</xsl:call-template>
|
88 |
|
|
</xsl:for-each>
|
89 |
|
|
<xsl:for-each select="additionalInfo">
|
90 |
|
|
<xsl:call-template name="entityDescription">
|
91 |
|
|
<xsl:with-param name="entityfirstColStyle" select="$datatablefirstColStyle"/>
|
92 |
|
|
</xsl:call-template>
|
93 |
|
|
</xsl:for-each>
|
94 |
|
|
<!-- call physical moduel without show distribution(we want see it later)-->
|
95 |
|
|
<xsl:if test="physical">
|
96 |
|
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
97 |
|
|
Physical Structure Description
|
98 |
|
|
</td></tr>
|
99 |
|
|
</xsl:if>
|
100 |
1652
|
tao
|
<tr><td colspan="2">
|
101 |
|
|
<xsl:for-each select="physical">
|
102 |
|
|
<xsl:call-template name="physical">
|
103 |
1649
|
tao
|
<xsl:with-param name="physicalfirstColStyle" select="$datatablefirstColStyle"/>
|
104 |
|
|
<xsl:with-param name="notshowdistribution">yes</xsl:with-param>
|
105 |
1652
|
tao
|
</xsl:call-template>
|
106 |
|
|
</xsl:for-each>
|
107 |
|
|
</td></tr>
|
108 |
1649
|
tao
|
<xsl:for-each select="caseSensitive">
|
109 |
|
|
<xsl:call-template name="datatablecaseSensitive">
|
110 |
|
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
111 |
|
|
</xsl:call-template>
|
112 |
|
|
</xsl:for-each>
|
113 |
|
|
<xsl:for-each select="numberOfRecords">
|
114 |
|
|
<xsl:call-template name="datatablenumberOfRecords">
|
115 |
|
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
116 |
|
|
</xsl:call-template>
|
117 |
|
|
</xsl:for-each>
|
118 |
|
|
<xsl:if test="coverage">
|
119 |
|
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
120 |
|
|
Coverage Description
|
121 |
|
|
</td></tr>
|
122 |
|
|
</xsl:if>
|
123 |
|
|
<xsl:for-each select="coverage">
|
124 |
|
|
<tr><td colspan="2">
|
125 |
|
|
<xsl:call-template name="coverage">
|
126 |
|
|
</xsl:call-template>
|
127 |
|
|
</td></tr>
|
128 |
|
|
</xsl:for-each>
|
129 |
|
|
<xsl:if test="method">
|
130 |
|
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
131 |
|
|
Method Description
|
132 |
|
|
</td></tr>
|
133 |
|
|
</xsl:if>
|
134 |
|
|
<xsl:for-each select="method">
|
135 |
|
|
<tr><td colspan="2">
|
136 |
|
|
<xsl:call-template name="method">
|
137 |
|
|
<xsl:with-param name="methodfirstColStyle" select="$datatablefirstColStyle"/>
|
138 |
|
|
</xsl:call-template>
|
139 |
|
|
</td></tr>
|
140 |
|
|
</xsl:for-each>
|
141 |
|
|
<xsl:if test="method">
|
142 |
|
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
143 |
|
|
Method Description
|
144 |
|
|
</td></tr>
|
145 |
|
|
</xsl:if>
|
146 |
|
|
<xsl:for-each select="constraint">
|
147 |
|
|
<tr><td colspan="2">
|
148 |
|
|
<xsl:call-template name="constraint">
|
149 |
|
|
<xsl:with-param name="constraintfirstColStyle" select="$datatablefirstColStyle"/>
|
150 |
|
|
</xsl:call-template>
|
151 |
|
|
</td></tr>
|
152 |
|
|
</xsl:for-each>
|
153 |
|
|
<!-- Here to display distribution info-->
|
154 |
|
|
<xsl:for-each select="physical">
|
155 |
|
|
<xsl:call-template name="showdistribution">
|
156 |
1652
|
tao
|
<xsl:with-param name="docid" select="$docid"/>
|
157 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
158 |
|
|
<xsl:with-param name="physicalindex" select="position()"/>
|
159 |
1649
|
tao
|
<xsl:with-param name="disfirstColStyle" select="$datatablefirstColStyle"/>
|
160 |
|
|
<xsl:with-param name="dissubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
161 |
|
|
</xsl:call-template>
|
162 |
|
|
</xsl:for-each>
|
163 |
1652
|
tao
|
<xsl:for-each select="attributeList">
|
164 |
|
|
<xsl:call-template name="datatableattributeList">
|
165 |
1649
|
tao
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
166 |
|
|
<xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
167 |
1652
|
tao
|
<xsl:with-param name="docid" select="$docid"/>
|
168 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
169 |
1649
|
tao
|
</xsl:call-template>
|
170 |
|
|
</xsl:for-each>
|
171 |
|
|
|
172 |
|
|
</xsl:template>
|
173 |
|
|
|
174 |
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
|
|
<xsl:template name="datatablecaseSensitive">
|
178 |
|
|
<xsl:param name="datatablefirstColStyle"/>
|
179 |
|
|
<tr><td width="{$firstColWidth}" class="{$datatablefirstColStyle}">
|
180 |
1652
|
tao
|
Case Sensitive?</td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
181 |
|
|
<xsl:value-of select="."/></td></tr>
|
182 |
1649
|
tao
|
|
183 |
|
|
</xsl:template>
|
184 |
|
|
|
185 |
|
|
<xsl:template name="datatablenumberOfRecords">
|
186 |
|
|
<xsl:param name="datatablefirstColStyle"/>
|
187 |
|
|
<tr><td width="{$firstColWidth}" class="{$datatablefirstColStyle}">
|
188 |
|
|
Number Of Records:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
|
189 |
|
|
<xsl:value-of select="."/></td></tr>
|
190 |
|
|
</xsl:template>
|
191 |
|
|
|
192 |
|
|
<xsl:template name="showdistribution">
|
193 |
|
|
<xsl:param name="datatablefirstColStyle"/>
|
194 |
|
|
<xsl:param name="datatablesubHeaderStyle"/>
|
195 |
|
|
<xsl:param name="docid"/>
|
196 |
|
|
<xsl:param name="level">entitylevel</xsl:param>
|
197 |
|
|
<xsl:param name="entitytype">dataTable</xsl:param>
|
198 |
|
|
<xsl:param name="entityindex"/>
|
199 |
|
|
<xsl:param name="physicalindex"/>
|
200 |
|
|
|
201 |
|
|
<xsl:for-each select="distribution">
|
202 |
|
|
<tr><td colspan="2">
|
203 |
|
|
<xsl:call-template name="distribution">
|
204 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
205 |
|
|
<xsl:with-param name="level" select="$level"/>
|
206 |
|
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
207 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
208 |
|
|
<xsl:with-param name="physicalindex" select="$physicalindex"/>
|
209 |
|
|
<xsl:with-param name="distributionindex" select="position()"/>
|
210 |
|
|
<xsl:with-param name="disfirstColStyle" select="$datatablefirstColStyle"/>
|
211 |
|
|
<xsl:with-param name="dissubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
212 |
|
|
</xsl:call-template>
|
213 |
|
|
</td></tr>
|
214 |
|
|
</xsl:for-each>
|
215 |
|
|
</xsl:template>
|
216 |
|
|
|
217 |
|
|
|
218 |
|
|
<xsl:template name="datatableattributeList">
|
219 |
|
|
<xsl:param name="datatablefirstColStyle"/>
|
220 |
|
|
<xsl:param name="datatablesubHeaderStyle"/>
|
221 |
|
|
<xsl:param name="docid"/>
|
222 |
|
|
<xsl:param name="entitytype">dataTable</xsl:param>
|
223 |
|
|
<xsl:param name="entityindex"/>
|
224 |
|
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
225 |
|
|
<xsl:text>Attribute Info:</xsl:text>
|
226 |
|
|
</td></tr>
|
227 |
|
|
<tr><td width="{$firstColWidth}" class="{$datatablefirstColStyle}">
|
228 |
|
|
<xsl:text> </xsl:text></td>
|
229 |
|
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
230 |
|
|
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&displaymodule=attribute&entitytype=<xsl:value-of select="$entitytype"/>&entityindex=<xsl:value-of select="$entityindex"/></xsl:attribute>
|
231 |
|
|
<br>Attribute List</br></a>
|
232 |
|
|
</td>
|
233 |
|
|
</tr>
|
234 |
|
|
</xsl:template>
|
235 |
|
|
|
236 |
|
|
|
237 |
|
|
|
238 |
|
|
</xsl:stylesheet>
|