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: 2000-11-20 05:14:04 -0800 (Mon, 20 Nov 2000) $'
10
  * '$Revision: 553 $'
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
  <xsl:import href="eml-settings-2.0.0beta6-@name@.xsl" />
33
  <xsl:output method="html" encoding="iso-8859-1"/>
34
  <xsl:template match="/">
35
    <html>
36
      <head>
37
        <link rel="stylesheet" type="text/css" href="{$stylePath}/@name@.css"/>
38
      </head>
39

    
40
      <body>
41
        <table width="100%" cellspacing="0" cellpadding="0" border="1">
42
          <tr>
43
            <table cellspacing="0" width="100%" border="0">
44
              <tr>
45
                <td class="header-title">
46
                  <div class="header-title">
47
                    @header-title@
48
                  </div>
49
                   <div class="header-subtitle">
50
                    @header-subtitle@
51
                  </div>
52
                </td>
53
                <td class="header-image" rowspan="1">
54
                  <div class="header-image">
55
                    <img class="header" src="@html-path@/@header-image@"
56
                      alt="@header-image-alt@" border="0" />
57
                  </div>
58
                </td>
59
              </tr>
60
              <tr>
61
                <td class="header-menu" colspan="2">
62
                  <div class="header-menu">
63
                   @header-menu@
64
                  </div>
65
                </td>
66
              </tr>
67
              <tr>
68
                <td class="header-submenu" colspan="2">
69
                  <div class="header-submenu">
70
                    &#160; <!-- &nbsp; that is XML compliant -->
71
                  </div>
72
                </td>
73
              </tr>
74
            </table>
75
          </tr>
76
          <tr>
77
            <td colspan="7" valign="top" align="left">
78
              <table width="85%" border="0">
79
                <tr>
80
                  <td class="tablehead">Code Definitions for Allowed Values</td>
81
                </tr>
82
                <tr>
83
                  <td>
84
                    <table border="0" width="95%" cellspacing="0"
85
                    align="center">
86
                      <tr>
87
                        <th colspan="3" valign="center" align="center" class="bordered">
88
                          List of Acceptable Values
89
                        </th>
90
                      </tr>
91
                      <tr>
92
                        <th class="bordered">Code</th>
93
                        <th class="bordered">Definition</th>
94
                        <th class="bordered">Source</th>
95
                      </tr>
96
                      <tr>
97
                        <xsl:for-each select="eml-attribute/attribute">
98
                          <xsl:for-each select="attributeDomain">
99
                            <xsl:for-each select="enumeratedDomain">
100
                              <xsl:variable name="stripes">
101
                                <xsl:choose>
102
                                  <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
103
                                  <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
104
                                </xsl:choose>
105
                              </xsl:variable>
106
                              <tr>
107
                                <td class="{$stripes}" align="center"><xsl:value-of select="code"/></td>
108
                                <td class="{$stripes}" align="center"><xsl:value-of select="definition"/></td>
109
                                <td class="{$stripes}" align="center"><xsl:value-of select="source"/></td> &#160;
110
                              </tr>
111
                            </xsl:for-each>
112
                          </xsl:for-each>
113
                        </xsl:for-each>
114
                      </tr>
115
                      <tr>
116
                        <td>&#160;</td>
117
                      </tr>
118
                      <tr>
119
                        <td>&#160;</td>
120
                      </tr>
121
                      <tr>
122
                        <th colspan="3" valign="center" align="center" class="bordered">Acceptable Text Values</th>
123
                      </tr>
124
                      <tr>
125
                        <th class="bordered">Definition</th>
126
                        <th class="bordered">Pattern</th>
127
                        <th class="bordered">Source</th>
128
                      </tr>
129
                      <tr>
130
                      <xsl:for-each select="eml-attribute/attribute">
131
                        <xsl:for-each select="attributeDomain">
132
                          <xsl:for-each select="textDomain">
133
                            <xsl:variable name="stripes">
134
                              <xsl:choose>
135
                                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
136
                                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
137
                              </xsl:choose>
138
                            </xsl:variable>
139
                            <tr>
140
                              <td class="$stripes" align="center"><xsl:value-of select="code"/></td>
141
                              <td class="$stripes" align="center"><xsl:value-of select="definition"/></td>
142
                              <td class="$stripes" align="center"><xsl:value-of select="source"/></td> &#160;
143
                            </tr>
144
                          </xsl:for-each>
145
                        </xsl:for-each>
146
                      </xsl:for-each>
147
                    </tr>
148
                  </table>
149
                </td>
150
               </tr>
151
             </table>
152
           </td>
153
         </tr>
154
       </table>
155
      </body>
156
    </html>
157
  </xsl:template>
158

    
159

    
160
  <xsl:template match="enumeratedDomain">
161
      <tr>
162
        <td><xsl:value-of select="code"/></td>
163
        <td><xsl:value-of select="definition"/></td>
164
        <td><xsl:value-of select="source"/>&#160;</td>
165
      </tr>
166
  </xsl:template>
167

    
168
  <xsl:template match="textDomain">
169
     <tr>
170
       <td><xsl:value-of select="definition"/></td>
171
       <td><xsl:value-of select="pattern"/></td>
172
       <td><xsl:value-of select="source"/>&#160;</td>
173
     </tr>
174
  </xsl:template>
175

    
176
  <xsl:template match="numericDomain">
177
    <tr>
178
      <td><xsl:value-of select="minimum"/></td>
179
      <td><xsl:value-of select="maximum"/></td>
180
    </tr>
181
  </xsl:template>
182

    
183
</xsl:stylesheet>
(6-6/27)