Project

General

Profile

metacat / lib / style / skins / metacatui / eml-2 / eml-method.xsl @ 10145

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: leinfelder $'
9
  *     '$Date: 2013-07-25 16:51:46 -0700 (Thu, 25 Jul 2013) $'
10
  * '$Revision: 8080 $'
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="UTF-8"
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
  
42
    <xsl:if test="count(methodStep) > 0">
43
	    <div class="control-group">
44
	    	<label class="control-label">Methods</label>
45
	    	<div class="controls">
46
	    		<div class="accordion" id="methodAccordian">
47
				    <xsl:for-each select="methodStep">
48
				    	<div class="accordion-group">
49
					    	<div class="accordion-heading">
50
					      		<a class="accordion-toggle" data-toggle="collapse">
51
					      			<xsl:attribute name="data-target">#methodStep<xsl:value-of select="position()"/></xsl:attribute>
52
					    			Step<xsl:text> </xsl:text><xsl:value-of select="position()"/>
53
					      		</a>
54
					    	</div>
55
					    	<div class="accordion-body collapse in">
56
					    		<xsl:attribute name="id">methodStep<xsl:value-of select="position()"/></xsl:attribute>
57
						    	<div class="accordion-inner">
58
									<xsl:call-template name="methodStep">
59
								        <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
60
								        <xsl:with-param name="methodsubHeaderStyle" select="$methodsubHeaderStyle"/>
61
									</xsl:call-template>
62
						      </div>
63
				    		</div>
64
					    </div>	
65
				    </xsl:for-each>
66
			    </div>
67
	    	</div>
68
	    </div>
69
    </xsl:if>
70
    
71
    <xsl:if test="count(sampling) > 0">
72
    	<div class="control-group">
73
	    	<label class="control-label">Sampling</label>
74
	    	<div class="controls">
75
	    		<div class="accordion" id="samplingAccordian">
76
				    <xsl:for-each select="sampling">
77
				    	<div class="accordion-group">
78
					    	<div class="accordion-heading">
79
					      		<a class="accordion-toggle" data-toggle="collapse">
80
					      			<xsl:attribute name="data-target">#samplingStep<xsl:value-of select="position()"/></xsl:attribute>
81
					    			Sampling Step<xsl:text> </xsl:text><xsl:value-of select="position()"/>
82
					      		</a>
83
					    	</div>
84
					    	<div class="accordion-body collapse in">
85
						    		<xsl:attribute name="id">samplingStep<xsl:value-of select="position()"/></xsl:attribute>
86
							    	<div class="accordion-inner">
87
								      <xsl:call-template name="sampling">
88
								         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
89
								         <xsl:with-param name="methodsubHeaderStyle" select="$methodsubHeaderStyle"/>
90
								     </xsl:call-template>
91
								</div>
92
							</div>
93
						</div>
94
					</xsl:for-each>
95
				</div>
96
			</div>
97
		</div>
98
    </xsl:if>
99
    			
100
    <xsl:if test="count(qualityControl) > 0">
101
		<div class="control-group">
102
	    	<label class="control-label">Quality Control</label>
103
	    	<div class="controls">
104
	    		<div class="accordion" id="qualityControlAccordian">
105
				    <xsl:for-each select="qualityControl">
106
				    	<div class="accordion-group">
107
					    	<div class="accordion-heading">
108
					      		<a class="accordion-toggle" data-toggle="collapse">
109
					      			<xsl:attribute name="data-target">#qualityControlStep<xsl:value-of select="position()"/></xsl:attribute>
110
					    			Quality Control Step<xsl:text> </xsl:text><xsl:value-of select="position()"/>
111
					      		</a>
112
					    	</div>
113
					    	<div class="accordion-body collapse in">
114
					    		<xsl:attribute name="id">qualityControlStep<xsl:value-of select="position()"/></xsl:attribute>
115
						    	<div class="accordion-inner">
116
									<xsl:call-template name="qualityControl">
117
										<xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
118
										<xsl:with-param name="methodsubHeaderStyle" select="$methodsubHeaderStyle"/>
119
									</xsl:call-template>
120
								</div>
121
							</div>		
122
						</div>	
123
				    </xsl:for-each>
124
				 </div> 
125
			 </div>
126
		 </div>  
127
	</xsl:if>
128
     
129
 </xsl:template>
130

    
131
 <!-- ******************************************
132
      Method step
133
      *******************************************-->
134

    
135
 <xsl:template name="methodStep">
136
   <xsl:param name="methodfirstColStyle"/>
