Project

General

Profile

1 7982 leinfelder
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matthew Brooke
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-variable.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 8005 leinfelder
  <xsl:output method="html" encoding="UTF-8"
35 7982 leinfelder
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
36
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
37
              indent="yes" />
38
39
40
   <xsl:template name="project">
41
        <xsl:choose>
42
         <xsl:when test="references!=''">
43
          <xsl:variable name="ref_id" select="references"/>
44
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
45
          <xsl:for-each select="$references">
46 9561 cjones
            <div class="row-fluid project" data-content="project">
47
              <xsl:call-template name="projectcommon" />
48
            </div>
49 7982 leinfelder
          </xsl:for-each>
50
        </xsl:when>
51
        <xsl:otherwise>
52 9561 cjones
          <div class="row-fluid project" data-content="project" id="project">
53
            <xsl:call-template name="projectcommon" />
54
          </div>
55 7982 leinfelder
        </xsl:otherwise>
56
      </xsl:choose>
57
  </xsl:template>
58
59
60
61
  <xsl:template name="projectcommon">
62 9561 cjones
    <xsl:call-template name="projecttitle" />
63
    <xsl:call-template name="projectpersonnel" />
64
    <xsl:call-template name="projectabstract" />
65
    <xsl:call-template name="projectfunding" />
66
    <xsl:call-template name="projectstudyareadescription" />
67
    <xsl:call-template name="projectdesigndescription" />
68
    <xsl:call-template name="projectrelatedproject" />
69 7982 leinfelder
  </xsl:template>
70
71
72
73
   <xsl:template name="projecttitle">
74
     <xsl:for-each select="title">
75 9561 cjones
	   <div class="control-group">
76
	     <label class="control-label projectTitle">Title:</label>
77
	   	 <div class="controls controls-well">
78
		   <xsl:value-of select="../title" />
79
	   	 </div>
80
	   </div>
81 7982 leinfelder
     </xsl:for-each>
82
  </xsl:template>
83
84
85
86
  <xsl:template name="projectpersonnel">
87 9561 cjones
	<div class="control-group">
88
		<label class="control-label projectPersonnel">Personnel:</label>
89
		<div class="controls control-well">
90
			<xsl:for-each select="personnel">
91
92
				<xsl:call-template name="party" />
93
94
				<xsl:for-each select="role">
95
					<label class="control-label projectRole">Role:</label>
96
					<div class="controls controls-well">
97
						<xsl:value-of select="." />
98
					</div>
99
				</xsl:for-each>
100
101
			</xsl:for-each>
102
		</div>
103
	</div>
104 7982 leinfelder
  </xsl:template>
105
106
107
   <xsl:template name="projectabstract">
108
     <xsl:for-each select="abstract">
109 9561 cjones
       <div class="control-group">
110
         <label class="control-label projectAbstract">Abstract:</label>
111
         <xsl:call-template name="text" />
112
       </div>
113 7982 leinfelder
     </xsl:for-each>
114
  </xsl:template>
115
116
  <xsl:template name="projectfunding">
117
     <xsl:for-each select="funding">
118 9561 cjones
	   <div class="control-group">
119
	     <label class="control-label projectFunding">Funding:</label>
120
	     <div class="controls controls-well projectFundingValue" >
121
	       <xsl:call-template name="text" />
122
	     </div>
123
	   </div>
124 7982 leinfelder
    </xsl:for-each>
125
  </xsl:template>
126
127
128
129
   <xsl:template name="projectstudyareadescription">
130
     <xsl:for-each select="studyAreaDescription">
131 9561 cjones
       <label class="control-label projectStudyAreaDescription"><xsl:text>Study Area:</xsl:text></label>
132
              <div class="control-group">
133 7982 leinfelder
                  <xsl:for-each select="descriptor">
134
                      <xsl:for-each select="descriptorValue">
135 9561 cjones
                      <label class="control-label"><xsl:value-of select="../@name"/></label>
136
                          <div class="controls controls-well">
137 7982 leinfelder
                             <xsl:choose>
138
                                <xsl:when test="./@citableClassificationSystem">
139
                                  <xsl:value-of select="."/>&#160;<xsl:value-of select="./@name_or_id"/>
140
                                </xsl:when>
141
                                <xsl:otherwise>
142
                                  <xsl:value-of select="."/>&#160;<xsl:value-of select="./@name_or_id"/>&#160;(No Citable Classification System)
143
                                </xsl:otherwise>
144
                              </xsl:choose>
145 9561 cjones
                          </div>
146 7982 leinfelder
                      </xsl:for-each>
147 9561 cjones
148 7982 leinfelder
                      <xsl:for-each select="citation">
149 9561 cjones
                        <label class="control-label projectCitation">Citation:</label>
150
                        <div class="controls controls-well">
151
                          <xsl:call-template name="citation" />
152
                        </div>
153 7982 leinfelder
                    </xsl:for-each>
154 9561 cjones
155 7982 leinfelder
               </xsl:for-each>
156 9561 cjones
            </div>
157 7982 leinfelder
158
       <xsl:for-each select="citation">
159 9561 cjones
          <div class="control-group">
160
			<label class="control-label projectCitation">Study Area Citation:</label>
161
            <div class="controls controls-well">
162
              <xsl:call-template name="citation" />
163
            </div>
164
          </div>
165
166 7982 leinfelder
      </xsl:for-each>
167
168
       <xsl:for-each select="coverage">
169 9561 cjones
         <div class="control-group">
170
           <label class="control-label">Study Area Coverage:</label>
171
           <div class="controls controls-well">
172
             <xsl:call-template name="coverage" />
173
           </div>
174
         </div>
175 7982 leinfelder
      </xsl:for-each>
176
    </xsl:for-each>
177
   </xsl:template>
178
179
180
181
  <xsl:template name="projectdesigndescription">
182
    <xsl:for-each select="designDescription">
183
       <xsl:for-each select="description">
184 9561 cjones
         <div class="control-group">
185
           <label class="control-label">Design Description:</label>
186
           <div class="controls controls-well">
187 7982 leinfelder
             <xsl:call-template name="text"/>
188 9561 cjones
           </div>
189
         </div>
190 7982 leinfelder
      </xsl:for-each>
191
      <xsl:for-each select="citation">
192 9561 cjones
        <div class="control-group">
193
          <label class="control-label">Design Citation:</label>
194
          <div class="controls controls-well">
195 7982 leinfelder
             <xsl:call-template name="citation"/>
196 9561 cjones
          </div>
197
       </div>
198 7982 leinfelder
      </xsl:for-each>
199
    </xsl:for-each>
200
  </xsl:template>
201
202
203
204
  <xsl:template name="projectrelatedproject">
205
    <xsl:for-each select="relatedProject">
206 9561 cjones
       <div class="control-group">
207
       <label class="control-label">Related Project:</label>
208
          <div>
209
            <xsl:call-template name="project" />
210
         </div>
211
       </div>
212 7982 leinfelder
    </xsl:for-each>
213
  </xsl:template>
214
215
216
</xsl:stylesheet>