Project

General

Profile

« Previous | Next » 

Revision 4824

Added by daigle over 15 years ago

Added eml 2.1.0 stylesheets for sbclter.

View differences:

lib/style/skins/sbclter/sbclter.xml
16 16
  </doctype>
17 17

  
18 18
  <doctype publicid="eml://ecoinformatics.org/eml-2.0.0">
19
    <target publicid="-//W3C//HTML//EN">/style/shared/eml-2.0.0/eml.xsl</target>
19
    <target publicid="-//W3C//HTML//EN">/style/skins/sbclter/eml/eml-2.0.0.xsl</target>
20 20
  </doctype>
21 21

  
22 22
  <!-- EML 2.0.1 XSL mapping:
......
24 24
    file that is returned from the metadata catalog.
25 25
  -->
26 26
  <doctype publicid="eml://ecoinformatics.org/eml-2.0.1">
27
    <target publicid="-//W3C//HTML//EN">/style/skins/sbclter/templates/xsl/sbclter-eml-2.0.1.xsl</target>
27
    <target publicid="-//W3C//HTML//EN">/style/skins/sbclter/eml/eml-2.0.0.xsl</target>
28 28
  </doctype>
29 29

  
30 30
  <!-- EML 2.1.0 XSL mapping:
......
32 32
    file that is returned from the metadata catalog.
33 33
  -->
34 34
  <doctype publicid="eml://ecoinformatics.org/eml-2.1.0">
35
    <target publicid="-//W3C//HTML//EN">/style/skins/sbclter/templates/xsl/sbclter-eml-2.1.0.xsl</target>
35
    <target publicid="-//W3C//HTML//EN">/style/skins/sbclter/eml/eml-2.1.0.xsl</target>
36 36
  </doctype>
37 37

  
38 38

  
lib/style/skins/sbclter/eml/eml-additionalmetadata-2.1.0.xsl
1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3

  
4
ASCII XML Tree Viewer 1.0 (13 Feb 2001)
5
An XPath/XSLT visualisation tool for XML documents
6

  
7
Written by Jeni Tennison and Mike J. Brown
8
No license; use freely, but please credit the authors if republishing elsewhere.
9

  
10
Use this stylesheet to produce an ASCII art representation of an XML document's
11
node tree, as exposed by the XML parser and interpreted by the XSLT processor.
12
Note that the parser may not expose comments to the XSLT processor.
13

  
14
Usage notes
15
===========
16

  
17
By default, this stylesheet will not show namespace nodes. If the XSLT processor
18
supports the namespace axis and you want to see namespace nodes, just pass a
19
non-empty "show_ns" parameter to the stylesheet. Example using Instant Saxon:
20

  
21
    saxon somefile.xml ascii-treeview.xsl show_ns=yes
22

  
23
If you want to ignore whitespace-only text nodes, uncomment the xsl:strip-space
24
instruction below.
25

  
26
-->
27
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
28

  
29
<xsl:output method="html" />
30

  
31
<!-- uncomment the following to ignore whitespace-only text nodes -->
32
<!-- xsl:strip-space elements="*" -->
33

  
34
<!-- pass a non-empty show_ns parameter to the stylesheet to show namespace nodes -->
35
<xsl:param name="show_ns"/>
36

  
37
<xsl:variable name="apos">'</xsl:variable>
38

  
39

  
40
<xsl:template name="additionalmetadata">
41
      <h3>Additional Metadata</h3>
42
    <pre>
43
    <xsl:text>additionalMetadata&#xA;</xsl:text>
44
    <xsl:apply-templates mode="ascii-art" />
45
    </pre>
46
</xsl:template>
47

  
48
<xsl:template match="*" mode="ascii-art">
49
    <xsl:call-template name="ascii-art-hierarchy" />
50
    <xsl:text />___element '<xsl:value-of select="local-name()" />'<xsl:text />
51
    <xsl:if test="namespace-uri()"> in ns '<xsl:value-of select="namespace-uri()"/>' ('<xsl:value-of select="name()"/>')</xsl:if>
52
    <xsl:text>&#xA;</xsl:text>
53
    <xsl:apply-templates select="@*" mode="ascii-art" />
54
    <xsl:if test="$show_ns">
55
         <xsl:for-each select="namespace::*">
56
             <xsl:call-template name="ascii-art-hierarchy" />
57
             <xsl:text />  \___namespace '<xsl:value-of select="name()" />' = '<xsl:value-of select="." />'&#xA;<xsl:text />
58
         </xsl:for-each>
59
    </xsl:if>
60
    <xsl:apply-templates mode="ascii-art" />
61
</xsl:template>
62

  
63
<xsl:template match="@*" mode="ascii-art">
64
    <xsl:call-template name="ascii-art-hierarchy" />
65
    <xsl:text />  \___attribute '<xsl:value-of select="local-name()" />'<xsl:text />
66
    <xsl:if test="namespace-uri()"> in ns '<xsl:value-of select="namespace-uri()"/>' ('<xsl:value-of select="name()"/>')</xsl:if>
67
    <xsl:text /> = '<xsl:text />
68
    <xsl:call-template name="escape-ws">
69
        <xsl:with-param name="text" select="." />
70
    </xsl:call-template>
71
    <xsl:text />'&#xA;<xsl:text />
72
</xsl:template>
73

  
74
<xsl:template match="text()" mode="ascii-art">
75
    <xsl:call-template name="ascii-art-hierarchy" />
76
    <xsl:text>___text '</xsl:text>
77
    <xsl:call-template name="escape-ws">
78
        <xsl:with-param name="text" select="." />
79
    </xsl:call-template>
80
    <xsl:text>'&#xA;</xsl:text>
81
</xsl:template>
82

  
83
<xsl:template match="comment()" mode="ascii-art">
84
    <xsl:call-template name="ascii-art-hierarchy" />
85
    <xsl:text />___comment '<xsl:value-of select="." />'&#xA;<xsl:text />
86
</xsl:template>
87

  
88
<xsl:template match="processing-instruction()" mode="ascii-art">
89
    <xsl:call-template name="ascii-art-hierarchy" />
90
    <xsl:text />___processing instruction target='<xsl:value-of select="name()" />' instruction='<xsl:value-of select="." />'&#xA;<xsl:text />
91
</xsl:template>
92

  
93
<xsl:template name="ascii-art-hierarchy">
94
    <xsl:for-each select="ancestor::*">
95
      <xsl:choose>
96
        <xsl:when test="local-name()!='additionalMetadata'">
97
          <xsl:choose>
98
            <xsl:when test="following-sibling::node()">  |   </xsl:when>
99
            <xsl:otherwise><xsl:text>      </xsl:text></xsl:otherwise>
100
          </xsl:choose>
101
        </xsl:when>
102
      </xsl:choose>
103
    </xsl:for-each>
104
    <xsl:choose>
105
        <xsl:when test="parent::node() and ../child::node()">  |</xsl:when>
106
        <xsl:otherwise><xsl:text>   </xsl:text></xsl:otherwise>
107
    </xsl:choose>
108
</xsl:template>
109

  
110
<!-- recursive template to escape backslashes, apostrophes, newlines and tabs -->
111
<xsl:template name="escape-ws">
112
    <xsl:param name="text" />
113
    <xsl:choose>
114
        <xsl:when test="contains($text, '\')">
115
            <xsl:call-template name="escape-ws">
116
                <xsl:with-param name="text" select="substring-before($text, '\')" />
117
            </xsl:call-template>
118
            <xsl:text>\\</xsl:text>
119
            <xsl:call-template name="escape-ws">
120
                <xsl:with-param name="text" select="substring-after($text, '\')" />
121
            </xsl:call-template>
122
        </xsl:when>
123
        <xsl:when test="contains($text, $apos)">
124
            <xsl:call-template name="escape-ws">
125
                <xsl:with-param name="text" select="substring-before($text, $apos)" />
