Project

General

Profile

« Previous | Next » 

Revision 61

Added by bojilova over 24 years ago

corrected error within the xsl file

View differences:

eml-file-display.xsl
2 2
<!--   
3 3
* eml-file-display.xsl   
4 4
*   
5
*      Authors: Matt Jones   
5
*      Authors: Jivka Bojilova   
6 6
*    Copyright: 2000 Regents of the University of California and the    
7 7
*               National Center for Ecological Analysis and Synthesis   
8 8
*  For Details: http://www.nceas.ucsb.edu/   
......
10 10
*    File Info: '$Id$'   
11 11
*   
12 12
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to   
13
* convert an XML file that is valid with respect to the eml-variable.dtd   
13
* convert an XML file that is valid with respect to the eml-file.dtd   
14 14
* module of the Ecological Metadata Language (EML) into an HTML format    
15 15
* suitable for rendering with modern web browsers. 
16 16
--> 
......
24 24
      </head>   
25 25
      <body class="emlbody"> 	
26 26
        <center>           
27
          <h1>File structure description</h1>           
28
          <h3>Ecological Metadata Language</h3>         
27
          <h2>File structure description</h2>           
28
          <h4>Ecological Metadata Language</h4>         
29 29
        </center>
30 30
        <xsl:apply-templates select="eml-file/meta_file_id"/>          
31
        <h3>Files in the Data Set:</h3>         
32
        <table width="100%">         
33
          <tr class="rowodd">         
34
            <th><xsl:text>File Name</xsl:text></th>         
35
            <th><xsl:text>File Size</xsl:text></th>         
36
            <th><xsl:text>File Format</xsl:text></th>         
37
            <th><xsl:text>Orientation</xsl:text></th>         
38
            <th><xsl:text>Header Lines</xsl:text></th>         
39
            <th><xsl:text>Case Sensitive</xsl:text></th>         
40
            <th><xsl:text>Geographic Coverage</xsl:text></th>         
41
            <th><xsl:text>Temporal Coverage</xsl:text></th>         
42
            <th><xsl:text>Authentication</xsl:text></th>         
43
            <th><xsl:text>Data Problem</xsl:text></th>         
31
        <table width="750" border="0" cellspacing="0" cellpadding="1" bgcolor="#C0D3E7">
32
	  <tr>
33
	    <td><b>Data Set File</b></td>
34
	  </tr>
35
	</table>         
36
        <xsl:apply-templates select="eml-file/file"/>          
37

  
38
      </body>
39
    </html>
40
  </xsl:template>
41

  
42
  <xsl:template match="file">
43

  
44
	<table width="750" border="1" cellspacing="0" cellpadding="1" bgcolor="fffcfc">
45
          <tr>         
46
            <th width="25%" align="left" bgcolor="#ffffcc"><xsl:text>File Name</xsl:text></th>         
47
            <td bgcolor="#e0ffe0"><xsl:value-of select="file_name"/>         
48
                <xsl:text> </xsl:text></td>           
44 49
          </tr>          
45

  
46
          <xsl:for-each select="eml-file/file">           
47
          <tr valign="top">             
48
            <xsl:attribute name="class">               
49
              <xsl:choose>                 
50
                <xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>                
51
                <xsl:when test="position() mod 2 = 0">rowlight</xsl:when>               
52
              </xsl:choose>             
53
            </xsl:attribute>            
54
            <td><b><xsl:value-of select="file_name"/></b>               
55
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>           
56
            <td><xsl:value-of select="file_size/amount"/>
57
                <xsl:value-of select="file_size/unit"/>               
58
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>           
59
            <td><xsl:apply-templates select="format"/>               
60
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>           
61
            <td><xsl:apply-templates select="orientation"/>               
62
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>           
63
            <td><xsl:value-of select="header_lines"/>               
64
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>           
65
            <td><xsl:apply_templates select="case_sensitive"/>               
66
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>           
67
            <td><ul>               
50
          <tr>          
51
            <th align="left" bgcolor="#ffffcc"><xsl:text>File Size</xsl:text></th>         
52
            <td bgcolor="#e0ffe0">
53
		<xsl:value-of select="file_size/amount"/>
54
                <xsl:value-of select="file_size/unit"/>
55
                <xsl:cdata> </xsl:cdata></td>           
56
          </tr>          
57
          <tr>          
58
            <th align="left" bgcolor="#ffffcc"><xsl:text>File Format</xsl:text></th>         
59
            <td bgcolor="#e0ffe0"><xsl:apply-templates select="format"/>               
60
                <xsl:text> </xsl:text></td>           
