Project

General

Profile

metacat / lib / style / eml2 / eml-method-2.0.0.xsl @ 1689

1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *    Copyright: 2000 Regents of the University of California and the
5
  *               National Center for Ecological Analysis and Synthesis
6
  *  For Details: http://www.nceas.ucsb.edu/
7
  *
8
  *   '$Author: tao $'
9
  *     '$Date: 2003-06-25 17:58:51 -0700 (Wed, 25 Jun 2003) $'
10
  * '$Revision: 1689 $'
11
  *
12
  * This program is free software; you can redistribute it and/or modify
13
  * it under the terms of the GNU General Public License as published by
14
  * the Free Software Foundation; either version 2 of the License, or
15
  * (at your option) any later version.
16
  *
17
  * This program is distributed in the hope that it will be useful,
18
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
  * GNU General Public License for more details.
21
  *
22
  * You should have received a copy of the GNU General Public License
23
  * along with this program; if not, write to the Free Software
24
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25
  *
26
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
27
  * convert an XML file that is valid with respect to the eml-variable.dtd
28
  * module of the Ecological Metadata Language (EML) into an HTML format
29
  * suitable for rendering with modern web browsers.
30
-->
31
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
32

    
33

    
34
 <xsl:output method="html" encoding="iso-8859-1"/>
35
 
36
 <xsl:template name="method">
37
  <xsl:param name="methodfirstColStyle"/>
38
  <xsl:param name="methodsubHeaderStyle"/>
39
  <table class="tabledefault" width="100%">
40
    <xsl:for-each select="methodStep">
41
     <tr><td width="{$firstColWidth}" class="{$methodfirstColStyle}">
42
          <b>Step<xsl:text> </xsl:text><xsl:value-of select="position()"/>:</b>
43
         </td>
44
         <td width="${secondColWidth}" class="{$secondColStyle}">
45
           &#160;
46
         </td>
47
     </tr>
48
     <xsl:call-template name="methodStep">
49
        <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
50
        <xsl:with-param name="methodsubHeaderStyle" select="$methodsubHeaderStyle"/>
51
     </xsl:call-template>
52
    </xsl:for-each>
53
    <xsl:for-each select="sampling">
54
      <xsl:call-template name="sampling">
55
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
56
         <xsl:with-param name="methodsubHeaderStyle" select="$methodsubHeaderStyle"/>
57
     </xsl:call-template>
58
    </xsl:for-each>
59
    <xsl:for-each select="qualityControl">
60
      <tr><td width="{$firstColWidth}" class="{$methodfirstColStyle}">
61
          <b>Quality Control Step<xsl:text> </xsl:text><xsl:value-of select="position()"/>:</b>
62
         </td>
63
         <td width="${secondColWidth}" class="{$secondColStyle}">
64
           &#160;
65
         </td>
66
     </tr>
67
      <xsl:call-template name="qualityControl">
68
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
69
         <xsl:with-param name="methodsubHeaderStyle" select="$methodsubHeaderStyle"/>
70
     </xsl:call-template>
71
    </xsl:for-each>
72
   </table> 
73
 </xsl:template>
74
 
75
 <!-- ******************************************
76
      Method step
77
      *******************************************-->
78
 
79
 <xsl:template name="methodStep">
80
   <xsl:param name="methodfirstColStyle"/>
81
   <xsl:param name="methodsubHeaderStyle"/>
82
   <xsl:call-template name="step">
83
     <xsl:with-param name="protocolfirstColStyle" select="$methodfirstColStyle"/>
84
     <xsl:with-param name="protocolsubHeaderStyle" select="$methodsubHeaderStyle"/>
85
   </xsl:call-template>
86
   <xsl:for-each select="dataSource">
87
       <tr><td colspan="2">
88
             <xsl:call-template name="dataset">
89
             </xsl:call-template>
90
           </td>
91
        </tr>
92
   </xsl:for-each>
93
 </xsl:template>
94
 
95
 <!-- *********************************************
96
      Sampling
97
      *********************************************-->
98
 
99
 <xsl:template name="sampling">
100
   <xsl:param name="methodfirstColStyle"/>
101
   <xsl:param name="methodsubHeaderStyle"/>