126
            </xsl:call-template>
127
            <xsl:text>\'</xsl:text>
128
            <xsl:call-template name="escape-ws">
129
                <xsl:with-param name="text" select="substring-after($text, $apos)" />
130
            </xsl:call-template>
131
        </xsl:when>
132
        <xsl:when test="contains($text, '&#xA;')">
133
            <xsl:call-template name="escape-ws">
134
                <xsl:with-param name="text" select="substring-before($text, '&#xA;')" />
135
            </xsl:call-template>
136
            <xsl:text>\n</xsl:text>
137
            <xsl:call-template name="escape-ws">
138
                <xsl:with-param name="text" select="substring-after($text, '&#xA;')" />
139
            </xsl:call-template>
140
        </xsl:when>
141
        <xsl:when test="contains($text, '&#x9;')">
142
            <xsl:value-of select="substring-before($text, '&#x9;')" />
143
            <xsl:text>\t</xsl:text>
144
            <xsl:call-template name="escape-ws">
145
                <xsl:with-param name="text" select="substring-after($text, '&#x9;')" />
146
            </xsl:call-template>
147
        </xsl:when>
148
        <xsl:otherwise><xsl:value-of select="$text" /></xsl:otherwise>
149
    </xsl:choose>
150
</xsl:template>
151

  
152
</xsl:stylesheet>
lib/style/skins/sbclter/eml/eml-storedprocedure-2.1.0.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile: eml-storedprocedure-2.0.0.xsl,v $'
4
  *      Authors: Jivka Bojilova
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author: cjones $'
10
  *     '$Date: 2004/10/05 23:50:34 $'
11
  * '$Revision: 1.1 $'
12
  *
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
  *
27
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
  * convert an XML file that is valid with respect to the eml-file.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33

  
34

  
35
  <xsl:output method="html" encoding="iso-8859-1"
36
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
37
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
38
              indent="yes" />  
39
  <!-- This module is for datatable module-->
40

  
41
  <xsl:template name="storedProcedure">
42
      <xsl:param name="storedprocedurefirstColStyle"/>
43
      <xsl:param name="storedproceduresubHeaderStyle"/>
44
      <xsl:param name="docid"/>
45
      <xsl:param name="entityindex"/>
46
      <table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}">
47
        <xsl:choose>
48
         <xsl:when test="references!=''">
49
          <xsl:variable name="ref_id" select="references"/>
50
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
51
          <xsl:for-each select="$references">
52
            <xsl:call-template name="storedProcedureCommon">
53
             <xsl:with-param name="storedprocedurefirstColStyle" select="$storedprocedurefirstColStyle"/>
54
             <xsl:with-param name="storedproceduresubHeaderStyle" select="$storedproceduresubHeaderStyle"/>
55
             <xsl:with-param name="docid" select="$docid"/>
56
             <xsl:with-param name="entityindex" select="$entityindex"/>
57
            </xsl:call-template>
58
          </xsl:for-each>
59
        </xsl:when>
60
        <xsl:otherwise>
61
           <xsl:call-template name="storedProcedureCommon">
62
             <xsl:with-param name="storedprocedurefirstColStyle" select="$storedprocedurefirstColStyle"/>
63
             <xsl:with-param name="storedproceduresubHeaderStyle" select="$storedproceduresubHeaderStyle"/>
64
             <xsl:with-param name="docid" select="$docid"/>
65
             <xsl:with-param name="entityindex" select="$entityindex"/>
66
            </xsl:call-template>
67
         </xsl:otherwise>
68
      </xsl:choose>
69
      </table>
70
  </xsl:template>
71

  
72
  <xsl:template name="storedProcedureCommon">
73
    <xsl:param name="storedprocedurefirstColStyle"/>
74
    <xsl:param name="storedproceduresubHeaderStyle"/>
75
    <xsl:param name="docid"/>
76
    <xsl:param name="entityindex"/>
77
    <xsl:for-each select="entityName">
78
       <xsl:call-template name="entityName">
79
          <xsl:with-param name="entityfirstColStyle" select="$storedprocedurefirstColStyle"/>
80
       </xsl:call-template>
81
    </xsl:for-each>
82
    <xsl:for-each select="alternateIdentifier">
83
       <xsl:call-template name="entityalternateIdentifier">
84
          <xsl:with-param name="entityfirstColStyle" select="$storedprocedurefirstColStyle"/>
85
       </xsl:call-template>
86
    </xsl:for-each>
87
    <xsl:for-each select="entityDescription">
88
       <xsl:call-template name="entityDescription">
89
          <xsl:with-param name="entityfirstColStyle" select="$storedprocedurefirstColStyle"/>
90
       </xsl:call-template>
91
    </xsl:for-each>
92
    <xsl:for-each select="additionalInfo">
93
       <xsl:call-template name="entityadditionalInfo">
94
          <xsl:with-param name="entityfirstColStyle" select="$storedprocedurefirstColStyle"/>
95
       </xsl:call-template>
96
    </xsl:for-each>
97
    <!-- call physical moduel without show distribution(we want see it later)-->
98
    <xsl:if test="physical">
99
       <tr><td class="{$storedproceduresubHeaderStyle}" colspan="2">
100
        Physical Structure Description:
101
      </td></tr>
102
    </xsl:if>
103
    <xsl:for-each select="physical">
104
       <tr><td colspan="2">
105
        <xsl:call-template name="physical">
106
         <xsl:with-param name="physicalfirstColStyle" select="$storedprocedurefirstColStyle"/>
107
         <xsl:with-param name="notshowdistribution">yes</xsl:with-param>
108
        </xsl:call-template>
109
        </td></tr>
110
    </xsl:for-each>
111
    <xsl:if test="coverage">
112
       <tr><td class="{$storedproceduresubHeaderStyle}" colspan="2">
113
        Coverage Description:
114
      </td></tr>
115
    </xsl:if>
116
    <xsl:for-each select="coverage">
117
      <tr><td colspan="2">
118
        <xsl:call-template name="coverage">
119
        </xsl:call-template>
120
      </td></tr>
121
    </xsl:for-each>
122
    <xsl:if test="method">
123
       <tr><td class="{$storedproceduresubHeaderStyle}" colspan="2">
124
        Method Description:
125
      </td></tr>
126
    </xsl:if>
127
    <xsl:for-each select="method">
128
      <tr><td colspan="2">
129
        <xsl:call-template name="method">
130
          <xsl:with-param name="methodfirstColStyle" select="$storedprocedurefirstColStyle"/>
131
          <xsl:with-param name="methodsubHeaderStyle" select="$storedproceduresubHeaderStyle"/>
132
        </xsl:call-template>
133
      </td></tr>
134
    </xsl:for-each>
135
    <xsl:if test="constraint">
136
       <tr><td class="{$storedproceduresubHeaderStyle}" colspan="2">
137
        Constraint:
138
      </td></tr>
139
    </xsl:if>
140
    <xsl:for-each select="constraint">
141
      <tr><td colspan="2">
142
        <xsl:call-template name="constraint">
143
          <xsl:with-param name="constraintfirstColStyle" select="$storedprocedurefirstColStyle"/>
144
        </xsl:call-template>
145
      </td></tr>
146
    </xsl:for-each>
147
    <xsl:for-each select="parameter">
148
       <tr><td width="{$firstColWidth}" class="{$storedprocedurefirstColStyle}">
149
            Parameter:
150
            </td>
151
            <td width="{$secondColWidth}">
152
               <table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}">
153
                  <xsl:for-each select="name">
154
                    <tr><td width="{$firstColWidth}" class="{$storedprocedurefirstColStyle}">
155
                          Name:
156
                         </td>
157
                         <td width="{$secondColWidth}" class="{$secondColStyle}">
158
                           <xsl:value-of select="."/>
159
                         </td>
160
                     </tr>
161
                  </xsl:for-each>
