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: tao $'
9
  *     '$Date: 2003-06-11 20:04:39 -0700 (Wed, 11 Jun 2003) $'
10
  * '$Revision: 1659 $'
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

    
34
<xsl:output method="html" encoding="iso-8859-1"/>
35

    
36
<xsl:template name="attributelist">
37
   <xsl:param name="docid"/>
38
   <xsl:param name="entitytype"/>
39
   <xsl:param name="entityindex"/>
40
  
41
   <table class="border1" width="100%">
42
        <xsl:choose>
43
         <xsl:when test="references!=''">
44
          <xsl:variable name="ref_id" select="references"/>
45
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
46
          <xsl:for-each select="$references">
47
            <xsl:call-template name="attributecommon">
48
               <xsl:with-param name="docid" select="$docid"/>
49
               <xsl:with-param name="entitytype" select="$entitytype"/>
50
               <xsl:with-param name="entityindex" select="$entityindex"/>
51
            </xsl:call-template>
52
          </xsl:for-each>
53
        </xsl:when>
54
        <xsl:otherwise>
55
          <xsl:call-template name="attributecommon">
56
               <xsl:with-param name="docid" select="$docid"/>
57
               <xsl:with-param name="entitytype" select="$entitytype"/>
58
               <xsl:with-param name="entityindex" select="$entityindex"/>
59
          </xsl:call-template>
60
        </xsl:otherwise>
61
      </xsl:choose>
62
  </table>
63
</xsl:template>
64

    
65

    
66
<xsl:template name="attributecommon">
67
   <xsl:param name="docid"/>
68
   <xsl:param name="entitytype"/>
69
   <xsl:param name="entityindex"/>
70

    
71

    
72
  <!-- First row for attribute name-->
73
  <tr><th colspan="1" valign="center" align="center" class="bordered">Attribute Names</th>
74
  <xsl:for-each select="attribute">
75
    <xsl:choose>
76
         <xsl:when test="references!=''">
77
          <xsl:variable name="ref_id" select="references"/>
78
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
79
          <xsl:for-each select="$references">
80
            <th colspan="1" align="center"  class="bordered"><xsl:value-of select="attributeName"/></th>
81
          </xsl:for-each>
82
        </xsl:when>
83
        <xsl:otherwise>
84
          <th colspan="1" align="center"  class="bordered"><xsl:value-of select="attributeName"/></th>
85
        </xsl:otherwise>
86
     </xsl:choose>
87
  </xsl:for-each>
88
  </tr>
89
  
90
  <!-- Second row for attribute label-->
91
  <tr><th colspan="1" align="center"  class="bordered" >Label(s) of the Column</th>
92
   <xsl:for-each select="attribute">
93
    <xsl:variable name="stripes">
94
              <xsl:choose>
95
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
96
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
97
              </xsl:choose>
98
    </xsl:variable>
99
    <xsl:choose>
100
         <xsl:when test="references!=''">
101
          <xsl:variable name="ref_id" select="references"/>
102
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
103
          <xsl:for-each select="$references">
104
             <td colspan="1" align="center" class="{$stripes}">
105
                 <xsl:for-each select="attributeLabel">
106
                   <xsl:value-of select="."/>
107
                    &#160;<br />
108
                </xsl:for-each>
109
              </td>
110
          </xsl:for-each>
111
        </xsl:when>
112
        <xsl:otherwise>
113
             <td colspan="1" align="center" class="{$stripes}">
114
                 <xsl:for-each select="attributeLabel">
115
                   <xsl:value-of select="."/>
116
                    &#160;<br />
117
                </xsl:for-each>
118
             </td>
119
        </xsl:otherwise>
120
     </xsl:choose>
121
   </xsl:for-each>
122
  </tr>
123
  
124
  <!-- Third row for attribute defination-->
125
  <tr><th colspan="1" align="center"  class="bordered">Meaning</th>
126
    <xsl:for-each select="attribute">
