Project

General

Profile

« Previous | Next » 

Revision 63

Added by bojilova over 24 years ago

Jivka: resolved the problem with escape characters.
<xsl:output method="html" encoding="iso-8859-1"/>
encoding specifies the preferred character encoding
that the XSLT processor should use to encode
sequences of characters.
ISO 8859-1 (Latin-1) includes characters like  

View differences:

xsqltest/eml-file-display.xsl
14 14
* module of the Ecological Metadata Language (EML) into an HTML format    
15 15
* suitable for rendering with modern web browsers. 
16 16
--> 
17
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">    
17
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">   
18 18

  
19
  <xsl:output method="html"/>
19
  <xsl:output method="html" encoding="iso-8859-1"/>
20 20
  <xsl:template match="/">
21 21
    <html>       
22 22
      <head> 	
......
45 45
          <tr>         
46 46
            <th width="25%" align="left"><xsl:text>File Name</xsl:text></th>         
47 47
            <td><xsl:value-of select="file_name"/>         
48
                <xsl:text> </xsl:text></td>           
48
                <xsl:text>&nbsp;</xsl:text></td>           
49 49
          </tr>          
50 50
          <tr>          
51 51
            <th align="left"><xsl:text>File Size</xsl:text></th>         
52 52
            <td>
53 53
		<xsl:value-of select="file_size/amount"/>
54 54
                <xsl:value-of select="file_size/unit"/>
55
                <xsl:cdata> </xsl:cdata></td>           
55
                <xsl:text>&nbsp;</xsl:text></td>           
56 56
          </tr>          
57 57
          <tr>          
58 58
            <th align="left"><xsl:text>File Format</xsl:text></th>         
59 59
            <td><xsl:apply-templates select="format"/>               
60
                <xsl:text> </xsl:text></td>           
60
                <xsl:text>&nbsp;</xsl:text></td>           
61 61
          </tr>          
62 62
          <tr>          
63 63
            <th align="left"><xsl:text>Orientation</xsl:text></th>         
64 64
            <td><xsl:apply-templates select="orientation"/>               
65
                <xsl:text> </xsl:text></td>           
65
                <xsl:text>&nbsp;</xsl:text></td>           
66 66
          </tr>          
67 67
          <tr>          
68 68
            <th align="left"><xsl:text>Header Lines</xsl:text></th>         
69 69
            <td><xsl:value-of select="header_lines"/>               
70
                <xsl:text> </xsl:text></td>           
70
                <xsl:text>&nbsp;</xsl:text></td>           
71 71
          </tr>          
72 72
          <tr>          
73 73
            <th align="left"><xsl:text>Case Sensitive</xsl:text></th>         
74 74
            <td><xsl:apply-templates select="case_sensitive"/>               
75
                <xsl:text> </xsl:text></td>           
75
                <xsl:text>&nbsp;</xsl:text></td>           
76 76
          </tr>          
77 77
          <tr>          
78 78
            <th align="left"><xsl:text>Geographic Coverage</xsl:text></th>         
......
89 89
                </li>               
90 90
                </xsl:for-each>               
91 91
                </ul></xsl:if>
92
                <xsl:text> </xsl:text></td>           
92
                <xsl:text>&nbsp;</xsl:text></td>           
93 93
          </tr>          
94 94
          <tr>          
95 95
            <th align="left"><xsl:text>Temporal Coverage</xsl:text></th>         
......
103 103
                </li>
104 104
                </xsl:for-each>
105 105
                </ul></xsl:if>
106
                <xsl:text><xsl:value-of select="string('&nbsp;')"/></xsl:text></td>
106
                <xsl:text>&nbsp;</xsl:text></td>
107 107
          </tr>          
108 108
          <tr>          
109 109
            <th align="left"><xsl:text>Authentication</xsl:text></th>         
110 110
            <td><xsl:for-each select="authentication">
111
                  <xsl:value-of select="."/><br />
112
                </xsl:for-each>
113
                <xsl:text> </xsl:text></td>
111
                  <xsl:value-of select="."/><br/>
112
                </xsl:for-each></td>
114 113
          </tr>          
115 114
          <tr>          
116 115
            <th align="left"><xsl:text>Data Problem</xsl:text></th>         
......
118 117
                  <xsl:for-each select="paragraph">
119 118
                    <xsl:value-of select="."/><br/>
120 119
                  </xsl:for-each>
