Project

General

Profile

« Previous | Next » 

Revision 1632

Added by Jing Tao about 21 years ago

Add new templates.

View differences:

lib/style/eml2/eml-2.0.0.xsl
34 34
  <xsl:import href="eml-identifier-2.0.0.xsl"/>
35 35
  <xsl:import href="eml-text-2.0.0.xsl"/>
36 36
  <xsl:import href="eml-dataset-2.0.0.xsl"/>
37
  <xsl:import href="eml-entity-2.0.0.xsl"/>
38
  <xsl:import href="eml-physical-2.0.0.xsl"/>
39
  <xsl:import href="eml-datatable-2.0.0.xsl"/>
40
  <xsl:import href="eml-attribute-2.0.0.xsl"/>
37 41

  
38 42
  <xsl:output method="html" encoding="iso-8859-1"/>
39 43
  <!-- global variables to store id node set in case to be referenced-->
......
52 56
   </xsl:template>
53 57
   
54 58
   <xsl:template match="*[local-name()='eml']">
55
       <xsl:apply-templates select="dataset"/>
56
       <xsl:apply-templates select="citation"/>
57
       <xsl:apply-templates select="software"/>
58
       <xsl:apply-templates select="protocol"/>
59
       <xsl:for-each select="dataset">
60
         <xsl:call-template name="emldataset"/>
61
       </xsl:for-each>
62
       <xsl:for-each select="citation">
63
         <xsl:call-template name="emlcitation"/>
64
       </xsl:for-each>
65
       <xsl:for-each select="software">
66
         <xsl:call-template name="emlsoftware"/>
67
       </xsl:for-each>
68
       <xsl:for-each select="protocol">
69
         <xsl:call-template name="emlprotocol"/>
70
       </xsl:for-each>
59 71
   </xsl:template>
60 72
   
61
   <xsl:template match="dataset">
62
        <center>
63
           <xsl:if test="$displaymodule='dataset'">
64
            <h1>Data set description</h1>
65
            <h3>Ecological Metadata Language</h3>
66
           </xsl:if>
67
        </center>
68
        <table class="tabledefault" width="100%">
73
   <!--********************************************************
74
                             dataset part
75
       ********************************************************-->
76
   
77
   <xsl:template name="emldataset">
78
      <table class="tabledefault" width="100%">
69 79
          <xsl:if test="$displaymodule='dataset'">
70
            <tr>
71
              <td width="100">
72
                <xsl:call-template name="identifier">
73
                  <xsl:with-param name="packageID" select="../@packageId"/>
74
                  <xsl:with-param name="system" select="../@system"/>
75
                </xsl:call-template>
76
                </td>
77
            </tr>
78
            <tr>
79
              <td width="100%">
80
                <xsl:apply-templates select="." mode="dataset"/>
81
              </td>
82
            </tr>
80
             <xsl:call-template name="datasetpart"/>  
83 81
          </xsl:if>
84
        </table>
82
          <xsl:if test="$displaymodule='entity'">
83
             <xsl:call-template name="entitypart"/>
84
          </xsl:if>
85
          <xsl:if test="$displaymodule='attribute'">
86
             <xsl:call-template name="attributepart"/>
87
          </xsl:if>
88
     </table>
85 89
   </xsl:template>
86 90
   
87
   <xsl:template match="citation">
88
        <center>
89
          <h1>Citation description</h1>
91
   <!--*************** Data set part *************-->
92
   <xsl:template name="datasetpart">
93
      <tr><td>
94
         <center>
95
            <h1>Data Set Description</h1>
96
            <h3>Ecological Metadata Language</h3>
97
         </center>
98
      </td></tr>
99
      <tr>
100
          <td width="100%">
101
             <xsl:call-template name="identifier">
102
                <xsl:with-param name="packageID" select="../@packageId"/>
103
                <xsl:with-param name="system" select="../@system"/>
104
             </xsl:call-template>
105
          </td>
106
      </tr>
107
      <tr>
108
           <td width="100%">
109
              <xsl:apply-templates select="." mode="dataset"/>
110
           </td>
111
      </tr>  
112
   </xsl:template>
113
   
114
   <!--************ Entity part *****************-->
115
    <xsl:template name="entitypart">
116
      <tr><td>
117
         <center>
118
            <h1>Entity Description</h1>