127
      <xsl:variable name="stripes">
128
              <xsl:choose>
129
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
130
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
131
              </xsl:choose>
132
      </xsl:variable>
133
      <xsl:choose>
134
         <xsl:when test="references!=''">
135
          <xsl:variable name="ref_id" select="references"/>
136
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
137
           <xsl:for-each select="$references">
138
             <td colspan="1" align="center" class="{$stripes}">
139
               <xsl:value-of select="attributeDefinition"/>
140
             </td>
141
           </xsl:for-each>
142
        </xsl:when>
143
        <xsl:otherwise>
144
          <td colspan="1" align="center" class="{$stripes}">
145
             <xsl:value-of select="attributeDefinition"/>
146
          </td>
147
        </xsl:otherwise>
148
     </xsl:choose>    
149
   </xsl:for-each>
150
  </tr>
151
  
152
  <!-- The fourth row for attribute storage type-->
153
   <tr><th colspan="1" align="center"  class="bordered">Type of Value</th>
154
     <xsl:for-each select="attribute">
155
      <xsl:variable name="stripes">
156
              <xsl:choose>
157
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
158
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
159
              </xsl:choose>
160
      </xsl:variable>
161
      <xsl:choose>
162
         <xsl:when test="references!=''">
163
          <xsl:variable name="ref_id" select="references"/>
164
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
165
          <xsl:for-each select="$references">
166
            <td colspan="1" align="center" class="{$stripes}">
167
              <xsl:value-of select="storageType"/>
168
            </td>
169
          </xsl:for-each>
170
        </xsl:when>
171
        <xsl:otherwise>
172
           <td colspan="1" align="center" class="{$stripes}">
173
             <xsl:value-of select="storageType"/>
174
           </td>
175
        </xsl:otherwise>
176
     </xsl:choose>
177
   </xsl:for-each>
178
  </tr>
179
  
180
  <!-- The fifth row for meaturementscale-->
181
  <tr><th colspan="1" align="center"  class="bordered">Measurement</th>
182
   <xsl:for-each select="attribute">
183
    <xsl:variable name="stripes">
184
              <xsl:choose>
185
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
186
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
187
              </xsl:choose>
188
    </xsl:variable>
189
    <xsl:choose>
190
         <xsl:when test="references!=''">
191
          <xsl:variable name="ref_id" select="references"/>
192
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
193
          <xsl:for-each select="$references">
194
            <td colspan="1" align="center" class="{$stripes}">
195
              <xsl:for-each select="measurementScale">
196
                <xsl:call-template name="measurementscale">
197
                    <xsl:with-param name="docid" select="$docid"/>
198
                    <xsl:with-param name="entitytype" select="$entitytype"/>
199
                    <xsl:with-param name="entityindex" select="$entityindex"/>
200
                    <xsl:with-param name="attributeindex" select="position()"/>
201
                </xsl:call-template>
202
              </xsl:for-each>
203
            </td>
204
         </xsl:for-each>
205
        </xsl:when>
206
        <xsl:otherwise>
207
           <td colspan="1" align="center" class="{$stripes}">
208
              <xsl:for-each select="measurementScale">
209
                <xsl:call-template name="measurementscale">
210
                      <xsl:with-param name="docid" select="$docid"/>
211
                      <xsl:with-param name="entitytype" select="$entitytype"/>
212
                      <xsl:with-param name="entityindex" select="$entityindex"/>
213
                      <xsl:with-param name="attributeindex" select="position()"/>
214
                </xsl:call-template>
215
              </xsl:for-each>
216
           </td>
217
        </xsl:otherwise>
218
     </xsl:choose>
219
   </xsl:for-each>
220
  </tr>
221

    
222
 
223
  <!-- The sixth row for missing value code-->
224
  <tr><th colspan="1" align="center"  class="bordered">Missing Value Code</th>
225
    <xsl:for-each select="attribute">
226
      <xsl:variable name="stripes">