162
                  <xsl:for-each select="domainDescription">
163
                    <tr><td width="{$firstColWidth}" class="{$storedprocedurefirstColStyle}">
164
                          Domain:
165
                         </td>
166
                         <td width="{$secondColWidth}" class="{$secondColStyle}">
167
                           <xsl:value-of select="."/>
168
                         </td>
169
                     </tr>
170
                  </xsl:for-each>
171
                  <xsl:for-each select="required">
172
                    <tr><td width="{$firstColWidth}" class="{$storedprocedurefirstColStyle}">
173
                          Required:
174
                         </td>
175
                         <td width="{$secondColWidth}" class="{$secondColStyle}">
176
                           <xsl:value-of select="."/>
177
                         </td>
178
                     </tr>
179
                  </xsl:for-each>
180
                  <xsl:for-each select="repeats">
181
                    <tr><td width="{$firstColWidth}" class="{$storedprocedurefirstColStyle}">
182
                         Repeatable:
183
                         </td>
184
                         <td width="{$secondColWidth}" class="{$secondColStyle}">
185
                           <xsl:value-of select="."/>
186
                         </td>
187
                     </tr>
188
                  </xsl:for-each>
189
               </table>
190
            </td>
191
       </tr>
192
    </xsl:for-each>
193
    <xsl:if test="$withAttributes='1'">
194
    <xsl:for-each select="attributeList">
195
      <xsl:call-template name="storedProcedureAttributeList">
196
        <xsl:with-param name="storedprocedurefirstColStyle" select="$storedprocedurefirstColStyle"/>
197
        <xsl:with-param name="storedproceduresubHeaderStyle" select="$storedproceduresubHeaderStyle"/>
198
        <xsl:with-param name="docid" select="$docid"/>
199
        <xsl:with-param name="entityindex" select="$entityindex"/>
200
      </xsl:call-template>
201
    </xsl:for-each>
202
    </xsl:if>
203
     <!-- Here to display distribution info-->
204
    <xsl:for-each select="physical">
205
       <xsl:call-template name="storedProcedureShowDistribution">
206
          <xsl:with-param name="docid" select="$docid"/>
207
          <xsl:with-param name="entityindex" select="$entityindex"/>
208
          <xsl:with-param name="physicalindex" select="position()"/>
209
          <xsl:with-param name="storedprocedurefirstColStyle" select="$storedprocedurefirstColStyle"/>
210
          <xsl:with-param name="storedproceduresubHeaderStyle" select="$storedproceduresubHeaderStyle"/>
211
       </xsl:call-template>
212
    </xsl:for-each>
213
  </xsl:template>
214

  
215
  <xsl:template name="storedProcedureShowDistribution">
216
     <xsl:param name="storedprocedurefirstColStyle"/>
217
     <xsl:param name="storedproceduresubHeaderStyle"/>
218
     <xsl:param name="docid"/>
219
     <xsl:param name="level">entitylevel</xsl:param>
220
     <xsl:param name="entitytype">storedProcedure</xsl:param>
221
     <xsl:param name="entityindex"/>
222
     <xsl:param name="physicalindex"/>
223
     <xsl:for-each select="distribution">
224
      <tr><td colspan="2">
225
        <xsl:call-template name="distribution">
226
          <xsl:with-param name="docid" select="$docid"/>
227
          <xsl:with-param name="level" select="$level"/>
228
          <xsl:with-param name="entitytype" select="$entitytype"/>
229
          <xsl:with-param name="entityindex" select="$entityindex"/>
230
          <xsl:with-param name="physicalindex" select="$physicalindex"/>
231
          <xsl:with-param name="distributionindex" select="position()"/>
232
          <xsl:with-param name="disfirstColStyle" select="$storedprocedurefirstColStyle"/>
233
          <xsl:with-param name="dissubHeaderStyle" select="$storedproceduresubHeaderStyle"/>
234
        </xsl:call-template>
235
      </td></tr>
236
    </xsl:for-each>
237
  </xsl:template>
238

  
239

  
240
  <xsl:template name="storedProcedureAttributeList">
241
    <xsl:param name="storedprocedurefirstColStyle"/>
242
    <xsl:param name="storedproceduresubHeaderStyle"/>
243
    <xsl:param name="docid"/>
244
    <xsl:param name="entitytype">storedProcedure</xsl:param>
245
    <xsl:param name="entityindex"/>
246
    <tr><td class="{$storedproceduresubHeaderStyle}" colspan="2">
247
        <xsl:text>Attribute(s) Info:</xsl:text>
248
    </td></tr>
249
    <tr><td colspan="2">
250
         <xsl:call-template name="attributelist">
251
           <xsl:with-param name="docid" select="$docid"/>
252
           <xsl:with-param name="entitytype" select="$entitytype"/>
253
           <xsl:with-param name="entityindex" select="$entityindex"/>
254
         </xsl:call-template>
255
       </td>
256
    </tr>
257
  </xsl:template>
258

  
259

  
260

  
261
</xsl:stylesheet>
lib/style/skins/sbclter/eml/eml-view-2.1.0.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile: eml-view-2.0.0.xsl,v $'
4
  *      Authors: Jivka Bojilova
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author: cjones $'
10
  *     '$Date: 2004/10/05 23:50:34 $'
11
  * '$Revision: 1.1 $'
12
  *
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
  *
27
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
  * convert an XML file that is valid with respect to the eml-file.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33

  
34

  
35
  <xsl:output method="html" encoding="iso-8859-1"
36
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
37
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
38
              indent="yes" />  
39
  <!-- This module is for datatable module-->
40

  
41
  <xsl:template name="view">
42
      <xsl:param name="viewfirstColStyle"/>
43
      <xsl:param name="viewsubHeaderStyle"/>
44
      <xsl:param name="docid"/>
45
      <xsl:param name="entityindex"/>
46
      <table class="{$tabledefaultStyle}">
47
        <xsl:choose>
48
         <xsl:when test="references!=''">
49
          <xsl:variable name="ref_id" select="references"/>
50
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
51
          <xsl:for-each select="$references">
52
            <xsl:call-template name="viewCommon">
53
             <xsl:with-param name="viewfirstColStyle" select="$viewfirstColStyle"/>
54
             <xsl:with-param name="viewsubHeaderStyle" select="$viewsubHeaderStyle"/>
55
             <xsl:with-param name="docid" select="$docid"/>
56
             <xsl:with-param name="entityindex" select="$entityindex"/>
57
            </xsl:call-template>
58
          </xsl:for-each>
59
        </xsl:when>
60
        <xsl:otherwise>
61
           <xsl:call-template name="viewCommon">
62
             <xsl:with-param name="viewfirstColStyle" select="$viewfirstColStyle"/>
63
             <xsl:with-param name="viewsubHeaderStyle" select="$viewsubHeaderStyle"/>
64
             <xsl:with-param name="docid" select="$docid"/>
65
             <xsl:with-param name="entityindex" select="$entityindex"/>
66
            </xsl:call-template>
67
         </xsl:otherwise>
68
      </xsl:choose>
69
      </table>
70
  </xsl:template>
71

  
72
  <xsl:template name="viewCommon">
73
    <xsl:param name="viewfirstColStyle"/>
74
    <xsl:param name="viewsubHeaderStyle"/>
75
    <xsl:param name="docid"/>
76
    <xsl:param name="entityindex"/>
77
    <xsl:for-each select="entityName">
78
       <xsl:call-template name="entityName">
79
          <xsl:with-param name="entityfirstColStyle" select="$viewfirstColStyle"/>
80
       </xsl:call-template>
81
    </xsl:for-each>
82
    <xsl:for-each select="queryStatement">
83
       <tr><td class="{$viewfirstColStyle}">
84
            Query Statement:
85
            </td>
86
            <td class="{$secondColStyle}">
87
            <xsl:value-of select="."/>
88
            </td>
89
       </tr>