102
   <xsl:for-each select="studyExtent">
103
      <xsl:call-template name="studyExtent">
104
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/> 
105
      </xsl:call-template>
106
   </xsl:for-each>
107
   <xsl:for-each select="samplingDescription">
108
     <tr><td width="{$firstColWidth}" class="{$methodfirstColStyle}">
109
         Sampling Description:
110
         </td>
111
         <td width="${secondColWidth}" class="{$secondColStyle}">
112
          <xsl:call-template name="text">
113
           <xsl:with-param name="textfirstColStyle" select="$methodfirstColStyle"/>
114
         </xsl:call-template>
115
         </td>
116
     </tr>
117
   </xsl:for-each>
118
   <xsl:for-each select="spatialSamplingUnits">
119
      <xsl:call-template name="spatialSamplingUnits">
120
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/> 
121
      </xsl:call-template>
122
   </xsl:for-each>
123
   <xsl:for-each select="citation">
124
      <tr><td width="{$firstColWidth}" class="{$methodfirstColStyle}">
125
         Sampling Citation:
126
         </td>
127
         <td width="${secondColWidth}" class="{$secondColStyle}">
128
           <xsl:call-template name="citation">
129
            <xsl:with-param name="citationfirstColStyle" select="$methodfirstColStyle"/>
130
            <xsl:with-param name="citationsubHeaderStyle" select="$methodsubHeaderStyle"/>
131
         </xsl:call-template>
132
         </td>
133
      </tr>
134
    </xsl:for-each>
135
 </xsl:template>
136
 
137
 <xsl:template name="studyExtent">
138
    <xsl:param name="methodfirstColStyle"/>
139
    <xsl:param name="methodsubHeaderStyle"/>
140
    <xsl:for-each select="coverage">
141
        <tr><td width="{$firstColWidth}" class="{$methodfirstColStyle}">
142
         Sampling Coverage:
143
         </td>
144
         <td width="${secondColWidth}" class="{$secondColStyle}">
145
            <xsl:call-template name="coverage">
146
            </xsl:call-template>
147
         </td>
148
       </tr>
149
    </xsl:for-each>
150
    <xsl:for-each select="description">
151
      <tr><td width="{$firstColWidth}" class="{$methodfirstColStyle}">
152
         Sampling Area And Frequency:
153
         </td>
154
         <td width="${secondColWidth}" class="{$secondColStyle}">
155
           <xsl:call-template name="text">
156
              <xsl:with-param name="textfirstColStyle" select="$methodfirstColStyle"/>
157
           </xsl:call-template>
158
         </td>
159
       </tr>
160
    </xsl:for-each>
161
 </xsl:template>
162
 
163
 <xsl:template name="spatialSamplingUnits">
164
   <xsl:param name="methodfirstColStyle"/>
165
   <xsl:for-each select="referenceEntityId">
166
      <tr><td width="{$firstColWidth}" class="{$methodfirstColStyle}">
167
         Sampling Unit Reference:
168
         </td>
169
         <td width="${secondColWidth}" class="{$secondColStyle}">
170
          <xsl:value-of select="."/>
171
         </td>
172
      </tr>
173
   </xsl:for-each>
174
   <xsl:for-each select="coverage">
175
      <tr><td width="{$firstColWidth}" class="{$methodfirstColStyle}">
176
         Sampling Unit Location:
177
         </td>
178
         <td width="${secondColWidth}" class="{$secondColStyle}">
179
            <xsl:call-template name="coverage">
180
          </xsl:call-template>
181
         </td>
182
      </tr>
183
   </xsl:for-each>
184
 </xsl:template>
185
 
186
 <!-- ***************************************
187
      quality control
188
      ***************************************-->
189
  <xsl:template name="qualityControl">
190
   <xsl:param name="methodfirstColStyle"/>
191
   <xsl:param name="methodsubHeaderStyle"/>
192
   <xsl:call-template name="step">
193
     <xsl:with-param name="protocolfirstColStyle" select="$methodfirstColStyle"/>
194
     <xsl:with-param name="protocolsubHeaderStyle" select="$methodsubHeaderStyle"/>
195
   </xsl:call-template>
196
  </xsl:template>
197
 
198
 </xsl:stylesheet>
199