61
          </tr>          
62
          <tr>          
63
            <th align="left" bgcolor="#ffffcc"><xsl:text>Orientation</xsl:text></th>         
64
            <td bgcolor="#e0ffe0"><xsl:apply-templates select="orientation"/>               
65
                <xsl:text> </xsl:text></td>           
66
          </tr>          
67
          <tr>          
68
            <th align="left" bgcolor="#ffffcc"><xsl:text>Header Lines</xsl:text></th>         
69
            <td bgcolor="#e0ffe0"><xsl:value-of select="header_lines"/>               
70
                <xsl:text> </xsl:text></td>           
71
          </tr>          
72
          <tr>          
73
            <th align="left" bgcolor="#ffffcc"><xsl:text>Case Sensitive</xsl:text></th>         
74
            <td bgcolor="#e0ffe0"><xsl:apply-templates select="case_sensitive"/>               
75
                <xsl:text> </xsl:text></td>           
76
          </tr>          
77
          <tr>          
78
            <th align="left" bgcolor="#ffffcc"><xsl:text>Geographic Coverage</xsl:text></th>         
79
            <td bgcolor="#e0ffe0">
80
		<xsl:if test="geographic_coverage/paragraph/text() or geographic_coverage/coordinates/lattitude/text() or geographic_coverage/coordinates/longitude/text()"><ul>
68 81
                <xsl:for-each select="geographic_coverage">
69 82
                <li><xsl:for-each select="paragraph">
70 83
                      <xsl:value-of select="."/><br/>
71 84
                    </xsl:for-each>                     
72 85
                    <xsl:for-each select="coordinates">                        
73
                      <xsl:value-of select="lattitude"/>                        
74
                      <xsl:value-of select="longitude"/><br/>
86
                      <xsl:value-of select="lattitude"/>la -                         
87
                      <xsl:value-of select="longitude"/>lo<br/>
75 88
                    </xsl:for-each>                 
76 89
                </li>               
77 90
                </xsl:for-each>               
78
                </ul>               
79
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>           
80
            <td><ul>               
91
                </ul></xsl:if>
92
                <xsl:text> </xsl:text></td>           
93
          </tr>          
94
          <tr>          
95
            <th align="left" bgcolor="#ffffcc"><xsl:text>Temporal Coverage</xsl:text></th>         
96
            <td bgcolor="#e0ffe0">
97
		<xsl:if test="temporal_coverage/*/*/*/text()"><ul>
81 98
                <xsl:for-each select="temporal_coverage">                 
82 99
                <li><xsl:text>Start Date </xsl:text>
83 100
                    <xsl:apply-templates select="start_date/datetime"/> 
......
85 102
                    <xsl:apply-templates select="stop_date/datetime"/>
86 103
                </li>
87 104
                </xsl:for-each>
88
                </ul>
89
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
90
            <td><xsl:for-each select="authentication">
91
                <xsl:value-of select="."/><br />
105
                </ul></xsl:if>
106
                <xsl:text><xsl:value-of select="string('&nbsp;')"/></xsl:text></td>
107
          </tr>          
108
          <tr>          
109
            <th align="left" bgcolor="#ffffcc"><xsl:text>Authentication</xsl:text></th>         
110
            <td bgcolor="#e0ffe0"><xsl:for-each select="authentication">
111
                  <xsl:value-of select="."/><br />
92 112
                </xsl:for-each>
93
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
94
            <td><xsl:for-each select="data_problem">
95
                  <xsl:for-each select="paragraph"/>
113
                <xsl:text> </xsl:text></td>
114
          </tr>          
115
          <tr>          
116
            <th align="left" bgcolor="#ffffcc"><xsl:text>Data Problem</xsl:text></th>         
117
            <td bgcolor="#e0ffe0"><xsl:for-each select="data_problem">
118
                  <xsl:for-each select="paragraph">
96 119
                    <xsl:value-of select="."/><br/>
97 120
                  </xsl:for-each>
98 121
                </xsl:for-each>
99
                <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
100
          </tr>
101
          </xsl:for-each>
122
                <xsl:text> </xsl:text></td>
123
          </tr>          
124

  
102 125
        </table>
103
      </body>
104
    </html>
105 126
  </xsl:template>
106 127

  
107 128
  <xsl:template match="meta_file_id">
108
    <table>
129
    <table border="0" cellspacing="0" cellpadding="1">
109 130
      <tr>
110 131
        <td class="shaded">
111 132
          <b><xsl:text>Metadata File ID:</xsl:text></b>

Also available in: Unified diff