121
                </xsl:for-each>
122
                <xsl:text> </xsl:text></td>
120
                </xsl:for-each></td>
123 121
          </tr>          
124 122

  
125 123
        </table>
lib/style/eml-file-display.xsl
14 14
* module of the Ecological Metadata Language (EML) into an HTML format    
15 15
* suitable for rendering with modern web browsers. 
16 16
--> 
17
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">    
17
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">   
18 18

  
19
  <xsl:output method="html"/>
19
  <xsl:output method="html" encoding="iso-8859-1"/>
20 20
  <xsl:template match="/">
21 21
    <html>       
22 22
      <head> 	
......
45 45
          <tr>         
46 46
            <th width="25%" align="left"><xsl:text>File Name</xsl:text></th>         
47 47
            <td><xsl:value-of select="file_name"/>         
48
                <xsl:text> </xsl:text></td>           
48
                <xsl:text>&nbsp;</xsl:text></td>           
49 49
          </tr>          
50 50
          <tr>          
51 51
            <th align="left"><xsl:text>File Size</xsl:text></th>         
52 52
            <td>
53 53
		<xsl:value-of select="file_size/amount"/>
54 54
                <xsl:value-of select="file_size/unit"/>
55
                <xsl:cdata> </xsl:cdata></td>           
55
                <xsl:text>&nbsp;</xsl:text></td>           
56 56
          </tr>          
57 57
          <tr>          
58 58
            <th align="left"><xsl:text>File Format</xsl:text></th>         
59 59
            <td><xsl:apply-templates select="format"/>               
60
                <xsl:text> </xsl:text></td>           
60
                <xsl:text>&nbsp;</xsl:text></td>           
61 61
          </tr>          
62 62
          <tr>          
63 63
            <th align="left"><xsl:text>Orientation</xsl:text></th>         
64 64
            <td><xsl:apply-templates select="orientation"/>               
65
                <xsl:text> </xsl:text></td>           
65
                <xsl:text>&nbsp;</xsl:text></td>           
66 66
          </tr>          
67 67
          <tr>          
68 68
            <th align="left"><xsl:text>Header Lines</xsl:text></th>         
69 69
            <td><xsl:value-of select="header_lines"/>               
70
                <xsl:text> </xsl:text></td>           
70
                <xsl:text>&nbsp;</xsl:text></td>           
71 71
          </tr>          
72 72
          <tr>          
73 73
            <th align="left"><xsl:text>Case Sensitive</xsl:text></th>         
74 74
            <td><xsl:apply-templates select="case_sensitive"/>               
75
                <xsl:text> </xsl:text></td>           
75
                <xsl:text>&nbsp;</xsl:text></td>           
76 76
          </tr>          
77 77
          <tr>          
78 78
            <th align="left"><xsl:text>Geographic Coverage</xsl:text></th>         
......
89 89
                </li>               
90 90
                </xsl:for-each>               
91 91
                </ul></xsl:if>
92
                <xsl:text> </xsl:text></td>           
92
                <xsl:text>&nbsp;</xsl:text></td>           
93 93
          </tr>          
94 94
          <tr>          
95 95
            <th align="left"><xsl:text>Temporal Coverage</xsl:text></th>         
......
103 103
                </li>
104 104
                </xsl:for-each>
105 105
                </ul></xsl:if>
106
                <xsl:text><xsl:value-of select="string('&nbsp;')"/></xsl:text></td>
106
                <xsl:text>&nbsp;</xsl:text></td>
107 107
          </tr>          
108 108
          <tr>          
109 109
            <th align="left"><xsl:text>Authentication</xsl:text></th>         
110 110
            <td><xsl:for-each select="authentication">
111
                  <xsl:value-of select="."/><br />
112
                </xsl:for-each>
113
                <xsl:text> </xsl:text></td>
111
                  <xsl:value-of select="."/><br/>
112
                </xsl:for-each></td>
114 113
          </tr>          
115 114
          <tr>          
116 115
            <th align="left"><xsl:text>Data Problem</xsl:text></th>         
......
118 117
                  <xsl:for-each select="paragraph">
119 118
                    <xsl:value-of select="."/><br/>
120 119
                  </xsl:for-each>
121
                </xsl:for-each>
122
                <xsl:text> </xsl:text></td>
120
                </xsl:for-each></td>
123 121
          </tr>          
124 122

  
125 123
        </table>

Also available in: Unified diff