90
    </xsl:for-each>
91
    <xsl:for-each select="alternateIdentifier">
92
       <xsl:call-template name="entityalternateIdentifier">
93
          <xsl:with-param name="entityfirstColStyle" select="$viewfirstColStyle"/>
94
       </xsl:call-template>
95
    </xsl:for-each>
96
    <xsl:for-each select="entityDescription">
97
       <xsl:call-template name="entityDescription">
98
          <xsl:with-param name="entityfirstColStyle" select="$viewfirstColStyle"/>
99
       </xsl:call-template>
100
    </xsl:for-each>
101
    <xsl:for-each select="additionalInfo">
102
       <xsl:call-template name="entityadditionalInfo">
103
          <xsl:with-param name="entityfirstColStyle" select="$viewfirstColStyle"/>
104
       </xsl:call-template>
105
    </xsl:for-each>
106
    <!-- call physical moduel without show distribution(we want see it later)-->
107
    <xsl:if test="physical">
108
       <tr><td class="{$viewsubHeaderStyle}" colspan="2">
109
        Physical Structure Description:
110
      </td></tr>
111
    </xsl:if>
112
    <xsl:for-each select="physical">
113
       <tr><td colspan="2">
114
        <xsl:call-template name="physical">
115
         <xsl:with-param name="physicalfirstColStyle" select="$viewfirstColStyle"/>
116
         <xsl:with-param name="notshowdistribution">yes</xsl:with-param>
117
        </xsl:call-template>
118
        </td></tr>
119
    </xsl:for-each>
120

  
121
    <xsl:if test="coverage">
122
       <tr><td class="{$viewsubHeaderStyle}" colspan="2">
123
        Coverage Description:
124
      </td></tr>
125
    </xsl:if>
126
    <xsl:for-each select="coverage">
127
      <tr><td colspan="2">
128
        <xsl:call-template name="coverage">
129
        </xsl:call-template>
130
      </td></tr>
131
    </xsl:for-each>
132
    <xsl:if test="method">
133
       <tr><td class="{$viewsubHeaderStyle}" colspan="2">
134
        Method Description:
135
      </td></tr>
136
    </xsl:if>
137
    <xsl:for-each select="method">
138
      <tr><td colspan="2">
139
        <xsl:call-template name="method">
140
          <xsl:with-param name="methodfirstColStyle" select="$viewfirstColStyle"/>
141
          <xsl:with-param name="methodsubHeaderStyle" select="$viewsubHeaderStyle"/>
142
        </xsl:call-template>
143
      </td></tr>
144
    </xsl:for-each>
145
    <xsl:if test="constraint">
146
       <tr><td class="{$viewsubHeaderStyle}" colspan="2">
147
        Constraint:
148
      </td></tr>
149
    </xsl:if>
150
    <xsl:for-each select="constraint">
151
      <tr><td colspan="2">
152
        <xsl:call-template name="constraint">
153
          <xsl:with-param name="constraintfirstColStyle" select="$viewfirstColStyle"/>
154
        </xsl:call-template>
155
      </td></tr>
156
    </xsl:for-each>
157
    <xsl:if test="$withAttributes='1'">
158
     <xsl:for-each select="attributeList">
159
       <xsl:call-template name="viewAttributeList">
160
         <xsl:with-param name="viewfirstColStyle" select="$viewfirstColStyle"/>
161
         <xsl:with-param name="viewsubHeaderStyle" select="$viewsubHeaderStyle"/>
162
         <xsl:with-param name="docid" select="$docid"/>
163
         <xsl:with-param name="entityindex" select="$entityindex"/>
164
       </xsl:call-template>
165
     </xsl:for-each>
166
    </xsl:if>
167
    <xsl:if test="$withAttributes='1'">
168
     <!-- Here to display distribution info-->
169
    <xsl:for-each select="physical">
170
       <xsl:call-template name="viewShowDistribution">
171
          <xsl:with-param name="docid" select="$docid"/>
172
          <xsl:with-param name="entityindex" select="$entityindex"/>
173
          <xsl:with-param name="physicalindex" select="position()"/>
174
          <xsl:with-param name="viewfirstColStyle" select="$viewfirstColStyle"/>
175
          <xsl:with-param name="viewsubHeaderStyle" select="$viewsubHeaderStyle"/>
176
       </xsl:call-template>
177
    </xsl:for-each>
178
   </xsl:if>
179
  </xsl:template>
180

  
181
  <xsl:template name="viewShowDistribution">
182
     <xsl:param name="viewfirstColStyle"/>
183
     <xsl:param name="viewsubHeaderStyle"/>
184
     <xsl:param name="docid"/>
185
     <xsl:param name="level">entitylevel</xsl:param>
186
     <xsl:param name="entitytype">view</xsl:param>
187
     <xsl:param name="entityindex"/>
188
     <xsl:param name="physicalindex"/>
189
     <xsl:for-each select="distribution">
190
      <tr><td colspan="2">
191
        <xsl:call-template name="distribution">
192
          <xsl:with-param name="docid" select="$docid"/>
193
          <xsl:with-param name="level" select="$level"/>
194
          <xsl:with-param name="entitytype" select="$entitytype"/>
195
          <xsl:with-param name="entityindex" select="$entityindex"/>
196
          <xsl:with-param name="physicalindex" select="$physicalindex"/>
197
          <xsl:with-param name="distributionindex" select="position()"/>
198
          <xsl:with-param name="disfirstColStyle" select="$viewfirstColStyle"/>
199
          <xsl:with-param name="dissubHeaderStyle" select="$viewsubHeaderStyle"/>
200
        </xsl:call-template>
201
      </td></tr>
202
    </xsl:for-each>
203
  </xsl:template>
204

  
205

  
206
  <xsl:template name="viewAttributeList">
207
    <xsl:param name="viewfirstColStyle"/>
208
    <xsl:param name="viewsubHeaderStyle"/>
209
    <xsl:param name="docid"/>
210
    <xsl:param name="entitytype">view</xsl:param>
211
    <xsl:param name="entityindex"/>
212
    <tr><td class="{$viewsubHeaderStyle}" colspan="2">
213
        <xsl:text>Attribute(s) Info:</xsl:text>
214
    </td></tr>
215
    <tr><td colspan="2">
216
         <xsl:call-template name="attributelist">
217
           <xsl:with-param name="docid" select="$docid"/>
218
           <xsl:with-param name="entitytype" select="$entitytype"/>
219
           <xsl:with-param name="entityindex" select="$entityindex"/>
220
         </xsl:call-template>
221
       </td>
222
    </tr>
223
  </xsl:template>
224

  
225

  
226

  
227
</xsl:stylesheet>
lib/style/skins/sbclter/eml/eml-otherentity-2.1.0.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile: eml-otherentity-2.0.0.xsl,v $'
4
  *      Authors: Jivka Bojilova
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author: cjones $'
10
  *     '$Date: 2004/10/05 23:50:34 $'
11
  * '$Revision: 1.1 $'
12
  *
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
  *
27
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
  * convert an XML file that is valid with respect to the eml-file.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33

  
34

  
35
  <xsl:output method="html" encoding="iso-8859-1"
36
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
37
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
38
              indent="yes" />  
39
  <!-- This module is for datatable module-->
40

  
41
  <xsl:template name="otherEntity">
42
      <xsl:param name="otherentityfirstColStyle"/>
43
      <xsl:param name="otherentitysubHeaderStyle"/>
44
      <xsl:param name="docid"/>
45
      <xsl:param name="entityindex"/>
46
      <table class="{$tabledefaultStyle}">
47
        <xsl:choose>
48
         <xsl:when test="references!=''">
49
          <xsl:variable name="ref_id" select="references"/>
50
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
51
          <xsl:for-each select="$references">
52
            <xsl:call-template name="otherEntityCommon">
53
             <xsl:with-param name="otherentityfirstColStyle" select="$otherentityfirstColStyle"/>
