Project

General

Profile

« Previous | Next » 

Revision 5501

Added by Jing Tao almost 14 years ago

Merge 1.9.3 branch to the trunk.

View differences:

karxml.xsl
6 6
*               National Center for Ecological Analysis and Synthesis
7 7
*  For Details: http://www.nceas.ucsb.edu/
8 8
*
9
*   '$Author: leinfelder $'
10
*     '$Date: 2008-06-17 13:16:32 -0700 (Tue, 17 Jun 2008) $'
11
* '$Revision: 4006 $'
9
*   '$Author: tao $'
10
*     '$Date: 2010-08-13 11:10:50 -0700 (Fri, 13 Aug 2010) $'
11
* '$Revision: 5498 $'
12 12
*
13 13
* This program is free software; you can redistribute it and/or modify
14 14
* it under the terms of the GNU General Public License as published by
......
51 51
        <link rel="stylesheet" type="text/css"
52 52
            href="{$contextURL}/style/skins/{$qformat}/{$qformat}.css" />
53 53

  
54
		<script language="Javascript" type="text/JavaScript"
55
            src="{$contextURL}/style/skins/{$qformat}/{$qformat}.js">
56
            <xsl:text disable-output-escaping="yes">
57
            </xsl:text>
58
        </script>
59
        <script language="Javascript" type="text/JavaScript"
60
            src="{$contextURL}/style/common/branding.js">
61
          <xsl:text disable-output-escaping="yes">
62
          </xsl:text>
63
        </script>
54 64
        <style type="text/css">
55 65
          <xsl:text disable-output-escaping="yes">
56 66
body, a, p, td, tr, h3, h2, h1
......
90 100
      </head>
91 101

  
92 102
      <body>
103
		  <script language="JavaScript">
104
          <![CDATA[
105
          insertTemplateOpening("]]><xsl:value-of select="$contextURL" /><![CDATA[");
106
         ]]>
107
        </script>
93 108
        <table cellspacing="8" cellpadding="0" style="border: none; width: 100%;" class="main">
94 109
          <colgroup></colgroup>
95 110
          <colgroup style="width: 75%;"></colgroup>
96 111
          <colgroup style="width: 25%;"></colgroup>
97 112

  
98 113
          <tr class="top-level">
99
            <td colspan="2">
114
            <td colspan="3">
100 115
              <h1>
101 116
                <span style="padding-right: 2em;">
102
                  <xsl:value-of select="//karEntry/karEntryXML/entity/@name"/>
117
                  <xsl:value-of select="substring-before(//karFileName, '.')"/>
103 118
                </span>
104 119

  
105 120
                <span style="font-size: smaller;">
106
                  <xsl:text> (</xsl:text>
107
                  <xsl:value-of select="//karEntry/karEntryXML/entity/property[@name='class']/@value"/>
108
                  <xsl:text>)</xsl:text>
109
                </span>
110
              </h1>
111
            </td>
112

  
113
            <td>
114
              <table cellspacing="0" cellpadding="0">
115
                <xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='author']) &gt; 0">
116
                  <tr>
117
                    <td style="font-style: italic;">
118
                      Author:
119
                    </td>
120

  
121
                    <td>
122
                      <xsl:for-each select="//karEntry/karEntryXML/entity/property[@name='author']">
123
                        <xsl:if test="position() &gt; 1">
124
                          <xsl:text>, </xsl:text>
125
                        </xsl:if>
126

  
127
                        <xsl:value-of select="configure"/>
128
                      </xsl:for-each>
129
                    </td>
130
                  </tr>
131
                </xsl:if>
132

  
133
                <xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='version']) &gt; 0">
134
                  <tr>
135
                    <td style="font-style: italic;">
136
                      Version:
137
                    </td>
138

  
139
                    <td>
140
                      <xsl:value-of select="//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='version']/configure"/>
141
                    </td>
142
                  </tr>
143
                </xsl:if>
144
              </table>
145
            </td>
146
          </tr>
147

  
148
          <tr class="top-level" style="vertical-align: top;">
149
            <td>
150
              <img alt="Actor Image">
151
                <xsl:attribute name="src">
152
                  <xsl:text>metacat?qformat=</xsl:text>
153
                  <xsl:value-of select="$qformat"/>
154
                  <xsl:text>&amp;sessionid=</xsl:text>
155
                  <xsl:value-of select="$sessid"/>
