1
2 <?xml version="1.0" encoding="ISO-8859-1"?>
3 <!--
4
5
6
7
8
9
10
11
12
13
14
15
16
17 -->
18 <xsl:stylesheet version="1.0"
19 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
20 <xsl:output method="html"/>
21
22 <xsl:template match="/">
23
24 <html>
25 <head><title>Say Hello Ten Times!</title></head>
26 <body>
27 <b>I am going to say hello Ten Times!</b>
28 <!-- begin_: Send_Loop_To_HTML -->
29 <xsl:call-template name="for.loop">
30 <xsl:with-param name="i">1</xsl:with-param>
31 <xsl:with-param name="count">10</xsl:with-param>
32 </xsl:call-template>
33 </body>
34 </html>
35
36 </xsl:template>
37
38
39 <!--begin_: Define_The_Output_Loop -->
40 <xsl:template name="for.loop">
41
42 <xsl:param name="i" />
43 <xsl:param name="count" />
44
45 <!--begin_: Line_by_Line_Output -->
46 <xsl:if test="$i <= $count">
47 <br /> <b><xsl:value-of select="$i" />.</b>Hello world!
48 </xsl:if>
49
50 <!--begin_: RepeatTheLoopUntilFinished-->
51 <xsl:if test="$i <= $count">
52 <xsl:call-template name="for.loop">
53 <xsl:with-param name="i">
54 <xsl:value-of select="$i + 1"/>
55 </xsl:with-param>
56 <xsl:with-param name="count">
57 <xsl:value-of select="$count"/>
58 </xsl:with-param>
59 </xsl:call-template>
60 </xsl:if>
61
62 </xsl:template>
63 </xsl:stylesheet>