54
             <xsl:with-param name="otherentitysubHeaderStyle" select="$otherentitysubHeaderStyle"/>
55
             <xsl:with-param name="docid" select="$docid"/>
56
             <xsl:with-param name="entityindex" select="$entityindex"/>
57
            </xsl:call-template>
58
          </xsl:for-each>
59
        </xsl:when>
60
        <xsl:otherwise>
61
           <xsl:call-template name="otherEntityCommon">
62
             <xsl:with-param name="otherentityfirstColStyle" select="$otherentityfirstColStyle"/>
63
             <xsl:with-param name="otherentitysubHeaderStyle" select="$otherentitysubHeaderStyle"/>
64
             <xsl:with-param name="docid" select="$docid"/>
65
             <xsl:with-param name="entityindex" select="$entityindex"/>
66
            </xsl:call-template>
67
         </xsl:otherwise>
68
      </xsl:choose>
69
      </table>
70
  </xsl:template>
71

  
72
  <xsl:template name="otherEntityCommon">
73
    <xsl:param name="otherentityfirstColStyle"/>
74
    <xsl:param name="otherentitysubHeaderStyle"/>
75
    <xsl:param name="docid"/>
76
    <xsl:param name="entityindex"/>
77
    <xsl:for-each select="entityName">
78
       <xsl:call-template name="entityName">
79
          <xsl:with-param name="entityfirstColStyle" select="$otherentityfirstColStyle"/>
80
       </xsl:call-template>
81
    </xsl:for-each>
82
    <xsl:for-each select="entityType">
83
       <tr><td class="{$otherentityfirstColStyle}">
84
            Entity Type:
85
            </td>
86
            <td class="{$secondColStyle}">
87
            <xsl:value-of select="."/>
88
            </td>
89
       </tr>
90
    </xsl:for-each>
91
    <xsl:for-each select="alternateIdentifier">
92
       <xsl:call-template name="entityalternateIdentifier">
93
          <xsl:with-param name="entityfirstColStyle" select="$otherentityfirstColStyle"/>
94
       </xsl:call-template>
95
    </xsl:for-each>
96
    <xsl:for-each select="entityDescription">
97
       <xsl:call-template name="entityDescription">
98
          <xsl:with-param name="entityfirstColStyle" select="$otherentityfirstColStyle"/>
99
       </xsl:call-template>
100
    </xsl:for-each>
101
    <xsl:for-each select="additionalInfo">
102
       <xsl:call-template name="entityadditionalInfo">
103
          <xsl:with-param name="entityfirstColStyle" select="$otherentityfirstColStyle"/>
104
       </xsl:call-template>
105
    </xsl:for-each>
106
    <!-- call physical moduel without show distribution(we want see it later)-->
107
    <xsl:if test="physical">
108
       <tr><td class="{$otherentitysubHeaderStyle}" colspan="2">
109
        Physical Structure Description:
110
      </td></tr>
111
    </xsl:if>
112
    <xsl:for-each select="physical">
113
        <tr><td colspan="2">
114
        <xsl:call-template name="physical">
115
         <xsl:with-param name="physicalfirstColStyle" select="$otherentityfirstColStyle"/>
116
         <xsl:with-param name="notshowdistribution">yes</xsl:with-param>
117
        </xsl:call-template>
118
         </td></tr>
119
     </xsl:for-each>
120

  
121
    <xsl:if test="coverage">
122
       <tr><td class="{$otherentitysubHeaderStyle}" colspan="2">
123
        Coverage Description:
124
      </td></tr>
125
    </xsl:if>
126
    <xsl:for-each select="coverage">
127
      <tr><td colspan="2">
128
        <xsl:call-template name="coverage">
129
        </xsl:call-template>
130
      </td></tr>
131
    </xsl:for-each>
132
    <xsl:if test="method">
133
       <tr><td class="{$otherentitysubHeaderStyle}" colspan="2">
134
        Method Description:
135
      </td></tr>
136
    </xsl:if>
137
    <xsl:for-each select="method">
138
      <tr><td colspan="2">
139
        <xsl:call-template name="method">
140
          <xsl:with-param name="methodfirstColStyle" select="$otherentityfirstColStyle"/>
141
          <xsl:with-param name="methodsubHeaderStyle" select="$otherentitysubHeaderStyle"/>
142
        </xsl:call-template>
143
      </td></tr>
144
    </xsl:for-each>
145
    <xsl:if test="constraint">
146
       <tr><td class="{$otherentitysubHeaderStyle}" colspan="2">
147
        Constraint:
148
      </td></tr>
149
    </xsl:if>
150
    <xsl:for-each select="constraint">
151
      <tr><td colspan="2">
152
        <xsl:call-template name="constraint">
153
          <xsl:with-param name="constraintfirstColStyle" select="$otherentityfirstColStyle"/>
154
        </xsl:call-template>
155
      </td></tr>
156
    </xsl:for-each>
157
    <xsl:if test="$withAttributes='1'">
158
    <xsl:for-each select="attributeList">
159
      <xsl:call-template name="otherEntityAttributeList">
160
        <xsl:with-param name="otherentityfirstColStyle" select="$otherentityfirstColStyle"/>
161
        <xsl:with-param name="otherentitysubHeaderStyle" select="$otherentitysubHeaderStyle"/>
162
        <xsl:with-param name="docid" select="$docid"/>
163
        <xsl:with-param name="entityindex" select="$entityindex"/>
164
      </xsl:call-template>
165
    </xsl:for-each>
166
    </xsl:if>
167
     <!-- Here to display distribution info-->
168
    <xsl:for-each select="physical">
169
       <xsl:call-template name="otherEntityShowDistribution">
170
          <xsl:with-param name="docid" select="$docid"/>
171
          <xsl:with-param name="entityindex" select="$entityindex"/>
172
          <xsl:with-param name="physicalindex" select="position()"/>
173
          <xsl:with-param name="otherentityfirstColStyle" select="$otherentityfirstColStyle"/>
174
          <xsl:with-param name="otherentitysubHeaderStyle" select="$otherentitysubHeaderStyle"/>
175
       </xsl:call-template>
176
    </xsl:for-each>
177
  </xsl:template>
178

  
179
  <xsl:template name="otherEntityShowDistribution">
180
     <xsl:param name="otherentityfirstColStyle"/>
181
     <xsl:param name="otherentitysubHeaderStyle"/>
182
     <xsl:param name="docid"/>
183
     <xsl:param name="level">entitylevel</xsl:param>
184
     <xsl:param name="entitytype">otherEntity</xsl:param>
185
     <xsl:param name="entityindex"/>
186
     <xsl:param name="physicalindex"/>
187
     <xsl:for-each select="distribution">
188
      <tr><td colspan="2">
189
        <xsl:call-template name="distribution">
190
          <xsl:with-param name="docid" select="$docid"/>
191
          <xsl:with-param name="level" select="$level"/>
192
          <xsl:with-param name="entitytype" select="$entitytype"/>
193
          <xsl:with-param name="entityindex" select="$entityindex"/>
194
          <xsl:with-param name="physicalindex" select="$physicalindex"/>
195
          <xsl:with-param name="distributionindex" select="position()"/>
196
          <xsl:with-param name="disfirstColStyle" select="$otherentityfirstColStyle"/>
197
          <xsl:with-param name="dissubHeaderStyle" select="$otherentitysubHeaderStyle"/>
198
        </xsl:call-template>
199
      </td></tr>
200
    </xsl:for-each>
201
  </xsl:template>
202

  
203

  
204
  <xsl:template name="otherEntityAttributeList">
205
    <xsl:param name="otherentityfirstColStyle"/>
206
    <xsl:param name="otherentitysubHeaderStyle"/>
207
    <xsl:param name="docid"/>
208
    <xsl:param name="entitytype">otherEntity</xsl:param>