119
            <h3>Ecological Metadata Language</h3>
120
         </center>
121
      </td></tr>
122
      <tr>
123
          <td width="100%">
124
             <xsl:call-template name="identifier">
125
                <xsl:with-param name="packageID" select="../@packageId"/>
126
                <xsl:with-param name="system" select="../@system"/>
127
             </xsl:call-template>
128
          </td>
129
      </tr>
130
      <tr>
131
           <td width="100%">
132
             <!-- find the subtree to process -->
133
             <xsl:if test="$entitytype='dataTable'">
134
               <xsl:for-each select="dataTable">
135
                  <xsl:if test="position()=$entityindex">
136
                     <xsl:call-template name="dataTable">
137
                         <xsl:with-param name="datatablefirstColStyle" select="$firstColStyle"/>
138
                         <xsl:with-param name="datatablesubHeaderStyle" select="$subHeaderStyle"/>  
139
                         <xsl:with-param name="docid" select="$docid"/>
140
                         <xsl:with-param name="entitytype" select="$entitytype"/>
141
                         <xsl:with-param name="entityindex" select="$entityindex"/>
142
                     </xsl:call-template>
143
                  </xsl:if>
144
              </xsl:for-each>
145
            </xsl:if>
146
          </td>
147
      </tr>  
148
   </xsl:template>
149
   
150
   <!--************ Attribute part *****************-->
151
    <xsl:template name="attributepart">
152
      <tr><td>
153
         <center>
154
            <h1>Attributes Description</h1>
155
            <h3>Ecological Metadata Language</h3>
156
         </center>
157
      </td></tr>
158
      <tr>
159
           <td width="100%">
160
              <!-- find the subtree to process -->
161
            <xsl:if test="$entitytype='dataTable'">
162
              <xsl:for-each select="dataTable">
163
                  <xsl:if test="position()=$entityindex">
164
                      <xsl:for-each select="attributeList">
165
                         <xsl:call-template name="attributelist">
166
                            <xsl:with-param name="docid" select="$docid"/>
167
                            <xsl:with-param name="entitytype" select="$entitytype"/>
168
                            <xsl:with-param name="entityindex" select="$entityindex"/>
169
                         </xsl:call-template>
170
                      </xsl:for-each>
171
                  </xsl:if>
172
              </xsl:for-each>
173
            </xsl:if>
174
          </td>
175
      </tr>  
176
   </xsl:template>
177
   
178
   
179
   
180
   
181
   
182
     <!--********************************************************
183
                     Citation part
184
       ********************************************************-->
185
   <xsl:template name="emlcitation">
186
       <center>
187
          <h1>Citation Description</h1>
90 188
          <h3>Ecological Metadata Language</h3>
91 189
        </center>
92
        <xsl:call-template name="identifier">
190
        <table class="tabledefault" width="100%">
191
        <tr>
192
          <td width="100%">
193
            <xsl:call-template name="identifier">
93 194
              <xsl:with-param name="packageID" select="../@packageId"/>
94 195
              <xsl:with-param name="system" select="../@system"/>
95
        </xsl:call-template>
196
           </xsl:call-template>
197
          </td>
198
        </tr>
199
        <tr>
200
          <td width="100%">
201
            <xsl:call-template name="citation">
202
               <xsl:with-param name="citationfirstColStyle" select="$firstColStyle"/>
203
               <xsl:with-param name="citationsubHeaderStyle" select="$subHeaderStyle"/>
204
           </xsl:call-template>
205
          </td>
206
        </tr>
207
     </table>
96 208
   </xsl:template>
97 209
   
98
   <xsl:template match="software">
99
        <center>
100
          <h1>Software description</h1>
210
   
211
      
212
     <!--********************************************************
213
                    Software part
214
       ********************************************************-->
215
   
216
   <xsl:template name="emlsoftware">
217
     <center>
218
          <h1>Software Description</h1>
101 219
          <h3>Ecological Metadata Language</h3>
102
        </center>
103
        <xsl:call-template name="identifier">
220
     </center>
221
     <table class="tabledefault" width="100%">
222
       <tr><td width="100%">
223
           <xsl:call-template name="identifier">
104 224
              <xsl:with-param name="packageID" select="../@packageId"/>
105 225
              <xsl:with-param name="system" select="../@system"/>
106
        </xsl:call-template>