156
                  <xsl:text>&amp;action=read&amp;docid=</xsl:text>
157
                  <!--xsl:value-of select="./docid"/--><xsl:text>PLASMA</xsl:text>
158
                </xsl:attribute>
159
              </img>
160

  
161
              <div style="text-align: center;">
162
				 <xsl:variable name="karDocid">
121
					<xsl:variable name="karDocid">
163 122
                            <xsl:call-template name="extractDocidFromLsid">
164 123
                                <xsl:with-param name="lsidString" select="//mainAttributes/lsid" />
165 124
                            </xsl:call-template>
......
167 126
                     
168 127
                <a>
169 128
                   <!--<xsl:attribute name="href"><xsl:value-of select="$httpServer"/>/authority/data?lsid=<xsl:value-of select="/entity/property[@name='karId']/@value"/></xsl:attribute>-->
170
					<xsl:attribute name="href">
129
                    <xsl:attribute name="href">
171 130
                         <xsl:text>metacat?</xsl:text>
172 131
                        <xsl:text>&amp;action=read&amp;docid=</xsl:text>
173 132
                        <xsl:value-of select="$karDocid"/>
174 133
                      </xsl:attribute>
175 134
                  <xsl:text>Download</xsl:text>
176 135
                </a>
177
              </div>
136
                  <!--<xsl:text> (</xsl:text>
137
                  <xsl:value-of select="//karEntry/karEntryXML/entity/property[@name='class']/@value"/>
138
                  <xsl:text>)</xsl:text>-->
139
                </span>
140
              </h1>
141
				
142
		
178 143
            </td>
179 144

  
180
            <td colspan="2">
181
              <!-- <xsl:value-of select="/entity/property[@name='KeplerDocumentation']/property[@name='description']/configure"/> -->
182

  
183
              <xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure) &gt; 0">
184
                <p><xsl:value-of select="//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure"/></p>
185
              </xsl:if>
186
            </td>
145
            <!--<td>
146
              
147
            </td>-->
187 148
          </tr>
188

  
189
          <tr class="top-level">
190
            <td colspan="3">
191
              <table cellspacing="0" cellpadding="0">
192
                <xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']) &gt; 0">
193
                  <tr>
194
                    <td colspan="2">
195
                      <h2>Parameters</h2>
149
			
150
		 <xsl:for-each select="//karEntry">
151
		   <xsl:choose>
152
			   <xsl:when test="./karEntryXML/entity/@name!=''">
153
              <!-- this is workflow kar entry-->
154
                  <tr class="top-level">
155
                    <td>
156
					   <h3>
157
						   <xsl:value-of select="./karEntryXML/entity/@name"/>    
158
						</h3>      
196 159
                    </td>
197
                  </tr>
160
                    
161
                    <td  colspan="2">
162
              
163
                        <table cellspacing="0" cellpadding="0">
164
             
165
							  <tr>
166
                                    <td colspan="2">
167
                                      <h4>Documentation</h4>
168
                                    </td>
169
                                  </tr>
170
							  <tr>
171
                                <td style="font-style: italic;">
172
                                  Author:
173
                                </td>
174
                                <td>
175
									<xsl:choose>
176
										<xsl:when test="count(karEntryXML/entity/property[@name='author']) &gt; 0">
177
											<xsl:for-each select="karEntryXML/entity/property[@name='author']">
178
												<xsl:if test="position() &gt; 1">
179
												  <xsl:text>, </xsl:text>
180
											    </xsl:if>
181
												<xsl:value-of select="configure"/>
182
										  </xsl:for-each> 
183
										</xsl:when>
184
										 <xsl:otherwise>
185
											  Unkown
186
										 </xsl:otherwise>
187
									</xsl:choose>                                
188
                                </td>
189
                              </tr>
198 190

  
199
                  <xsl:for-each select="//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']">
200
                    <tr>
201
                      <td style="font-style: italic;">
202
                        <xsl:value-of select="substring(@name, 6)"/>
203
                      </td>
204

  
205
                      <td>
206
                        <xsl:value-of select="configure"/>
207
                      </td>
208
                    </tr>
209
                  </xsl:for-each>
210
                </xsl:if>
211

  
212
                <xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']) &gt; 0">
213
                  <tr>
214
                    <td colspan="2">
215
                      <h2>Ports</h2>
191
                            <tr>
192
                                <td style="font-style: italic;">