209
    <xsl:param name="entityindex"/>
210
    <tr><td class="{$otherentitysubHeaderStyle}" colspan="2">
211
        <xsl:text>Attribute(s) Info:</xsl:text>
212
    </td></tr>
213
    <tr><td colspan="2">
214
         <xsl:call-template name="attributelist">
215
           <xsl:with-param name="docid" select="$docid"/>
216
           <xsl:with-param name="entitytype" select="$entitytype"/>
217
           <xsl:with-param name="entityindex" select="$entityindex"/>
218
         </xsl:call-template>
219
       </td>
220
    </tr>
221
  </xsl:template>
222

  
223

  
224

  
225
</xsl:stylesheet>
lib/style/skins/sbclter/eml/eml-distribution-2.1.0.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile: eml-distribution-2.0.0.xsl,v $'
4
  *      Authors: Matthew Brooke
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author: cjones $'
10
  *     '$Date: 2004/10/05 23:50:34 $'
11
  * '$Revision: 1.1 $'
12
  *
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
  *
27
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
  * convert an XML file that is valid with respect to the eml-variable.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33
  <xsl:import href="eml-text-2.0.0.xsl" />
34
  <xsl:output method="html" encoding="iso-8859-1"
35
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
36
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
37
              indent="yes" />  
38

  
39

  
40
<!-- This module is for distribution and it is self-contained-->
41

  
42
  <xsl:template name="distribution">
43
      <xsl:param name="disfirstColStyle"/>
44
      <xsl:param name="dissubHeaderStyle"/>
45
      <xsl:param name="docid"/>
46
      <xsl:param name="level">entitylevel</xsl:param>
47
      <xsl:param name="entitytype"/>
48
      <xsl:param name="entityindex"/>
49
      <xsl:param name="physicalindex"/>
50
      <xsl:param name="distributionindex"/>
51
      <table class="{$tabledefaultStyle}">
52
       <xsl:choose>
53
         <xsl:when test="references!=''">
54
          <xsl:variable name="ref_id" select="references"/>
55
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
56
          <xsl:for-each select="$references">
57
            <xsl:apply-templates select="online">
58
              <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
59
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
60
            </xsl:apply-templates>
61
            <xsl:apply-templates select="offline">
62
              <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
63
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
64
            </xsl:apply-templates>
65
            <xsl:apply-templates select="inline">
66
              <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
67
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
68
               <xsl:with-param name="docid" select="$docid"/>
69
               <xsl:with-param name="level" select="$level"/>
70
               <xsl:with-param name="entitytype" select="$entitytype"/>
71
               <xsl:with-param name="entityindex" select="$entityindex"/>
72
               <xsl:with-param name="physicalindex" select="$physicalindex"/>
73
               <xsl:with-param name="distributionindex" select="$distributionindex"/>
74
             </xsl:apply-templates>
75
          </xsl:for-each>
76
        </xsl:when>
77
        <xsl:otherwise>
78
            <xsl:apply-templates select="online">
79
              <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
80
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
81
            </xsl:apply-templates>
82
            <xsl:apply-templates select="offline">
83
              <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
84
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
85
            </xsl:apply-templates>
86
            <xsl:apply-templates select="inline">
87
              <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
88
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
89
               <xsl:with-param name="docid" select="$docid"/>
90
               <xsl:with-param name="level" select="$level"/>
91
               <xsl:with-param name="entitytype" select="$entitytype"/>
92
               <xsl:with-param name="entityindex" select="$entityindex"/>
93
               <xsl:with-param name="physicalindex" select="$physicalindex"/>
94
               <xsl:with-param name="distributionindex" select="$distributionindex"/>
95
            </xsl:apply-templates>
96
        </xsl:otherwise>
97
       </xsl:choose>
98
      </table>
99
  </xsl:template>
100

  
101
  <!-- ********************************************************************* -->
102
  <!-- *******************************  Online data  *********************** -->
103
  <!-- ********************************************************************* -->
104
  <xsl:template match="online">
105
    <xsl:param name="disfirstColStyle"/>
106
    <xsl:param name="dissubHeaderStyle"/>
107
    <tr><td class="{$dissubHeaderStyle}" colspan="2">
108
        <xsl:text>Data Available Online:</xsl:text>
109
    </td></tr>
110
    <xsl:apply-templates select="url">
111
      <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
112
    </xsl:apply-templates>
113
    <xsl:apply-templates select="connection">
114
      <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
115
    </xsl:apply-templates>
116
    <xsl:apply-templates select="connectionDefinition">
117
      <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
118
    </xsl:apply-templates>
119
  </xsl:template>
120

  
121
  <xsl:template match="url">
122
    <xsl:param name="disfirstColStyle"/>
123
    <xsl:variable name="URL" select="."/>
124
     <xsl:variable name="entity_name">
125
         <xsl:value-of select="../../../../entityName"/>
126
     </xsl:variable>
127
    <tr>
128
        <!-- contents of this row depends on resource being downloaded
129
             if it's in a dataTable tree, url is intercepted by data-use-agreement-form which asks
130
             for some info via cgi script.
131
        -->
132
  <xsl:choose>
133
      <xsl:when test="ancestor::dataTable">   
134
      <td class="{$disfirstColStyle}">
135
        <xsl:text>&#160;</xsl:text>
136
        <xsl:text>View data after acceptance of Data Use Agreement:</xsl:text>
137
      </td>
138
      <td class="{$secondColStyle}">
139
       <!--     create links to each of this package's data entities. 
140
                   edit the url first, then pass it to the form template with param. -->
141
  
142
          
143
                 <xsl:choose>
144
                    <!-- 
145
                      if the content of url is to external data table -->
146
                    <xsl:when test="starts-with($URL,'http')">            
147
                      <xsl:variable name="URL1" select="$URL"/>
148
                        <xsl:call-template name="data_use_agreement_form">
149
                            <xsl:with-param name="entity_name" select="$entity_name"/>
150
                            <xsl:with-param name="URL1" select="$URL1"/>
151
                        </xsl:call-template>
152
                    </xsl:when>                 
153
                    <!-- 
154
                      if URL uses ecogrid protocol, strip off table name, then create metacat query  -->
155
                    <xsl:when test="starts-with($URL,'ecogrid')">                          
156
                      <xsl:variable name="URLsubstr" select="substring-after($URL, 'ecogrid://')"/>
157
                      <xsl:variable name="docID" select="substring-after($URLsubstr, '/')"/>
158
                       <xsl:variable name="URL1">
159
                           <!-- 
160
                           <xsl:text>@systemidserver@@servlet-path@?action=read&amp;qformat=</xsl:text><xsl:value-of select="$qformat"/><xsl:text>&amp;docid=</xsl:text><xsl:value-of select="$docID"/>
161
                           -->
162
                           <xsl:text>http://sbc.lternet.edu/catalog/metacat?action=read&amp;qformat=</xsl:text>
163
                           <xsl:value-of select="$qformat"/>
164
                           <xsl:text>&amp;docid=</xsl:text>
165
                           <xsl:value-of select="$docID"/>
166
                       </xsl:variable>
167
                       <xsl:call-template name="data_use_agreement_form">
168
                            <xsl:with-param name="entity_name" select="$entity_name"/>
169
                            <xsl:with-param name="URL1" select="$URL1"/>
170
                        </xsl:call-template>
171
                    </xsl:when>
172
                    <xsl:otherwise>
173
                         <!-- 
174
                         else, assume the url content is the just name of a metacat table -->
175
                       <xsl:variable name="URL1">
176
                          <xsl:text>@systemidserver@@servlet-path@?action=read&amp;qformat=</xsl:text>
177
                           <xsl:value-of select="$qformat"/>
178
                           <xsl:text>&amp;docid=</xsl:text>
179
                           <xsl:value-of select="$URL"/>
180
                       </xsl:variable>
