Project

General

Profile

« Previous | Next » 

Revision 41

Added by Matt Jones over 24 years ago

fixed stylesheet issue with undefined nbsp entity by wrapping it in CDATA section

View differences:

xsqltest/contents.html
47 47
<LI>View <A HREF="eml-dataset-display.xsl" TARGET="right">XSL source (XML to HTML)</A>
48 48
</UL>
49 49
<P>
50
<B>Example 3</B><BR>
51
Simple eml-variable display from static text file<BR>
52
<UL>
53
<LI>View <A HREF="eml-variable2.xsql" TARGET="right">eml-variable display (html output)</A>
54
<LI>View <A HREF="eml-variable2.xsql?xml-stylesheet=none" TARGET="right">eml-variable display (raw xml output)</A>
55
<LI>View <A HREF="eml-variable-display.xsl" TARGET="right">eml-variable display (XSL source)</A>
56
</UL>
57
<P>
50 58
</body>
51 59
</html>
xsqltest/eml-variable-display.xsl
55 55
            </xsl:attribute>
56 56

  
57 57
          <td><b><xsl:value-of select="variable_name"/></b>
58
              <xsl:text>&nbsp;</xsl:text></td>
58
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
59 59
          <td><xsl:value-of select="variable_definition"/>
60
              <xsl:text>&nbsp;</xsl:text></td>
60
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
61 61
          <td><xsl:value-of select="unit"/>
62
              <xsl:text>&nbsp;</xsl:text></td>
62
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
63 63
          <td><xsl:value-of select="storage_type"/>
64
              <xsl:text>&nbsp;</xsl:text></td>
64
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
65 65
          <td><ul>
66 66
              <xsl:for-each select="code_definition">
67 67
                <li><xsl:value-of select="code"/>
......
70 70
                </li>
71 71
              </xsl:for-each>
72 72
              </ul>
73
              <xsl:text>&nbsp;</xsl:text></td>
73
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
74 74
          <td><ul>
75 75
              <xsl:for-each select="numeric_range">
76 76
                <li><xsl:value-of select="minimum"/>
......
79 79
                </li>
80 80
              </xsl:for-each>
81 81
              </ul>
82
              <xsl:text>&nbsp;</xsl:text></td>
82
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
83 83
          <td><xsl:for-each select="missing_value_code">
84 84
                <xsl:value-of select="."/><br />
85 85
              </xsl:for-each>
86
              <xsl:text>&nbsp;</xsl:text></td>
86
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
87 87
          <td><xsl:value-of select="precision"/>
88
              <xsl:text>&nbsp;</xsl:text></td>
88
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
89 89
          <td><xsl:apply-templates select="field_format"/>
90
              <xsl:text>&nbsp;</xsl:text></td>
90
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
91 91
          </tr>
92 92
        </xsl:for-each>
93 93
        </table>
lib/style/eml-variable-display.xsl
55 55
            </xsl:attribute>
56 56

  
57 57
          <td><b><xsl:value-of select="variable_name"/></b>
58
              <xsl:text>&nbsp;</xsl:text></td>
58
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
59 59
          <td><xsl:value-of select="variable_definition"/>
60
              <xsl:text>&nbsp;</xsl:text></td>
60
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
61 61
          <td><xsl:value-of select="unit"/>
62
              <xsl:text>&nbsp;</xsl:text></td>
62
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
63 63
          <td><xsl:value-of select="storage_type"/>
64
              <xsl:text>&nbsp;</xsl:text></td>
64
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
65 65
          <td><ul>
66 66
              <xsl:for-each select="code_definition">
67 67
                <li><xsl:value-of select="code"/>
......
70 70
                </li>
71 71
              </xsl:for-each>
72 72
              </ul>
73
              <xsl:text>&nbsp;</xsl:text></td>
73
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
74 74
          <td><ul>
75 75
              <xsl:for-each select="numeric_range">
76 76
                <li><xsl:value-of select="minimum"/>
......
79 79
                </li>
80 80
              </xsl:for-each>
81 81
              </ul>
82
              <xsl:text>&nbsp;</xsl:text></td>
82
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
83 83
          <td><xsl:for-each select="missing_value_code">
84 84
                <xsl:value-of select="."/><br />
85 85
              </xsl:for-each>
86
              <xsl:text>&nbsp;</xsl:text></td>
86
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
87 87
          <td><xsl:value-of select="precision"/>
88
              <xsl:text>&nbsp;</xsl:text></td>
88
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
89 89
          <td><xsl:apply-templates select="field_format"/>
90
              <xsl:text>&nbsp;</xsl:text></td>
90
              <xsl:text><![CDATA[&nbsp;]]></xsl:text></td>
91 91
          </tr>
92 92
        </xsl:for-each>
93 93
        </table>

Also available in: Unified diff