137
   <xsl:param name="methodsubHeaderStyle"/>
138
   <xsl:call-template name="step">
139
     <xsl:with-param name="protocolfirstColStyle" select="$methodfirstColStyle"/>
140
     <xsl:with-param name="protocolsubHeaderStyle" select="$methodsubHeaderStyle"/>
141
   </xsl:call-template>
142
   <xsl:for-each select="dataSource">
143
       <div class="row-fluid">
144
             <xsl:apply-templates mode="dataset">
145
             </xsl:apply-templates>
146
       </div>
147
   </xsl:for-each>
148
 </xsl:template>
149

    
150
 <!-- *********************************************
151
      Sampling
152
      *********************************************-->
153

    
154
 <xsl:template name="sampling">
155
   <xsl:param name="methodfirstColStyle"/>
156
   <xsl:param name="methodsubHeaderStyle"/>
157
   <xsl:for-each select="studyExtent">
158
      <xsl:call-template name="studyExtent">
159
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
160
      </xsl:call-template>
161
   </xsl:for-each>
162
   <xsl:for-each select="samplingDescription">
163
	<div class="control-group">
164
		<label class="control-label">Sampling Description</label>
165
		<div class="controls">
166
			<xsl:call-template name="text">
167
				<xsl:with-param name="textfirstColStyle" select="$methodfirstColStyle"/>
168
			</xsl:call-template>
169
		</div>
170
	</div>
171
   </xsl:for-each>
172
   <xsl:for-each select="spatialSamplingUnits">
173
      <xsl:call-template name="spatialSamplingUnits">
174
         <xsl:with-param name="methodfirstColStyle" select="$methodfirstColStyle"/>
175
      </xsl:call-template>
176
   </xsl:for-each>
177
   <xsl:for-each select="citation">
178
      <div class="control-group">
179
		<label class="control-label">Sampling Citation</label>
180
        <div class="controls">
181
           <xsl:call-template name="citation">
182
            <xsl:with-param name="citationfirstColStyle" select="$methodfirstColStyle"/>
183
            <xsl:with-param name="citationsubHeaderStyle" select="$methodsubHeaderStyle"/>
184
         </xsl:call-template>
185
         </div>
186
      </div>
187
    </xsl:for-each>
188
 </xsl:template>
189

    
190
 <xsl:template name="studyExtent">
191
    <xsl:param name="methodfirstColStyle"/>
192
    <xsl:param name="methodsubHeaderStyle"/>
193
    <xsl:for-each select="coverage">
194
        <div class="control-group">
195
			<label class="control-label">Sampling Coverage</label>
196
         	<div class="controls">
197
	            <xsl:call-template name="coverage">
198
	            </xsl:call-template>
199
			</div>
200
       </div>
201
    </xsl:for-each>
202
    <xsl:for-each select="description">
203
      <div class="control-group">
204
		<label class="control-label">Sampling Area And Frequency</label>
205
         <div class="controls" >
206
           <xsl:call-template name="text">
207
              <xsl:with-param name="textfirstColStyle" select="$methodfirstColStyle"/>
208
           </xsl:call-template>
209
         </div>
210
       </div>
211
    </xsl:for-each>
212
 </xsl:template>
213

    
214
 <xsl:template name="spatialSamplingUnits">
215
   <xsl:param name="methodfirstColStyle"/>
216
   <xsl:for-each select="referenceEntityId">
217
      <div class="control-group">
218
		<label class="control-label">Sampling Unit Reference</label>
219
		<div class="controls">
220
          <xsl:value-of select="."/>
221
		</div>
222
      </div>
223
   </xsl:for-each>
224
   <xsl:for-each select="coverage">
225
      <div class="control-group">
226
		<label class="control-label">Sampling Unit Location</label>
227
		<div class="controls">
228
            <xsl:call-template name="coverage">
229
          </xsl:call-template>
230
		</div>
231
      </div>
232
   </xsl:for-each>
233
 </xsl:template>
234

    
235
 <!-- ***************************************
236
      quality control
237
      ***************************************-->
238
  <xsl:template name="qualityControl">
239
   <xsl:param name="methodfirstColStyle"/>
240
   <xsl:param name="methodsubHeaderStyle"/>
241
   <xsl:call-template name="step">
242
     <xsl:with-param name="protocolfirstColStyle" select="$methodfirstColStyle"/>
243
     <xsl:with-param name="protocolsubHeaderStyle" select="$methodsubHeaderStyle"/>
244
   </xsl:call-template>
245
  </xsl:template>
246

    
247
 </xsl:stylesheet>
248