226
           </xsl:call-template>
227
        </td></tr>
228
     </table>
107 229
   </xsl:template>
108 230
   
109
   <xsl:template match="protocol">
110
       <center>
111
          <h1>Protocol description</h1>
231
     
232
     <!--********************************************************
233
                    Protocal part
234
       ********************************************************-->
235
   
236
   <xsl:template name="emlprotocol">
237
    <center>
238
          <h1>Protocol Description</h1>
112 239
          <h3>Ecological Metadata Language</h3>
113
        </center>
114
        <xsl:call-template name="identifier">
240
     </center>
241
     <table class="tabledefault" width="100%">
242
       <tr><td width="100%">
243
          <xsl:call-template name="identifier">
115 244
              <xsl:with-param name="packageID" select="../@packageId"/>
116 245
              <xsl:with-param name="system" select="../@system"/>
117
        </xsl:call-template>
246
          </xsl:call-template>
247
       </td></tr>
248
     </table>
118 249
   </xsl:template>
119 250
    
120 251
</xsl:stylesheet>
lib/style/eml2/eml-attribute-2.0.0.xsl
29 29
  * suitable for rendering with modern web browsers.
30 30
-->
31 31
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
32
<!-- IMPORTANT: IMPORT EML-RESOURCE *AFTER* EML-COVERAGE!!! -->
33
<xsl:import href="eml-settings-2.0.0beta6-@name@.xsl" />
34
<xsl:import href="eml-identifier-2.0.0beta6-@name@.xsl" />
35 32

  
33

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

  
38
<xsl:template match="/">
39
<!-- BEGIN @header-subtitle@ PAGE TOP HTML -->
40
<html>
41
<!--
42
      '$RCSfile$'
43
       Copyright: 2001 Regents of the University of California and the
44
                 @header-title@ LTER
45
      '$Author$'
46
      '$Date$'
47
      '$Revision$'
48
-->
49
    <head>
50
      <title>@header-title@ LTER</title>
51
      <link rel="stylesheet" type="text/css"
52
            href="@style-path@/@name@.css" />
53
      <style type="text/css">
54
          @import url(@style-path@/@header-subtitle@-advanced.css);
55
      </style>
56
        <script language="JavaScript">
57
         <![CDATA[
58
          function submitform(action,form_ref) {
59
            form_ref.action.value=action;
60
            form_ref.abstractpath.value="";
61
            form_ref.qformat.value="@header-subtitle@";
62
            form_ref.submit();
63
            }
64
          function submitform1(action, abstractpath, form_ref) {
65
            form_ref.action.value=action;
66
            form_ref.abstractpath.value=abstractpath;
67
            form_ref.qformat.value="";
68
            form_ref.submit();
69
            }
70
          function submitform2(action, qformat, form_ref) {
71
            form_ref.action.value=action;
72
            form_ref.qformat.value=qformat;
73
            form_ref.abstractpath.value="";
74
            form_ref.submit();
75
            }
76
    function openWindow(request)
77
          {
78
                window.open(request,"attr");
79
          }
80
        ]]>
81
      </script>
82
    </head>
83
    <body>
84
      <!--<div class="header-logo">
85
        <img src="/catalog/img/catalog/@header-subtitle@-logo.gif" alt="SBC LTER" border="0" />
86
      </div>-->
87
      <div class="spacing" align="center">
88
        <table cellspacing="0" width="100%" border="0">
89
          <tr>
90
            <td class="header-title">
91
              <div class="header-title">
92
                @header-title@
93
              </div>
94
               <div class="header-subtitle">
95
                @header-subtitle@
96
              </div>
97
            </td>
98
            <td class="header-image" rowspan="1">
99
              <div class="header-image">
100
                <img class="header" src="@html-path@/@header-image@"
101
                  alt="@header-image-alt@"
102
                   border="0" />
103
              </div>
104
            </td>
105
          </tr>
106
          <tr>
107
            <td class="header-menu" colspan="2">
108
              <div class="header-menu">
109
                @header-menu@
110
              </div>
111
            </td>
112
          </tr>
113
          <tr>
114
            <td class="header-submenu" colspan="2">
115
              <div class="header-submenu">
116
                &#160; <!-- &nbsp; that is XML compliant -->
117
              </div>
118
            </td>
119
          </tr>
120
        </table>
121
      </div>