227
         <xsl:choose>
228
            <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
229
            <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
230
         </xsl:choose>
231
     </xsl:variable>
232
     <xsl:choose>
233
         <xsl:when test="references!=''">
234
          <xsl:variable name="ref_id" select="references"/>
235
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
236
          <xsl:for-each select="$references">
237
            <td colspan="1" align="center" class="{$stripes}">
238
              <table width="100%">
239
                <xsl:for-each select="missingValueCode">
240
                 <tr><td width="20%"><b>Code</b></td>
241
                       <td width="80%"><xsl:value-of select="code"/></td></tr>
242
                  <tr><td width="20%"><b>Explanation</b></td>
243
                       <td width="80%"><xsl:value-of select="codeExplanation"/></td>
244
                  </tr>
245
               </xsl:for-each>
246
             </table>
247
            </td>
248
          </xsl:for-each>
249
        </xsl:when>
250
        <xsl:otherwise>
251
           <td colspan="1" align="center" class="{$stripes}">
252
             <table width="100%">
253
                <xsl:for-each select="missingValueCode">
254
                 <tr><td width="20%"><b>Code</b></td>
255
                       <td width="80%"><xsl:value-of select="code"/></td></tr>
256
                  <tr><td width="20%"><b>Explanation</b></td>
257
                       <td width="80%"><xsl:value-of select="codeExplanation"/></td>
258
                  </tr>
259
               </xsl:for-each>
260
             </table>
261
          </td>
262
        </xsl:otherwise>
263
     </xsl:choose>
264
   </xsl:for-each>
265
  </tr>
266
 
267
 
268
  <!-- The seventh row for accuracy -->
269
  <tr><th colspan="1" align="center"  class="bordered">Accuracy &#160;</th>
270
     <xsl:for-each select="attribute">
271
     <xsl:variable name="stripes">
272
         <xsl:choose>
273
             <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
274
             <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
275
         </xsl:choose>
276
    </xsl:variable>
277
    <xsl:choose>
278
         <xsl:when test="references!=''">
279
          <xsl:variable name="ref_id" select="references"/>
280
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
281
          <xsl:for-each select="$references">
282
            <td colspan="1" align="center" class="{$stripes}">
283
              <xsl:for-each select="accuracy">
284
               <table width="100%">
285
                  <tr><td width="{$firstColWidth}"><b>Report</b></td>
286
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyReport"/>
287
                       </td>
288
                  </tr>
289
                  <xsl:for-each select="quantitativeAttributeAccuracyAssessment">
290
                    <tr><td width="{$firstColWidth}"><b>Value</b></td>
291
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyValue"/></td>
292
                    </tr>
293
                    <tr><td width="{$firstColWidth}"><b>Explanation</b></td>
294
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyExplanation"/></td>
295
                    </tr>
296
                  </xsl:for-each>
297
               </table>
298
             </xsl:for-each>
299
            </td>
300
          </xsl:for-each>
301
        </xsl:when>
302
        <xsl:otherwise>
303
           <td colspan="1" align="center" class="{$stripes}">
304
              <xsl:for-each select="accuracy">
305
               <table width="100%">
306
                  <tr><td width="{$firstColWidth}"><b>Report</b></td>
307
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyReport"/>
308
                       </td>
309
                  </tr>
310
                  <xsl:for-each select="quantitativeAttributeAccuracyAssessment">
311
                    <tr><td width="{$firstColWidth}"><b>Value</b></td>
312
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyValue"/></td>
313
                    </tr>
314
                    <tr><td width="{$firstColWidth}"><b>Explanation</b></td>
315
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyExplanation"/></td>
316
                    </tr>
317
                  </xsl:for-each>
318
               </table>
319
             </xsl:for-each>
320
           </td>
321
        </xsl:otherwise>
322
     </xsl:choose>
323
  </xsl:for-each>
324
  </tr>
325
  
326
   <!-- The eigth row for coverage-->
327
  <tr><th colspan="1" align="center"  class="bordered">Coverage</th>
328
   <xsl:for-each select="attribute">
329
    <xsl:variable name="stripes">
330
              <xsl:choose>
331
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
332
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
333
              </xsl:choose>
334
    </xsl:variable>
335
    <xsl:choose>
336
         <xsl:when test="references!=''">
337
          <xsl:variable name="ref_id" select="references"/>
338
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
339
          <xsl:for-each select="$references">
340
            <td colspan="1" align="center" class="{$stripes}">
341
              <xsl:for-each select="coverage">
342
                <xsl:call-template name="attributecoverage"/>
343
              </xsl:for-each>
344
            </td>
345
         </xsl:for-each>
346
        </xsl:when>
347
        <xsl:otherwise>
348
           <td colspan="1" align="center" class="{$stripes}">
349
              <xsl:for-each select="coverage">
350
                <xsl:call-template name="attributecoverage">
351
                    <xsl:with-param name="docid" select="$docid"/>
352
                    <xsl:with-param name="entitytype" select="$entitytype"/>
353
                    <xsl:with-param name="entityindex" select="$entityindex"/>
354
                    <xsl:with-param name="attributeindex" select="position()"/>
355
                </xsl:call-template>
356
              </xsl:for-each>
357
           </td>
358
        </xsl:otherwise>
359
     </xsl:choose>
360
   </xsl:for-each>
361
  </tr>
362
  
363

    
364
   <!-- The nineth row for method-->
365
  <tr><th colspan="1" align="center"  class="bordered">Method</th>
366
   <xsl:for-each select="attribute">
367
    <xsl:variable name="stripes">
368
              <xsl:choose>
369
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
370
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
371
              </xsl:choose>
372
    </xsl:variable>
373
    <xsl:choose>
374
         <xsl:when test="references!=''">
375
          <xsl:variable name="ref_id" select="references"/>
376
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
377
          <xsl:for-each select="$references">
378
            <td colspan="1" align="center" class="{$stripes}">
379
              <xsl:for-each select="method">
380
                <xsl:call-template name="attributemethod"/>
381
              </xsl:for-each>
382
            </td>
383
         </xsl:for-each>
384
        </xsl:when>
385
        <xsl:otherwise>
386
           <td colspan="1" align="center" class="{$stripes}">
387
              <xsl:for-each select="method">
388
                <xsl:call-template name="attributemethod">
389
                    <xsl:with-param name="docid" select="$docid"/>
390
                    <xsl:with-param name="entitytype" select="$entitytype"/>
391
                    <xsl:with-param name="entityindex" select="$entityindex"/>
392
                    <xsl:with-param name="attributeindex" select="position()"/>
393
                </xsl:call-template>
394
              </xsl:for-each>
395
           </td>
396
        </xsl:otherwise>
397
     </xsl:choose>
398
   </xsl:for-each>
399
  </tr>
400
 </xsl:template>
401
 
402
 <xsl:template name="measurementscale">
403
   <xsl:param name="docid"/>
404
   <xsl:param name="entitytype"/>
405
   <xsl:param name="entityindex"/>
406
   <xsl:param name="attributeindex"/>
407
   <table width="100%">
408
    <xsl:for-each select="nominal">
409
       <tr><td colspan="2" align="center"><b>Nominal</b></td></tr>
410
       <xsl:call-template name="attributenonnumericdomain">
411
               <xsl:with-param name="docid" select="$docid"/>
412
               <xsl:with-param name="entitytype" select="$entitytype"/>
413
               <xsl:with-param name="entityindex" select="$entityindex"/>
414
               <xsl:with-param name="attributeindex" select="$attributeindex"/>
415
       </xsl:call-template>
416
    </xsl:for-each>
417
    <xsl:for-each select="ordinal">
418
       <tr><td colspan="2" align="center"><b>Ordinal</b></td></tr>
419
       <xsl:call-template name="attributenonnumericdomain">
420
               <xsl:with-param name="docid" select="$docid"/>
421
               <xsl:with-param name="entitytype" select="$entitytype"/>
422
               <xsl:with-param name="entityindex" select="$entityindex"/>
423
               <xsl:with-param name="attributeindex" select="$attributeindex"/>
424
       </xsl:call-template>
425
    </xsl:for-each>
426
    <xsl:for-each select="interval">
427
       <tr><td colspan="2" align="center"><b>Interval</b></td></tr>
428
       <xsl:call-template name="intervalratio">
429
       </xsl:call-template>
430
    </xsl:for-each>
431
    <xsl:for-each select="ratio">
432
       <tr><td colspan="2" align="center"><b>Ratio</b></td></tr>
433
       <xsl:call-template name="intervalratio">
434
       </xsl:call-template>
435
    </xsl:for-each>
436
    <xsl:for-each select="datetime">
437
       <tr><td colspan="2" align="center"><b>Time</b></td></tr>
438
       <xsl:call-template name="datetime">
439
       </xsl:call-template>
440
    </xsl:for-each>
441
   </table>
442
 </xsl:template>
443
 
444
 <xsl:template name="attributenonnumericdomain">
445
   <xsl:param name="docid"/>
446
   <xsl:param name="entitytype"/>
447
   <xsl:param name="entityindex"/>
448
   <xsl:param name="attributeindex"/>
449
   <xsl:for-each select="nonNumericDomain">
450
     <xsl:choose>
451
         <xsl:when test="references!=''">
452
          <xsl:variable name="ref_id" select="references"/>
453
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
454
          <xsl:for-each select="$references">
455
            <xsl:call-template name="attributenonnumericdomaincommon">
456
                <xsl:with-param name="docid" select="$docid"/>
457
                <xsl:with-param name="entitytype" select="$entitytype"/>
458
                <xsl:with-param name="entityindex" select="$entityindex"/>
459
                <xsl:with-param name="attributeindex" select="$attributeindex"/>
460
            </xsl:call-template>
461
         </xsl:for-each>
462
        </xsl:when>
463
        <xsl:otherwise>
464
            <xsl:call-template name="attributenonnumericdomaincommon">
465
               <xsl:with-param name="docid" select="$docid"/>
466
               <xsl:with-param name="entitytype" select="$entitytype"/>
467
               <xsl:with-param name="entityindex" select="$entityindex"/>
468
               <xsl:with-param name="attributeindex" select="$attributeindex"/>
469
            </xsl:call-template>
470
        </xsl:otherwise>
471
     </xsl:choose>
472
   </xsl:for-each>
473
 </xsl:template>
474
 
475
 <xsl:template name="attributenonnumericdomaincommon">
476
    <xsl:param name="docid"/>
477
    <xsl:param name="entitytype"/>
478
    <xsl:param name="entityindex"/>
479
    <xsl:param name="attributeindex"/>
480
    <!-- if numericdomain only has one test domain, 
481
        it will be displayed inline otherwith will be show a link-->
482
    <xsl:choose>
483
      <xsl:when test="count(textDomain)=1 and not(enumeratedDomain)">
484
        <tr><td width="{$firstColWidth}"><b>Definition</b></td>
485
            <td width="{$secondColWidth}"><xsl:value-of select="textDomain/definition"/>
486
            </td>
487
        </tr>
488
        <xsl:for-each select="textDomain/parttern">
489
          <tr><td width="{$firstColWidth}"><b>Pattern</b></td>
490
            <td width="{$secondColWidth}"><xsl:value-of select="."/>
491
            </td>
492
          </tr>
493
        </xsl:for-each>
494
        <xsl:for-each select="textDomain/source">
495
          <tr><td width="{$firstColWidth}"><b>Source</b></td>
496
            <td width="{$secondColWidth}"><xsl:value-of select="."/>
497
            </td>
498
          </tr>
499
        </xsl:for-each>
500
      </xsl:when>
501
      <xsl:otherwise>
502
         <tr><td colspan="2" align="center">
503
           <a><xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&amp;displaymodule=attributedomain&amp;entitytype=<xsl:value-of select="$entitytype"/>&amp;entityindex=<xsl:value-of select="$entityindex"/>&amp;attributeindex=<xsl:value-of select="$attributeindex"/></xsl:attribute>
504
           <b>Domain Info</b></a>
505
         </td></tr>
506
      </xsl:otherwise>
507
    </xsl:choose>
508
 </xsl:template>
509
 
510
 <xsl:template name="intervalratio">
511
    <xsl:if test="unit/standardUnit">
512
      <tr><td width="{$firstColWidth}"><b>Standard Unit</b></td>
513
            <td width="{$secondColWidth}"><xsl:value-of select="unit/standardUnit"/>
514
            </td>
515
      </tr>
516
    </xsl:if>
517
    <xsl:if test="unit/customUnit">
518
      <tr><td width="{$firstColWidth}"><b>Custom Unit</b></td>
519
            <td width="{$secondColWidth}"><xsl:value-of select="unit/customUnit"/>
520
            </td>
521
      </tr>
522
   </xsl:if>
523
   <xsl:for-each select="precision">
524
      <tr><td width="{$firstColWidth}"><b>Precision</b></td>
525
            <td width="{$secondColWidth}"><xsl:value-of select="."/>
526
            </td>
527
      </tr>
528
   </xsl:for-each>
529
   <xsl:for-each select="numericDomain">
530
       <tr><td width="{$firstColWidth}"><b>Numeric</b></td>
531
            <td width="{$secondColWidth}">
532
             <xsl:call-template name="numericDomain"/>
533
          </td>
534
      </tr>
535
   </xsl:for-each>
536
  </xsl:template>
537
  
538
  
539
 <xsl:template name="numericDomain">
540
     <table width="100%">
541
        <xsl:choose>
542
         <xsl:when test="references!=''">
543
          <xsl:variable name="ref_id" select="references"/>
544
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
545
          <xsl:for-each select="$references">
546
            <tr><td width="{$firstColWidth}">Type</td>
547
                <td width="{$secondColWidth}"><xsl:value-of select="numberType"/>
548
                </td>
549
            </tr>
550
            <xsl:for-each select="bounds">
551
              <tr><td width="{$firstColWidth}">Min</td>
552
                  <td width="{$secondColWidth}">
553
                    <xsl:for-each select="minimum">
554
                      <xsl:value-of select="."/>&#160;
555
                    </xsl:for-each>
556
                  </td>
557
              </tr>
558
              <tr><td width="{$firstColWidth}">Max</td>
559
                  <td width="{$secondColWidth}">
560
                    <xsl:for-each select="maximum">
561
                      <xsl:value-of select="."/>&#160;
562
                    </xsl:for-each>
563
                  </td>
564
              </tr>
565
            </xsl:for-each>
566
          </xsl:for-each>
567
        </xsl:when>
568
        <xsl:otherwise>
569
          <tr><td width="{$firstColWidth}">Type</td>
570
                <td width="{$secondColWidth}"><xsl:value-of select="numberType"/>
571
                </td>
572
            </tr>
573
            <xsl:for-each select="bounds">
574
              <tr><td width="{$firstColWidth}">Min</td>
575
                  <td width="{$secondColWidth}">
576
                    <xsl:for-each select="minimum">
577
                      <xsl:value-of select="."/>&#160;
578
                    </xsl:for-each>
579
                  </td>
580
              </tr>
581
              <tr><td width="{$firstColWidth}">Max</td>
582
                  <td width="{$secondColWidth}">
583
                    <xsl:for-each select="maximum">
584
                      <xsl:value-of select="."/>&#160;
585
                    </xsl:for-each>
586
                  </td>
587
              </tr>
588
            </xsl:for-each>
589
        </xsl:otherwise>
590
      </xsl:choose>
591
  </table>
592
 </xsl:template>
593
 
594
 <xsl:template name="datetime">
595
    <tr><td width="{$firstColWidth}"><b>String Format</b></td>
596
         <td width="{$secondColWidth}">
597
            <xsl:value-of select="formatString"/>      
598
         </td>
599
    </tr>
600
     <tr><td width="{$firstColWidth}"><b>Precision</b></td>
601
         <td width="{$secondColWidth}">
602
            <xsl:value-of select="dateTimePrecision"/>        
603
         </td>
604
    </tr>
605
     <tr><td width="{$firstColWidth}"><b>Domain</b></td>
606
         <td width="{$secondColWidth}">
607
           <xsl:call-template name="timedomain"/>     
608
         </td>
609
    </tr>
610
 </xsl:template>
611
 
612
 
613
 <xsl:template name="timedomain">
614
    <table width="100%">
615
        <xsl:choose>
616
         <xsl:when test="references!=''">
617
          <xsl:variable name="ref_id" select="references"/>
618
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
619
          <xsl:for-each select="$references">
620
            <xsl:for-each select="bounds">
621
              <tr><td width="{$firstColWidth}">Min</td>
622
                  <td width="{$secondColWidth}">
623
                    <xsl:for-each select="minimum">
624
                      <xsl:value-of select="."/>&#160;
625
                    </xsl:for-each>
626
                  </td>
627
              </tr>
628
              <tr><td width="{$firstColWidth}">Max</td>
629
                  <td width="{$secondColWidth}">
630
                    <xsl:for-each select="maximum">
631
                      <xsl:value-of select="."/>&#160;
632
                    </xsl:for-each>
633
                  </td>
634
              </tr>
635
            </xsl:for-each>
636
          </xsl:for-each>
637
        </xsl:when>
638
        <xsl:otherwise>
639
           <xsl:for-each select="bounds">
640
              <tr><td width="{$firstColWidth}">Min</td>
641
                  <td width="{$secondColWidth}">
642
                    <xsl:for-each select="minimum">
643
                      <xsl:value-of select="."/>&#160;
644
                    </xsl:for-each>
645
                  </td>
646
              </tr>
647
              <tr><td width="{$firstColWidth}">Max</td>
648
                  <td width="{$secondColWidth}">
649
                    <xsl:for-each select="maximum">
650
                      <xsl:value-of select="."/>&#160;
651
                    </xsl:for-each>
652
                  </td>
653
              </tr>
654
            </xsl:for-each>
655
        </xsl:otherwise>
656
      </xsl:choose>
657
  </table>
658
 </xsl:template>
659
 
660
 <xsl:template name="attributecoverage">
661
    <xsl:param name="docid"/>
662
    <xsl:param name="entitytype"/>
663
    <xsl:param name="entityindex"/>
664
    <xsl:param name="attributeindex"/>
665
     <a><xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&amp;displaymodule=attributecoverage&amp;entitytype=<xsl:value-of select="$entitytype"/>&amp;entityindex=<xsl:value-of select="$entityindex"/>&amp;attributeindex=<xsl:value-of select="$attributeindex"/></xsl:attribute>
666
           <b>Coverage Info</b></a>
667
 </xsl:template>
668
 
669
 <xsl:template name="attributemethod">
670
    <xsl:param name="docid"/>
671
    <xsl:param name="entitytype"/>
672
    <xsl:param name="entityindex"/>
673
    <xsl:param name="attributeindex"/>
674
     <a><xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&amp;displaymodule=attributemethod&amp;entitytype=<xsl:value-of select="$entitytype"/>&amp;entityindex=<xsl:value-of select="$entityindex"/>&amp;attributeindex=<xsl:value-of select="$attributeindex"/></xsl:attribute>
675
           <b>Coverage Info</b></a>
676
 </xsl:template>
677

    
678
</xsl:stylesheet>
(5-5/33)