Hide
Siafoo is here to make coding less frustrating and to save you time. Join Siafoo Now or Learn More

example use of ConvertSciToNumString.xsl template Atom Feed 0

In Brief This demonstrates how to use the xsl template
# 's
 1<xsl:stylesheet
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
3 version="1.0"
4>
5<!--
6 Example usage of ConvertSciToNumString.xsl
7-->
8
9<xsl:template match="/">
10 <html>
11 <head>
12 <title>Output for web page</title>
13 </head>
14 <body>
15 <xsl:apply-templates/>
16 </body>
17 </html>
18</xsl:template>
19
20<xsl:template match="main">
21 <table border="1" align="center">
22 <th>num</th>
23 <th>converted</th>
24 <th>number()</th>
25 <xsl:apply-templates/>
26 </table>
27</xsl:template>
28
29<xsl:template match="mynum">
30 <tr>
31 <td><xsl:value-of select="@num"/></td>
32 <td>
33 <xsl:call-template name="convertSciToNumString">
34 <xsl:with-param name="myval" select="@num"/>
35 </xsl:call-template>
36 </td>
37 <td><xsl:value-of select="number(@num)"/></td>
38 </tr>
39</xsl:template>
40
41<xsl:include href="ConvertSciToNumString.xsl"/>
42
43</xsl:stylesheet>

This demonstrates how to use the xsl template