181
                       <xsl:call-template name="data_use_agreement_form">
182
                            <xsl:with-param name="entity_name" select="$entity_name"/>
183
                            <xsl:with-param name="URL1" select="$URL1"/>
184
                       </xsl:call-template>
185
                    </xsl:otherwise>                
186
                  </xsl:choose>
187
         </td>
188
              </xsl:when>
189
              <xsl:otherwise>
190
                  <!-- the original content, url shows as a link. -->
191
                     <td class="{$disfirstColStyle}">
192
                        <xsl:text>&#160;</xsl:text>
193
                            <xsl:text>View this object:</xsl:text>
194
                        </td>
195
                        <td class="{$secondColStyle}">
196
                             <a>
197
                                  <xsl:choose>
198
                                     <xsl:when test="starts-with($URL,'ecogrid')">
199
		         <xsl:variable name="URL1" select="substring-after($URL, 'ecogrid://')"/>
200
		      <xsl:variable name="docID" select="substring-after($URL1, '/')"/>
201
		<xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docID"/></xsl:attribute>
202
           </xsl:when>
203
           <xsl:otherwise>
204
		<xsl:attribute name="href"><xsl:value-of select="$URL"/></xsl:attribute>
205
           </xsl:otherwise>
206
          </xsl:choose>
207
          <xsl:attribute name="target">_blank</xsl:attribute>
208
          <xsl:value-of select="."/>
209
        </a>
210
          </td>
211
          </xsl:otherwise>
212
         </xsl:choose>
213
          
214
          
215
      
216
    </tr>
217
  </xsl:template>
218

  
219
  <xsl:template match="connection">
220
    <xsl:param name="disfirstColStyle"/>
221
    <xsl:choose>
222
      <xsl:when test="references!=''">
223
        <xsl:variable name="ref_id" select="references"/>
224
        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
225
        <xsl:for-each select="$references">
226
          <xsl:call-template name="connectionCommon">
227
            <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle"/>
228
          </xsl:call-template>
229
        </xsl:for-each>
230
      </xsl:when>
231
      <xsl:otherwise>
232
        <xsl:call-template name="connectionCommon">
233
          <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle"/>
234
        </xsl:call-template>
235
      </xsl:otherwise>
236
    </xsl:choose>
237
  </xsl:template>
238

  
239
  <!-- A template shared by connection references and connection in line-->
240
  <xsl:template name="connectionCommon">
241
    <xsl:param name="disfirstColStyle"/>
242
    <xsl:if test="parameter">
243
      <tr>
244
        <td class="{$disfirstColStyle}">
245
          <xsl:text>Parameter(s):</xsl:text>
246
        </td>
247
        <td class="{$secondColStyle}"><xsl:text>&#160;</xsl:text>
248
        </td>
249
      </tr>
250
      <xsl:call-template name="renderParameters">
251
        <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
252
      </xsl:call-template>
253
    </xsl:if>
254
    <xsl:apply-templates select="connectionDefinition">
255
      <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
256
    </xsl:apply-templates>
257
  </xsl:template>
258

  
259
  <xsl:template name="renderParameters">
260
    <xsl:param name="disfirstColStyle"/>
261
    <xsl:for-each select="parameter" >
262
      <tr>
263
        <td class="{$disfirstColStyle}">
264
          <xsl:text>&#160;&#160;&#160;&#160;&#160;</xsl:text><xsl:value-of select="name" />
265
        </td>
266
        <td class="{$secondColStyle}">
267
         <xsl:value-of select="value" />
268
        </td>
269
      </tr>
270
    </xsl:for-each>
271
  </xsl:template>
272

  
273
   <xsl:template match="connectionDefinition">
274
    <xsl:param name="disfirstColStyle"/>
275
    <xsl:choose>
276
      <xsl:when test="references!=''">
277
        <xsl:variable name="ref_id" select="references"/>
278
        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
279
        <xsl:for-each select="$references">
280
          <xsl:call-template name="connectionDefinitionCommon">
281
            <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle"/>
282
          </xsl:call-template>
283
        </xsl:for-each>
284
      </xsl:when>
285
      <xsl:otherwise>
286
        <xsl:call-template name="connectionDefinitionCommon">
287
          <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle"/>
288
        </xsl:call-template>
289
      </xsl:otherwise>
290
    </xsl:choose>
291
   </xsl:template>
292

  
293
   <!-- This template will be shared by both reference and inline connectionDefinition-->
294
   <xsl:template name="connectionDefinitionCommon">
295
    <xsl:param name="disfirstColStyle"/>
296
      <tr>
297
          <td class="{$disfirstColStyle}">
298
            <xsl:text>Schema Name:</xsl:text>
299
          </td>
300
          <td class="{$secondColStyle}">
301
            <xsl:value-of select="schemeName" />
302
          </td>
303
       </tr>
304
       <tr>
305
          <td class="{$disfirstColStyle}">
306
            <xsl:text>Description:</xsl:text>
307
          </td>
308
          <td>
309
           <xsl:apply-templates select="description">
310
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
311
            </xsl:apply-templates>
312
          </td>
313
       </tr>
314
       <xsl:for-each select="parameterDefinition">
315
          <xsl:call-template name="renderParameterDefinition">
316
            <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
317
          </xsl:call-template>
318
       </xsl:for-each>
319
   </xsl:template>
320

  
321
   <xsl:template match="description">
322
     <xsl:param name="disfirstColStyle"/>
323
     <xsl:call-template name="text">
324
        <xsl:with-param name="textfirstColStyle" select="$secondColStyle" />
325
     </xsl:call-template>
326
   </xsl:template>
327

  
328
   <xsl:template name="renderParameterDefinition">
329
     <xsl:param name="disfirstColStyle"/>
330
     <tr>
331
        <td class="{$disfirstColStyle}">
332
          <xsl:text>&#160;&#160;&#160;&#160;&#160;</xsl:text><xsl:value-of select="name" /><xsl:text>:</xsl:text>
333
        </td>
334
        <td>
335
          <table class="{$tabledefaultStyle}">
336
            <tr>
337
              <td class="{$disfirstColStyle}">
338
                <xsl:choose>
339
                  <xsl:when test="defaultValue">
340
                    <xsl:value-of select="defaultValue" />
341
                  </xsl:when>
342
                  <xsl:otherwise>
343
                    &#160;
344
                  </xsl:otherwise>
345
                </xsl:choose>
346

  
347
              </td>
348
              <td class="{$secondColStyle}">
349
                <xsl:value-of select="definition" />
350
              </td>
351
            </tr>
352
          </table>
353
        </td>
354
      </tr>
355
   </xsl:template>
356

  
357
  <!-- ********************************************************************* -->
358
  <!-- *******************************  Offline data  ********************** -->
359
  <!-- ********************************************************************* -->
360

  
361
  <xsl:template match="offline">
362
    <xsl:param name="disfirstColStyle"/>
363
    <xsl:param name="dissubHeaderStyle"/>
364
    <tr><td class="{$dissubHeaderStyle}" colspan="2">
365
        <xsl:text>Data are Offline:</xsl:text>
366
    </td></tr>
367
    <xsl:if test="(mediumName) and normalize-space(mediumName)!=''">
368
      <tr><td class="{$disfirstColStyle}"><xsl:text>Medium:</xsl:text></td>
369
      <td class="{$secondColStyle}"><xsl:value-of select="mediumName"/></td></tr>
370
    </xsl:if>
371
    <xsl:if test="(mediumDensity) and normalize-space(mediumDensity)!=''">
372
    <tr><td class="{$disfirstColStyle}"><xsl:text>Medium Density:</xsl:text></td>
373
    <td class="{$secondColStyle}"><xsl:value-of select="mediumDensity"/>
374
    <xsl:if test="(mediumDensityUnits) and normalize-space(mediumDensityUnits)!=''">
