Project

General

Profile

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: cjones $'
9
  *     '$Date: 2006-11-17 13:37:07 -0800 (Fri, 17 Nov 2006) $'
10
  * '$Revision: 3094 $'
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
  <xsl:output method="html" encoding="iso-8859-1"
34
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
35
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
36
    indent="yes" />  
37

    
38
 <xsl:template name="method">
39
  <xsl:param name="methodfirstColStyle"/>
40
  <xsl:param name="methodsubHeaderStyle"/>
41
  <table class="{$tabledefaultStyle}">
42
    <tr>
43
      <th colspan="2">
44
        Step by Step Procedures
45
      </th>
46
    </tr>
47
    <xsl:for-each select="methodStep">
48
     <tr><td class="{$methodfirstColStyle}">
49
          <b>Step<xsl:text> </xsl:text><xsl:value-of select="position()"/>:</b>
50
         </td>
51
         <td width="${secondColWidth}" class="{$secondColStyle}">
52
           &#160;
53
         </td>
54
     </tr>
55
     <xsl:call-template name="methodStep">
56
        <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
57
        <xsl:with-param name="methodsubHeaderStyle" select="$methodsubHeaderStyle"/>
58
     </xsl:call-template>
59
    </xsl:for-each>
60
    <xsl:for-each select="sampling">
61
      <xsl:call-template name="sampling">
62
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
63
         <xsl:with-param name="methodsubHeaderStyle" select="$methodsubHeaderStyle"/>
64
     </xsl:call-template>
65
    </xsl:for-each>
66
    <xsl:for-each select="qualityControl">
67
      <tr><td class="{$methodfirstColStyle}">
68
          <b>Quality Control Step<xsl:text> </xsl:text><xsl:value-of select="position()"/>:</b>
69
         </td>
70
         <td width="${secondColWidth}" class="{$secondColStyle}">
71
           &#160;
72
         </td>
73
     </tr>
74
      <xsl:call-template name="qualityControl">
75
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
76
         <xsl:with-param name="methodsubHeaderStyle" select="$methodsubHeaderStyle"/>
77
     </xsl:call-template>
78
    </xsl:for-each>
79
   </table>
80
 </xsl:template>
81

    
82
 <!-- ******************************************
83
      Method step
84
      *******************************************-->
85

    
86
 <xsl:template name="methodStep">
87
   <xsl:param name="methodfirstColStyle"/>
88
   <xsl:param name="methodsubHeaderStyle"/>
89
   <xsl:call-template name="step">
90
     <xsl:with-param name="protocolfirstColStyle" select="$methodfirstColStyle"/>
91
     <xsl:with-param name="protocolsubHeaderStyle" select="$methodsubHeaderStyle"/>
92
   </xsl:call-template>
93
   <xsl:for-each select="dataSource">
94
       <tr><td colspan="2">
95
             <xsl:apply-templates mode="dataset">
96
             </xsl:apply-templates>
97
           </td>
98
        </tr>
99
   </xsl:for-each>
100
 </xsl:template>
101

    
102
 <!-- *********************************************
103
      Sampling
104
      *********************************************-->
105

    
106
 <xsl:template name="sampling">
107
   <xsl:param name="methodfirstColStyle"/>
108
   <xsl:param name="methodsubHeaderStyle"/>
109
   <xsl:for-each select="studyExtent">
110
      <xsl:call-template name="studyExtent">
111
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
112
      </xsl:call-template>
113
   </xsl:for-each>
114
   <xsl:for-each select="samplingDescription">
115
     <tr><td class="{$methodfirstColStyle}">
116
         Sampling Description:
117
         </td>
118
         <td width="${secondColWidth}">
119
          <xsl:call-template name="text">
120
           <xsl:with-param name="textfirstColStyle" select="$methodfirstColStyle"/>
121
         </xsl:call-template>
122
         </td>
123
     </tr>
124
   </xsl:for-each>
125
   <xsl:for-each select="spatialSamplingUnits">
126
      <xsl:call-template name="spatialSamplingUnits">
127
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
128
      </xsl:call-template>
129
   </xsl:for-each>
130
   <xsl:for-each select="citation">
131
      <tr><td class="{$methodfirstColStyle}">
132
         Sampling Citation:
133
         </td>
134
         <td width="${secondColWidth}">
135
           <xsl:call-template name="citation">
136
            <xsl:with-param name="citationfirstColStyle" select="$methodfirstColStyle"/>
137
            <xsl:with-param name="citationsubHeaderStyle" select="$methodsubHeaderStyle"/>
138
         </xsl:call-template>
139
         </td>
140
      </tr>
141
    </xsl:for-each>
142
 </xsl:template>
143

    
144
 <xsl:template name="studyExtent">
145
    <xsl:param name="methodfirstColStyle"/>
146
    <xsl:param name="methodsubHeaderStyle"/>
147
    <xsl:for-each select="coverage">
148
        <tr><td class="{$methodfirstColStyle}">
149
         Sampling Coverage:
150
         </td>
151
         <td width="${secondColWidth}">
152
            <xsl:call-template name="coverage">
153
            </xsl:call-template>
154
         </td>
155
       </tr>
156
    </xsl:for-each>
157
    <xsl:for-each select="description">
158
      <tr><td class="{$methodfirstColStyle}">
159
         Sampling Area And Frequency:
160
         </td>
161
         <td width="${secondColWidth}" >
162
           <xsl:call-template name="text">
163
              <xsl:with-param name="textfirstColStyle" select="$methodfirstColStyle"/>
164
           </xsl:call-template>
165
         </td>
166
       </tr>
167
    </xsl:for-each>
168
 </xsl:template>
169

    
170
 <xsl:template name="spatialSamplingUnits">
171
   <xsl:param name="methodfirstColStyle"/>
172
   <xsl:for-each select="referenceEntityId">
173
      <tr><td class="{$methodfirstColStyle}">
174
         Sampling Unit Reference:
175
         </td>
176
         <td width="${secondColWidth}" class="{$secondColStyle}">
177
          <xsl:value-of select="."/>
178
         </td>
179
      </tr>
180
   </xsl:for-each>
181
   <xsl:for-each select="coverage">
182
      <tr><td class="{$methodfirstColStyle}">
183
         Sampling Unit Location:
184
         </td>
185
         <td width="${secondColWidth}">
186
            <xsl:call-template name="coverage">
187
          </xsl:call-template>
188
         </td>
189
      </tr>
190
   </xsl:for-each>
191
 </xsl:template>
192

    
193
 <!-- ***************************************
194
      quality control
195
      ***************************************-->
196
  <xsl:template name="qualityControl">
197
   <xsl:param name="methodfirstColStyle"/>
198
   <xsl:param name="methodsubHeaderStyle"/>
199
   <xsl:call-template name="step">
200
     <xsl:with-param name="protocolfirstColStyle" select="$methodfirstColStyle"/>
201
     <xsl:with-param name="protocolsubHeaderStyle" select="$methodsubHeaderStyle"/>
202
   </xsl:call-template>
203
  </xsl:template>
204

    
205
 </xsl:stylesheet>
206

    
(13-13/28)