122
      <div class="content-spacing" align="center">
123
        <table cellspacing="0" width="100%" height="100%" border="0">
124
          <tr>
125
            <td class="content-area" colspan="2">
126
            <!-- END @header-subtitle@ PAGE TOP HTML -->
127
             <div class="content-area">
128
  <table width="85%">
129
  <tr><td class="tablehead"> Attribute Definitions</td></tr><tr></tr>
130
  <tr><td>
131
        <table class="border1" cellspacing="0">
132
  <!-- width needed for NN4 - doesn't recognize width in css -->
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>
133 64

  
134
        <tr><th colspan="1" valign="center" align="center" class="bordered">Columns</th>
135 65

  
136
  <xsl:for-each select="eml-attribute/attribute">
137
   <th colspan="1" align="center"  class="bordered"><xsl:value-of select="attributeName"/></th>
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">Columns</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>
138 87
  </xsl:for-each>
139 88
  </tr>
89
  
90
  <!-- Second row for attribute label-->
140 91
  <tr><th colspan="1" align="center"  class="bordered" >Label(s) of the Column</th>
141
        <xsl:for-each select="eml-attribute/attribute">
142
      <xsl:variable name="stripes">
92
   <xsl:for-each select="attribute">
93
    <xsl:variable name="stripes">
143 94
              <xsl:choose>
144 95
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
145 96
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
146 97
              </xsl:choose>
147
            </xsl:variable>
148
    <td colspan="1" align="center" class="{$stripes}">
149
    <xsl:for-each select="attributeLabel">
150
      <xsl:value-of select="."/>
151
      &#160;<br />
152
    </xsl:for-each>
153
    </td>
154
  </xsl:for-each>
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>
155 122
  </tr>
123
  
124
  <!-- Third row for attribute defination-->
156 125
  <tr><th colspan="1" align="center"  class="bordered">Meaning</th>
157

  
158
  <xsl:for-each select="eml-attribute/attribute">
126
    <xsl:for-each select="attribute">
159 127
      <xsl:variable name="stripes">
160 128
              <xsl:choose>
161 129
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
162 130
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
163 131
              </xsl:choose>
164
            </xsl:variable>
165
    <td colspan="1" align="center" class="{$stripes}">
166
      <xsl:value-of select="attributeDefinition"/>
167
    </td>
168
  </xsl:for-each>
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>
169 150
  </tr>
170

  
171
  <tr><th colspan="1" align="center"  class="bordered">Unit</th>
172
        <xsl:for-each select="eml-attribute/attribute">
173
    <xsl:variable name="stripes">
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">
174 156
              <xsl:choose>
175 157
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
176 158
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
177 159
              </xsl:choose>
178
            </xsl:variable>
179
    <td colspan="1" align="center" class="{$stripes}">
180
      <xsl:value-of select="unit"/>
181
    </td>
182
  </xsl:for-each>
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>
183 178
  </tr>
184

  
185
  <tr><th colspan="1" align="center"  class="bordered">Type of Value</th>
186
        <xsl:for-each select="eml-attribute/attribute">
187
  <xsl:variable name="stripes">
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">
188 184
              <xsl:choose>
189 185
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
190 186
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
191 187
              </xsl:choose>
192
            </xsl:variable>
193
    <td colspan="1" align="center" class="{$stripes}">
194
      <xsl:value-of select="dataType"/>
195
    </td>
196
  </xsl:for-each>
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>
197 220
  </tr>
198 221

  
222
 
223
  <!-- The sixth row for missing value code-->
199 224
  <tr><th colspan="1" align="center"  class="bordered">Missing Value Code</th>
200
        <xsl:for-each select="eml-attribute/attribute">
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">coleven</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%"><br>Code</br></td>
241
                       <td width="80%"><xsl:value-of select="code"/></td></tr>
242
                  <tr><td width="20%"><br>Explanation</br></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%"><br>Code</br></td>
255
                       <td width="80%"><xsl:value-of select="code"/></td></tr>
256
                  <tr><td width="20%"><br>Explanation</br></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">
201 271
     <xsl:variable name="stripes">
202
              <xsl:choose>
203
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
204
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
205
              </xsl:choose>
206
            </xsl:variable>
207
    <td colspan="1" align="center" class="{$stripes}">
208
      <xsl:for-each select="missingValueCode">
209
      <xsl:value-of select="."/>
210
      </xsl:for-each>
211
    </td>
272
         <xsl:choose>
273
             <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
274
             <xsl:when test="position() mod 2 = 0">coleven</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}"><br>Report</br></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}"><br>Value</br></td>
291
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyValue"/></td>
292
                    </tr>
293
                    <tr><td width="{$firstColWidth}"><br>Explanation</br></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}"><br>Report</br></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}"><br>Value</br></td>
312
                       <td width="{$secondColWidth}"><xsl:value-of select="attributeAccuracyValue"/></td>
313
                    </tr>
314
                    <tr><td width="{$firstColWidth}"><br>Explanation</br></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>
212 323
  </xsl:for-each>
213 324
  </tr>
214

  
215
  <tr><th colspan="1" align="center"  class="bordered">Precision &#160;</th>
216
        <xsl:for-each select="eml-attribute/attribute">
217
      <xsl:variable name="stripes">
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">
218 330
              <xsl:choose>
219 331
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
220 332
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
221 333
              </xsl:choose>
222
            </xsl:variable>
223
    <td colspan="1" align="center" class="{$stripes}">
224
      <xsl:value-of select="precision"/>&#160;
225
    </td>
226
  </xsl:for-each>
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>
227 361
  </tr>
362
  
228 363

  
229
  <tr valign="middle"><th align="center" valign="middle"  class="bordered" >Allowed Values</th>
230
    <xsl:for-each select="eml-attribute/attribute">
231
       <xsl:variable name="stripes">
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">
232 368
              <xsl:choose>
233 369
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
234 370
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
235 371
              </xsl:choose>
236
            </xsl:variable>
237
     <td class="{$stripes}">
238
     <xsl:for-each select="attributeDomain">
239
      <table width="100%" border="0" cols="2">
240
    <xsl:if test="count(enumeratedDomain) > 0">
241
    <tr><td colspan="2" align="center" width="100%"><u>List of Values</u></td></tr>
242
    <tr><td valign="center" align="center" colspan="2">
243
    <select class="{$stripes}">
244
    <option>--Select code--</option>
245
    <xsl:for-each select="enumeratedDomain">
246
      <xsl:variable name="id1">
247
      <xsl:value-of select="//identifier"/>
248
      </xsl:variable>
249
       <option onClick="openWindow('http://@server@/@context@/servlet/metacat?action=read&amp;qformat=@name@-enumeratedDomain&amp;docid={$id1}')">
250
                <xsl:value-of select="code"/>&#160;
251
       </option>
252
          </xsl:for-each>
253
    </select>
254
    </td></tr>
255
    </xsl:if>
256
    <xsl:if test="count(textDomain) > 0">
257
      <tr><td align="center" colspan="2"><u>Text Patterns</u></td></tr>
258
      <tr><td valign="center" align="center" colspan="2">
259
    <select class="{$stripes}">
260
    <option>--Select code--</option>
261
                <xsl:for-each select="textDomain">
262
      <xsl:variable name="id1">
263
      <xsl:value-of select="//identifier"/>
264
      </xsl:variable>
265
       <option onClick="openWindow('http://@server@/@context@/servlet/metacat?action=read&amp;qformat=@name@-enumeratedDomain&amp;docid={$id1}')">
266
      <xsl:value-of select="definition"/>&#160;
267
     </option>
268
                </xsl:for-each>
269
    </select>
270
    </td></tr>
271
    </xsl:if>
272
    <xsl:if test="count(numericDomain) > 0">
273
      <tr><td align="center" colspan="2"><u>Numeric</u></td></tr>
274
      <tr><td align="center">min:</td><td align="center">max:</td></tr>
275
    </xsl:if>
276
                <xsl:for-each select="numericDomain">
277
        <xsl:apply-templates select="."/>
278
                </xsl:for-each>
279
    </table>
280

  
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"><br>Nominal</br></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>
281 416
    </xsl:for-each>
282
    </td>
417
    <xsl:for-each select="ordinal">
418
       <tr><td colspan="2" align="center"><br>Ordinal</br></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"><br>Interval</br></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"><br>Ratio</br></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"><br>Time</br></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>
283 472
   </xsl:for-each>
284
  </tr>
285

  
286
        </table>
287
  </td>
288
  </tr>
289
  </table>
290
        </div>
291
        </td>
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}">Definition</td>
485
            <td width="{$secondColWidth}"><xsl:value-of select="textDomain/definition"/>
486
            </td>
292 487
        </tr>
293
          <tr>
294
            <td colspan="2">
295
              <!--div class="nsf" >This material is based on the upon work
296
              supported by the National Science Foundation under Cooperative
297
              Agreement #OCE-9982105. Any opinions, findings, or recommendations
298
              expressed in the material are those of author(s) and do not
299
              necessarily reflect the view of the National Science Foundation.
300
              </div-->
488
      </xsl:when>
489
      <xsl:otherwise>
490
         <tr><td colspan="2" align="center">
491
           <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>
492
           <br>Domain Info</br></a>
493
         </td></tr>
494
      </xsl:otherwise>
495
    </xsl:choose>
496
 </xsl:template>
497
 
498
 <xsl:template name="intervalratio">
499
    <xsl:if test="unit/standardUnit">
500
      <tr><td width="{$firstColWidth}"><br>Standard Unit</br></td>
501
            <td width="{$secondColWidth}"><xsl:value-of select="unit/standardUnit"/>
301 502
            </td>
302
          </tr>
303
          <tr>
304
            <td class="footer-menu" colspan="2">
305
              <div class="footer-menu">
306
                @footer-menu@
307
              </div>
503
      </tr>
504
    </xsl:if>
505
    <xsl:if test="unit/customUnit">
506
      <tr><td width="{$firstColWidth}"><br>Custom Unit</br></td>
507
            <td width="{$secondColWidth}"><xsl:value-of select="unit/customUnit"/>
308 508
            </td>
309
          </tr>
310
          <tr>
311
            <td class="footer-left">
312
              <div class="footer-left">
313
                @copyright@
314
              </div>
509
      </tr>
510
   </xsl:if>
511
   <xsl:for-each select="precision">
512
      <tr><td width="{$firstColWidth}"><br>Precision</br></td>
513
            <td width="{$secondColWidth}"><xsl:value-of select="."/>
315 514
            </td>
316
            <td class="footer-right">
317
              <div class="footer-right">
318
               Contact: <a class="footer-link"
319
                        href="mailto:@mailto-address@">
320
                        @mailto-address@
321
                        </a> |
322
                <a class="footer-link"
323
                   href="@intranet-address@"
324
                   target="offline">Internal Login
325
                </a>
326
              </div>
327
            </td>
328
          </tr>
329
        </table>
330
      </div>
331
    </body>
332
  </html>
515
      </tr>
516
   </xsl:for-each>
517
   <xsl:for-each select="numericDomain">
518
       <tr><td width="{$firstColWidth}"><br>Numeric</br></td>
519
            <td width="{$secondColWidth}">
520
             <xsl:call-template name="numericDomain"/>
521
          </td>
522
      </tr>
523
   </xsl:for-each>
333 524
  </xsl:template>
525
  
526
  
527
 <xsl:template name="numericDomain">
528
     <table width="100%">
529
        <xsl:choose>
530
         <xsl:when test="references!=''">
531
          <xsl:variable name="ref_id" select="references"/>
532
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
533
          <xsl:for-each select="$references">
534
            <tr><td width="{$firstColWidth}">Type</td>
535
                <td width="{$secondColWidth}"><xsl:value-of select="numberType"/>
536
                </td>
537
            </tr>
538
            <xsl:for-each select="bounds">
539
              <tr><td width="{$firstColWidth}">Min</td>
540
                  <td width="{$secondColWidth}">
541
                    <xsl:for-each select="minimum">
542
                      <xsl:value-of select="."/>&#160;
543
                    </xsl:for-each>
544
                  </td>
545
              </tr>
546
              <tr><td width="{$firstColWidth}">Max</td>
547
                  <td width="{$secondColWidth}">
548
                    <xsl:for-each select="maximum">
549
                      <xsl:value-of select="."/>&#160;
550
                    </xsl:for-each>
551
                  </td>
552
              </tr>
553
            </xsl:for-each>
554
          </xsl:for-each>
555
        </xsl:when>
556
        <xsl:otherwise>
557
          <tr><td width="{$firstColWidth}">Type</td>
558
                <td width="{$secondColWidth}"><xsl:value-of select="numberType"/>
559
                </td>
560
            </tr>
