Project

General

Profile

1 553 tao
<?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$'
9
  *     '$Date$'
10
  * '$Revision$'
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 1632 tao
34 553 tao
<xsl:output method="html" encoding="iso-8859-1"/>
35
36 1632 tao
<xsl:template name="attributelist">
37
   <xsl:param name="docid"/>
38
   <xsl:param name="entitytype"/>
39
   <xsl:param name="entityindex"/>
40
41 1696 tao
   <table xsl:use-attribute-sets="cellspacing" class="border1" width="100%">
42 1632 tao
        <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 553 tao
65
66 1632 tao
<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 1659 tao
  <tr><th colspan="1" valign="center" align="center" class="bordered">Attribute Names</th>
74 1632 tao
  <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 553 tao
  </xsl:for-each>
88
  </tr>
89 1632 tao
90
  <!-- Second row for attribute label-->
91 553 tao
  <tr><th colspan="1" align="center"  class="bordered" >Label(s) of the Column</th>
92 1632 tao
   <xsl:for-each select="attribute">
93
    <xsl:variable name="stripes">
94 553 tao
              <xsl:choose>
95
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
96 1633 tao
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
97 553 tao
              </xsl:choose>
98 1632 tao
    </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 553 tao
  </tr>
123 1632 tao
124
  <!-- Third row for attribute defination-->
125 553 tao
  <tr><th colspan="1" align="center"  class="bordered">Meaning</th>
126 1632 tao
    <xsl:for-each select="attribute">
127 553 tao
      <xsl:variable name="stripes">
128
              <xsl:choose>
129
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
130 1633 tao
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
131 553 tao
              </xsl:choose>
132 1632 tao
      </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 553 tao
  </tr>
151 1632 tao
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 553 tao
              <xsl:choose>
157
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
158 1633 tao
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
159 553 tao
              </xsl:choose>
160 1632 tao
      </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 553 tao
  </tr>
179 1632 tao
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 553 tao
              <xsl:choose>
185
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
186 1633 tao
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
187 553 tao
              </xsl:choose>
188 1632 tao
    </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 553 tao
  </tr>
221
222 1632 tao
223
  <!-- The sixth row for missing value code-->
224 553 tao
  <tr><th colspan="1" align="center"  class="bordered">Missing Value Code</th>
225 1632 tao
    <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 1633 tao
            <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
230 1632 tao
         </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 1696 tao
              <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
239 1632 tao
                <xsl:for-each select="missingValueCode">
240 1659 tao
                 <tr><td width="20%"><b>Code</b></td>
241 1632 tao
                       <td width="80%"><xsl:value-of select="code"/></td></tr>
242 1659 tao
                  <tr><td width="20%"><b>Explanation</b></td>
243 1632 tao
                       <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 1696 tao
             <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
253 1632 tao
                <xsl:for-each select="missingValueCode">
254 1659 tao
                 <tr><td width="20%"><b>Code</b></td>
255 1632 tao
                       <td width="80%"><xsl:value-of select="code"/></td></tr>
256 1659 tao
                  <tr><td width="20%"><b>Explanation</b></td>
257 1632 tao
                       <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 553 tao
     <xsl:variable name="stripes">
272 1632 tao
         <xsl:choose>
273
             <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
274 1633 tao
             <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
275 1632 tao
         </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 1696 tao
               <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
285 1659 tao
                  <tr><td width="{$firstColWidth}"><b>Report</b></td>
286 1632 tao
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyReport"/>
287
                       </td>
288
                  </tr>
289
                  <xsl:for-each select="quantitativeAttributeAccuracyAssessment">
290 1659 tao
                    <tr><td width="{$firstColWidth}"><b>Value</b></td>
291 1632 tao
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyValue"/></td>
292
                    </tr>
293 1659 tao
                    <tr><td width="{$firstColWidth}"><b>Explanation</b></td>
294 1632 tao
                       <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 1696 tao
               <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
306 1659 tao
                  <tr><td width="{$firstColWidth}"><b>Report</b></td>
307 1632 tao
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyReport"/>
308
                       </td>
309
                  </tr>
310
                  <xsl:for-each select="quantitativeAttributeAccuracyAssessment">
311 1659 tao
                    <tr><td width="{$firstColWidth}"><b>Value</b></td>
312 1632 tao
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyValue"/></td>
313
                    </tr>
314 1659 tao
                    <tr><td width="{$firstColWidth}"><b>Explanation</b></td>
315 1632 tao
                       <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 553 tao
  </xsl:for-each>
324
  </tr>
325 1632 tao
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 553 tao
              <xsl:choose>
331
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
332 1633 tao
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
333 553 tao
              </xsl:choose>
334 1632 tao
    </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 553 tao
  </tr>