375
    <xsl:text> (</xsl:text><xsl:value-of select="mediumDensityUnits"/><xsl:text>)</xsl:text>
376
    </xsl:if>
377
    </td></tr>
378
    </xsl:if>
379
    <xsl:if test="(mediumVol) and normalize-space(mediumVol)!=''">
380
    <tr><td class="{$disfirstColStyle}"><xsl:text>Volume:</xsl:text></td>
381
    <td class="{$secondColStyle}"><xsl:value-of select="mediumVol"/></td></tr>
382
    </xsl:if>
383
    <xsl:if test="(mediumFormat) and normalize-space(mediumFormat)!=''">
384
    <tr><td class="{$disfirstColStyle}"><xsl:text>Format:</xsl:text></td>
385
    <td class="{$secondColStyle}"><xsl:value-of select="mediumFormat"/></td></tr>
386
    </xsl:if>
387
    <xsl:if test="(mediumNote) and normalize-space(mediumNote)!=''">
388
    <tr><td class="{$disfirstColStyle}"><xsl:text>Notes:</xsl:text></td>
389
    <td class="{$secondColStyle}"><xsl:value-of select="mediumNote"/></td></tr>
390
    </xsl:if>
391
  </xsl:template>
392

  
393
  <!-- ********************************************************************* -->
394
  <!-- *******************************  Inline data  *********************** -->
395
  <!-- ********************************************************************* -->
396

  
397

  
398
  <xsl:template match="inline">
399
    <xsl:param name="disfirstColStyle"/>
400
    <xsl:param name="dissubHeaderStyle"/>
401
    <xsl:param name="docid"/>
402
    <xsl:param name="level">entity</xsl:param>
403
    <xsl:param name="entitytype"/>
404
    <xsl:param name="entityindex"/>
405
    <xsl:param name="physicalindex"/>
406
    <xsl:param name="distributionindex"/>
407

  
408
    <tr><td class="{$dissubHeaderStyle}" colspan="2">
409
        <xsl:text>Data:</xsl:text>
410
    </td></tr>
411
    <tr><td class="{$disfirstColStyle}">
412
      <xsl:text>&#160;</xsl:text></td>
413
      <td class="{$secondColStyle}">
414
      <!-- for top top distribution-->
415
      <xsl:if test="$level='toplevel'">
416
        <a><xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&amp;displaymodule=inlinedata&amp;distributionlevel=<xsl:value-of select="$level"/>&amp;distributionindex=<xsl:value-of select="$distributionindex"/></xsl:attribute>
417
        <b>Inline Data</b></a>
418
      </xsl:if>
419
      <xsl:if test="$level='entitylevel'">
420
        <a><xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&amp;displaymodule=inlinedata&amp;distributionlevel=<xsl:value-of select="$level"/>&amp;entitytype=<xsl:value-of select="$entitytype"/>&amp;entityindex=<xsl:value-of select="$entityindex"/>&amp;physicalindex=<xsl:value-of select="$physicalindex"/>&amp;distributionindex=<xsl:value-of select="$distributionindex"/></xsl:attribute>
421
        <b>Inline Data</b></a>
422
      </xsl:if>
423
     </td></tr>
424
  </xsl:template>
425

  
426
<!--
427

  
428

  
429
-->
430
    <xsl:template name="data_use_agreement_form">
431
        <xsl:param name="entity_name"/>
432
        <xsl:param name="URL1"/>
433
         <form action="http://sbcdata.lternet.edu/cgi-bin/data-use-agreement.cgi" method="POST">
434
             <xsl:attribute name="name">
435
                <xsl:value-of select="translate($entity_name,'()-.' ,'')" />
436
             </xsl:attribute>
437
             <input type="hidden" name="qformat" />
438
             <input type="hidden" name="sessionid" />
439
             <input type="hidden" name="url">
440
                 <xsl:attribute name="value">
441
                         <xsl:value-of select="$URL1"/>
442
                 </xsl:attribute>
443
            </input>
444
            <input type="hidden" name="entityName">
445
                 <xsl:attribute name="value">
446
                    <xsl:value-of select="$entity_name"/>
447
                 </xsl:attribute>
448
           </input>
449
           <input type="submit" name="data" class="view-data-button">
450
               <xsl:attribute name="value">Click to View: <xsl:value-of select="$entity_name"/>
451
               </xsl:attribute>
452
           </input>
453
          <br />
454
         </form>
455
        </xsl:template>
456

  
457

  
458
<!--
459

  
460

  
461

  
462
-->
463

  
464

  
465
</xsl:stylesheet>
lib/style/skins/sbclter/eml/eml-datatable-2.1.0.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile: eml-datatable-2.0.0.xsl,v $'
4
  *      Authors: Jivka Bojilova
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author: cjones $'
10
  *     '$Date: 2004/10/05 23:50:34 $'
11
  * '$Revision: 1.1 $'
12
  *
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
  *
27
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
  * convert an XML file that is valid with respect to the eml-file.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33

  
34

  
35
  <xsl:output method="html" encoding="iso-8859-1"
36
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
37
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
38
              indent="yes" />  
39
  <!-- This module is for datatable module-->
40
  <!-- change the "Entity Description" and  "Identifier" to a complete citation for dataset. in eml.xsl -->
41

  
42
  <xsl:template name="dataTable">
43
      <xsl:param name="datatablefirstColStyle"/>
44
      <xsl:param name="datatablesubHeaderStyle"/>
45
      <xsl:param name="docid"/> 
46
      <xsl:param name="entityindex"/>
47
      <!-- mob added this -->
48
      <xsl:param name="numberOfColumns">
49
      <xsl:if test="$withAttributes='1'"> 
50
        <xsl:value-of select="count(attributeList/attribute/attributeName)"/>
51
        </xsl:if>
52
      </xsl:param>  
53
 
54

  
55
      <h3>Data Table Description</h3>
56

  
57

  
58
      <table class="subGroup onehundred_percent">
59
        <tr>
60
          <td>
61

  
62
      <table class="{$tabledefaultStyle}">
63
        <xsl:choose>
64
         <xsl:when test="references!=''">
65
          <xsl:variable name="ref_id" select="references"/>
66
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
67
          <xsl:for-each select="$references">
68
            <xsl:call-template name="datatablecommon">
69
             <xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
70
             <xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
71
             <xsl:with-param name="docid" select="$docid"/>
72
             <xsl:with-param name="entityindex" select="$entityindex"/>
73
             <xsl:with-param name="numberOfColumns" select="$numberOfColumns"/>
74
            </xsl:call-template>
75
          </xsl:for-each>
76
        </xsl:when>
77
        <xsl:otherwise>
78
          <xsl:call-template name="datatablecommon">
79
             <xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
80
             <xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
81
             <xsl:with-param name="docid" select="$docid"/>
82
             <xsl:with-param name="entityindex" select="$entityindex"/>
83
             <xsl:with-param name="numberOfColumns" select="$numberOfColumns"/>
84
          </xsl:call-template>
85
         </xsl:otherwise>
86
      </xsl:choose>
87
      </table>
88

  
89
</td>
90
<td>
91
      <table class="{$tabledefaultStyle}">
92

  
93
   <!-- moved this out of datatablecommon, to break up linear arrangment  -->
94
       <xsl:if test="physical">
95
       <tr><th colspan="2">
96
        Description of Table Structure:
97
      </th></tr>
98
      <!-- distrubution is still under datatablecommon 
99
        <xsl:for-each select="physical">
100
       <xsl:call-template name="showdistribution">
101
          <xsl:with-param name="docid" select="$docid"/>
102
          <xsl:with-param name="entityindex" select="$entityindex"/>
103
          <xsl:with-param name="physicalindex" select="position()"/>
104
          <xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
105
          <xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
106
       </xsl:call-template>
107
    </xsl:for-each>-->
108
    </xsl:if>
109
    <xsl:for-each select="physical">
110
       <tr><td colspan="2">
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff