Project

General

Profile

« Previous | Next » 

Revision 1525

Added by Jing Tao about 21 years ago

Add code to handle eml document

View differences:

lib/style/resultset.xsl
88 88
             <input type="hidden" name="action" value="query" />   
89 89
             <input type="hidden" name="qformat" value="knb" />
90 90
             <input type="hidden" name="operator" value="UNION" />
91
            
91
             
92
             <input type="hidden" name="returnfield"
93
              value="creator/individualName/surName" />
94
             <input type="hidden" name="returnfield"
95
              value="creator/organizationName" />
92 96
             <input type="hidden" name="returnfield" 
93 97
              value="originator/individualName/surName" />
94 98
             <input type="hidden" name="returnfield" 
......
100 104
             <input type="hidden" name="returnfield" 
101 105
              value="keyword" />
102 106
             <input type="hidden" name="returndoctype"
107
              value="eml://ecoinformatics.org/eml-2.0.0" />
108
             <input type="hidden" name="returndoctype"
103 109
              value="-//NCEAS//eml-dataset-2.0//EN" />
104 110
             <input type="hidden" name="returndoctype"
105 111
              value="-//NCEAS//resource//EN" />
......
142 148
               </xsl:choose>
143 149
             </xsl:attribute>
144 150

  
145
<!--
151

  
146 152
             <td>
147
               <xsl:value-of select="./param[@name='title']"/>
148
               <br/>
149
               <p><pre>Document ID: <xsl:value-of select="./docid"/></pre></p>
150
             </td>
151
-->
152
             <td>
153 153
               <form action="@html-path@/servlet/metacat" method="POST">
154 154
                 <xsl:attribute name="name">
155 155
                   <xsl:value-of select="translate(./docid,'.','')"/>
......
181 181
                 </a><br />
182 182
                 <br/>
183 183
                 <p><pre>Document ID: <xsl:value-of select="./docid"/></pre></p>
184
<!--
185
                 <a>
186
                   <xsl:attribute name="href">javascript:submitform1('read','resource/%/abstract',document.<xsl:value-of select="translate(./docid,'.','')"/>)</xsl:attribute>
187
                   View Abstract
188
                 </a><br />
189
                 <a>
190
                   <xsl:attribute name="href">javascript:submitform2('read','zip',document.<xsl:value-of select="translate(./docid,'.','')"/>)</xsl:attribute>
191
                    Download Data and Metadata
192
                 </a><br />
193
-->
184

  
194 185
               </form>
195 186
             </td>
196
<!--
187

  
197 188
             <td>
198
               <xsl:if test="count(./relation) &gt; 0">
199
                 <xsl:for-each select="./relation">
200
                   <a>
201
                     <xsl:if test="starts-with(./triple, 'http')">
202
                       <xsl:attribute name="href">
203
                         <xsl:value-of select="./relationdoc" />
204
                       </xsl:attribute>
205
                       <xsl:if 
206
                        test="./relationdoctype = '-//NCEAS//eml-variable//EN'">
207
                         Variable Information
208
                       </xsl:if>
209
                       <xsl:if 
210
                        test="./relationdoctype = '-//NCEAS//eml-entity-2.0//EN'">
211
                         Table Information
212
                       </xsl:if>
213
                       <xsl:if 
214
                        test="./relationdoctype = '-//NCEAS//eml-physical-2.0//EN'">
215
                         File Information
216
                       </xsl:if>
217
                       <xsl:if 
218
                        test="./relationdoctype = '-//NCEAS//eml-distribution-2.0//EN'">
219
                         Distribution Information
220
                       </xsl:if>
221
                       <xsl:if 
222
                        test="./relationdoctype = '-//NCEAS//eml-access-2.0//EN'">
223
                         Access Information
224
                       </xsl:if>
225
                       <xsl:if 
226
                        test="./relationdoctype = '-//NCEAS//eml-context//EN'">
227
                         Context Information
228
                       </xsl:if>
229
                       <xsl:if 
230
                        test="./relationdoctype = '-//NCEAS//eml-software-2.0//EN'">
231
                         Software Information