362 1632 tao
363 553 tao
364 1632 tao
   <!-- 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 553 tao
              <xsl:choose>
369
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
370 1633 tao
                <xsl:when test="position() mod 2 = 0">highlight</xsl:when>
371 553 tao
              </xsl:choose>
372 1632 tao
    </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 1696 tao
   <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
408 1632 tao
    <xsl:for-each select="nominal">
409 1659 tao
       <tr><td colspan="2" align="center"><b>Nominal</b></td></tr>
410 1632 tao
       <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 553 tao
    </xsl:for-each>
417 1632 tao
    <xsl:for-each select="ordinal">
418 1659 tao
       <tr><td colspan="2" align="center"><b>Ordinal</b></td></tr>
419 1632 tao
       <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 1659 tao
       <tr><td colspan="2" align="center"><b>Interval</b></td></tr>
428 1632 tao
       <xsl:call-template name="intervalratio">
429
       </xsl:call-template>
430
    </xsl:for-each>
431
    <xsl:for-each select="ratio">
432 1659 tao
       <tr><td colspan="2" align="center"><b>Ratio</b></td></tr>
433 1632 tao
       <xsl:call-template name="intervalratio">
434
       </xsl:call-template>
435
    </xsl:for-each>
436
    <xsl:for-each select="datetime">
437 1659 tao
       <tr><td colspan="2" align="center"><b>Time</b></td></tr>
438 1632 tao
       <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 553 tao
   </xsl:for-each>
473 1632 tao
 </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 1659 tao
        <tr><td width="{$firstColWidth}"><b>Definition</b></td>
485 1632 tao
            <td width="{$secondColWidth}"><xsl:value-of select="textDomain/definition"/>
486
            </td>
487 553 tao
        </tr>
488 1659 tao
        <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 1632 tao
      </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 1659 tao
           <b>Domain Info</b></a>
505 1632 tao
         </td></tr>
506
      </xsl:otherwise>
507
    </xsl:choose>
508
 </xsl:template>
509
510
 <xsl:template name="intervalratio">
511
    <xsl:if test="unit/standardUnit">
512 1659 tao
      <tr><td width="{$firstColWidth}"><b>Standard Unit</b></td>
513 1632 tao
            <td width="{$secondColWidth}"><xsl:value-of select="unit/standardUnit"/>
514 553 tao
            </td>
515 1632 tao
      </tr>
516
    </xsl:if>
517
    <xsl:if test="unit/customUnit">
518 1659 tao
      <tr><td width="{$firstColWidth}"><b>Custom Unit</b></td>
519 1632 tao
            <td width="{$secondColWidth}"><xsl:value-of select="unit/customUnit"/>
520 553 tao
            </td>
521 1632 tao
      </tr>
522
   </xsl:if>
523
   <xsl:for-each select="precision">
524 1659 tao
      <tr><td width="{$firstColWidth}"><b>Precision</b></td>
525 1632 tao
            <td width="{$secondColWidth}"><xsl:value-of select="."/>
526 553 tao
            </td>
527 1632 tao
      </tr>
528
   </xsl:for-each>
529
   <xsl:for-each select="numericDomain">
530 1659 tao
       <tr><td width="{$firstColWidth}"><b>Numeric</b></td>
531 1632 tao
            <td width="{$secondColWidth}">
532
             <xsl:call-template name="numericDomain"/>
533
          </td>
534
      </tr>
535
   </xsl:for-each>
536 553 tao
  </xsl:template>
537 1632 tao
538
539
 <xsl:template name="numericDomain">
540 1696 tao
     <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
541 1632 tao
        <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 1659 tao
    <tr><td width="{$firstColWidth}"><b>String Format</b></td>
596 1632 tao
         <td width="{$secondColWidth}">
597
            <xsl:value-of select="formatString"/>
598
         </td>
599
    </tr>
600 1659 tao
     <tr><td width="{$firstColWidth}"><b>Precision</b></td>
601 1632 tao
         <td width="{$secondColWidth}">
602
            <xsl:value-of select="dateTimePrecision"/>
603
         </td>
604
    </tr>
605 1659 tao
     <tr><td width="{$firstColWidth}"><b>Domain</b></td>
606 1632 tao
         <td width="{$secondColWidth}">
607
           <xsl:call-template name="timedomain"/>
608
         </td>
609
    </tr>
610
 </xsl:template>
611
612
613
 <xsl:template name="timedomain">
614 1696 tao
    <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
615 1632 tao
        <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 1659 tao
           <b>Coverage Info</b></a>
667 1632 tao
 </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 1659 tao
           <b>Coverage Info</b></a>
676 1632 tao
 </xsl:template>
677 553 tao
678
</xsl:stylesheet>