193
                                  Version:
194
                                </td>
195
                                <td>
196
                                <xsl:choose>
197
                                        <xsl:when test="count(karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='version']) &gt; 0">
198
                                            <xsl:for-each select="karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='version']">
199
                                                <xsl:if test="position() &gt; 1">
200
                                                  <xsl:text>, </xsl:text>
201
                                                </xsl:if>
202
                                                <xsl:value-of select="configure"/>
203
                                          </xsl:for-each> 
204
                                        </xsl:when>
205
                                         <xsl:otherwise>
206
                                              Unkown
207
                                         </xsl:otherwise>
208
                                    </xsl:choose>                
209
                                </td>
210
                          </tr>              
211
                         
212
                  					
213
					  <!-- <xsl:value-of select="/entity/property[@name='KeplerDocumentation']/property[@name='description']/configure"/> -->                     
214
				 			
215
			
216
							<xsl:if test="count(karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure) &gt; 0">
217
									  <tr class="top-level">
218
										<td colspan="2">    
219
										  <p><xsl:value-of select="karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure"/></p>
220
									   </td>                   
221
									  </tr>
222
							 </xsl:if>        
223
							 <tr>
224
                                    <td colspan="2">
225
                                      <h4>Parameters</h4>
226
                                    </td>
227
                                  </tr>
228
								<xsl:choose>								
229
									<xsl:when test="count(karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']) &gt; 0">
230
									  <xsl:for-each select="karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']">
231
										<tr>
232
					                      <td style="font-style: italic;">
233
										    <xsl:value-of select="substring(@name, 6)"/>
234
										  </td>
235
										  <td>
236
											<xsl:value-of select="configure"/>
237
										  </td>
238
										</tr>
239
									  </xsl:for-each>
240
									</xsl:when>
241
								    <xsl:otherwise>
242
										<tr>
243
											<td>
244
												No description
245
											</td>
246
										</tr>
247
										
248
									</xsl:otherwise>	
249
								</xsl:choose>
250
                                <!--<tr>
251
									<td colspan="2">
252
										  <h4>Ports</h4>
253
									</td>
254
								 </tr>
255
								<xsl:choose>
256
									<xsl:when test="count(karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']) &gt; 0">                 
257
									  <xsl:for-each select="karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']">
258
										<tr>
259
										  <td style="font-style: italic;">
260
												<xsl:value-of select="substring(@name, 6)"/>
261
										  </td>
262
										  <td>
263
											<xsl:value-of select="configure"/>
264
										  </td>
265
										</tr>
266
									  </xsl:for-each>
267
									</xsl:when>
268
									<xsl:otherwise>
269
										<tr>
270
                                          <td style="font-style: italic;">
271
                                                 No description
272
                                          </td>
273
										</tr>                                      
274
                                    </xsl:otherwise>
275
								</xsl:choose> -->            
276
				  </table>   
277
			   </td> 
278
              </tr>
279
                   
280
              
281
			 </xsl:when>
282
			  <xsl:otherwise>
283
				  <!-- this is for workflow run, reporting and et al-->
284
				  <tr class="top-level">
285
                    <td>
286
					   <h3>
287
                         <xsl:value-of select="karEntryAttributes/Name"/>
288
						</h3>          
216 289
                    </td>
290
                    <td colspan="2"> 
291
						<table cellspacing="0" cellpadding="0">  
292
							<tr>
293
                               <td>
294
                                      <h4>Type</h4>
295
                                 </td>
296
							</tr>
297
							<tr>
298
                               <td>
299
                                      <xsl:value-of select="karEntryAttributes/type"/>
300
                                 </td>
301
                            </tr>                                
302
					  </table>
303
                    </td>
217 304
                  </tr>
218

  
219
                  <xsl:for-each select="//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']">
220
                    <tr>
221
                      <td style="font-style: italic;">
222
                        <xsl:value-of select="substring(@name, 6)"/>
223
                      </td>
224

  
225
                      <td>
226
                        <xsl:value-of select="configure"/>
227
                      </td>
228
                    </tr>
229
                  </xsl:for-each>
230
                </xsl:if>
231
              </table>
232
            </td>
233
          </tr>
305
			  </xsl:otherwise>
306
		   </xsl:choose>
307
		 </xsl:for-each>
234 308
        </table>
235 309
      </body>
236 310
    </html>

Also available in: Unified diff