561
            <xsl:for-each select="bounds">
562
              <tr><td width="{$firstColWidth}">Min</td>
563
                  <td width="{$secondColWidth}">
564
                    <xsl:for-each select="minimum">
565
                      <xsl:value-of select="."/>&#160;
566
                    </xsl:for-each>
567
                  </td>
568
              </tr>
569
              <tr><td width="{$firstColWidth}">Max</td>
570
                  <td width="{$secondColWidth}">
571
                    <xsl:for-each select="maximum">
572
                      <xsl:value-of select="."/>&#160;
573
                    </xsl:for-each>
574
                  </td>
575
              </tr>
576
            </xsl:for-each>
577
        </xsl:otherwise>
578
      </xsl:choose>
579
  </table>
580
 </xsl:template>
581
 
582
 <xsl:template name="datetime">
583
    <tr><td width="{$firstColWidth}"><br>String Format</br></td>
584
         <td width="{$secondColWidth}">
585
            <xsl:value-of select="formatString"/>      
586
         </td>
587
    </tr>
588
     <tr><td width="{$firstColWidth}"><br>Precision</br></td>
589
         <td width="{$secondColWidth}">
590
            <xsl:value-of select="dateTimePrecision"/>        
591
         </td>
592
    </tr>
593
     <tr><td width="{$firstColWidth}"><br>Domain</br></td>
594
         <td width="{$secondColWidth}">
595
           <xsl:call-template name="timedomain"/>     
596
         </td>
597
    </tr>
598
 </xsl:template>
599
 
600
 
601
 <xsl:template name="timedomain">
602
    <table width="100%">
603
        <xsl:choose>
604
         <xsl:when test="references!=''">
605
          <xsl:variable name="ref_id" select="references"/>
606
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
607
          <xsl:for-each select="$references">
608
            <xsl:for-each select="bounds">
609
              <tr><td width="{$firstColWidth}">Min</td>
610
                  <td width="{$secondColWidth}">
611
                    <xsl:for-each select="minimum">
612
                      <xsl:value-of select="."/>&#160;
613
                    </xsl:for-each>
614
                  </td>
615
              </tr>
616
              <tr><td width="{$firstColWidth}">Max</td>
617
                  <td width="{$secondColWidth}">
618
                    <xsl:for-each select="maximum">
619
                      <xsl:value-of select="."/>&#160;
620
                    </xsl:for-each>
621
                  </td>
622
              </tr>
623
            </xsl:for-each>
624
          </xsl:for-each>
625
        </xsl:when>
626
        <xsl:otherwise>
627
           <xsl:for-each select="bounds">
628
              <tr><td width="{$firstColWidth}">Min</td>
629
                  <td width="{$secondColWidth}">
630
                    <xsl:for-each select="minimum">
631
                      <xsl:value-of select="."/>&#160;
632
                    </xsl:for-each>
633
                  </td>
634
              </tr>
635
              <tr><td width="{$firstColWidth}">Max</td>
636
                  <td width="{$secondColWidth}">
637
                    <xsl:for-each select="maximum">
638
                      <xsl:value-of select="."/>&#160;
639
                    </xsl:for-each>
640
                  </td>
641
              </tr>
642
            </xsl:for-each>
643
        </xsl:otherwise>
644
      </xsl:choose>
645
  </table>
646
 </xsl:template>
647
 
648
 <xsl:template name="attributecoverage">
649
    <xsl:param name="docid"/>
650
    <xsl:param name="entitytype"/>
651
    <xsl:param name="entityindex"/>
652
    <xsl:param name="attributeindex"/>
653
     <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>
654
           <br>Coverage Info</br></a>
655
 </xsl:template>
656
 
657
 <xsl:template name="attributemethod">
658
    <xsl:param name="docid"/>
659
    <xsl:param name="entitytype"/>
660
    <xsl:param name="entityindex"/>
661
    <xsl:param name="attributeindex"/>
662
     <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>
663
           <br>Coverage Info</br></a>
664
 </xsl:template>
334 665

  
335

  
336
  <xsl:template match="numericDomain">
337
      <tr><td align="center"><xsl:value-of select="minimum"/></td>
338
          <td align="center"><xsl:value-of select="maximum"/></td></tr>
339
  </xsl:template>
340

  
341 666
</xsl:stylesheet>

Also available in: Unified diff