232
                       </xsl:if>
233
                       <xsl:if 
234
                        test="./relationdoctype = '-//NCEAS//eml-status//EN'">
235
                         Status Information
236
                       </xsl:if>
237
                       <xsl:if 
238
                        test="./relationdoctype = '-//NCEAS//eml-supplement//EN'">
239
                         Supplemental Information
240
                       </xsl:if>
241
-->
242
                       <!-- If the doctype is null, this file is assumed to 
243
                            be a data file
244
                        -->
245
<!--
246
                       <xsl:if test="./relationdoctype = 'null'">
247
                         Data File
248
                       </xsl:if>
249
                     </xsl:if>
250
                     <xsl:if test="starts-with(./triple, '')">
251
                       <xsl:attribute name="href">
252
                         <xsl:text>@server@@servlet-path@?action=read&amp;qformat=knb&amp;docid=</xsl:text>
253
                         <xsl:value-of select="./relationdoc" />
254
                       </xsl:attribute>
255
                       <xsl:if 
256
                        test="./relationdoctype = '-//NCEAS//eml-variable//EN'">
257
                         Variable Information
258
                       </xsl:if>
259
                       <xsl:if 
260
                        test="./relationdoctype = '-//NCEAS//eml-entity-2.0//EN'">
261
                         Table Information
262
                       </xsl:if>
263
                       <xsl:if 
264
                        test="./relationdoctype = '-//NCEAS//eml-physical-2.0//EN'">
265
                         File Information
266
                       </xsl:if>
267
                       <xsl:if 
268
                        test="./relationdoctype = '-//NCEAS//eml-distribution-2.0//EN'">
269
                         Distribution Information
270
                       </xsl:if>
271
                       <xsl:if 
272
                        test="./relationdoctype = '-//NCEAS//eml-access-2.0//EN'">
273
                         Access Information
274
                       </xsl:if>
275
                       <xsl:if 
276
                        test="./relationdoctype = '-//NCEAS//eml-context//EN'">
277
                         Context Information
278
                       </xsl:if>
279
                       <xsl:if 
280
                        test="./relationdoctype = '-//NCEAS//eml-software-2.0//EN'">
281
                         Software Information
282
                       </xsl:if>
283
                       <xsl:if 
284
                        test="./relationdoctype = '-//NCEAS//eml-status//EN'">
285
                         Status Information
286
                       </xsl:if>
287
                       <xsl:if 
288
                        test="./relationdoctype = '-//NCEAS//eml-supplement//EN'">
289
                         Supplemental Information
290
                       </xsl:if>
291
-->
292
                       <!-- If the doctype is null, this file is assumed to 
293
                            be a data file
294
                        -->
295
<!--
296
                       <xsl:if test="./relationdoctype = 'null'">
297
                         Data File
298
                       </xsl:if>
299
                     </xsl:if>
300
                   </a>
301
                   <br/>
302
                 </xsl:for-each>  
303
               </xsl:if>
304
               <xsl:text> </xsl:text>
305
             </td>
306
-->
307
             <td>
308 189
               <xsl:for-each select="./param[@name='originator/individualName/surName']" >  
309 190
                 <xsl:value-of select="." />
310 191
                 <br/>
311

  
312
               </xsl:for-each>
192
                </xsl:for-each>
193
               <xsl:for-each select="./param[@name='creator/individualName/surName']" >  
194
                 <xsl:value-of select="." />
195
                 <br/>
196
               </xsl:for-each> 
197
               
313 198
               <xsl:text> </xsl:text>
314 199
             </td>
315 200
             <td>
316
                 <xsl:value-of select=
317
                 "./param[@name='originator/organizationName']"                 />
201
                 <xsl:value-of select="./param[@name='originator/organizationName']" />
202
                 <xsl:value-of select="./param[@name='creator/organizationName']" />
318 203
                 <xsl:text> </xsl:text>
319 204
             </td>
320 205
  
......
328 213
             </td>
329 214
           </tr>
330 215

  
216
         
331 217
          </xsl:for-each>
332 218
          </table>
333 219

  

Also available in: Unified diff