1 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0">
2 <xsl:output method=
"html"
4 doctype-public=
"-//W3C//DTD HTML 4.01 Transitional//EN"
5 doctype-system=
"http://www.w3.org/TR/html4/loose.dtd"/>
7 <xsl:template match=
"@*|node()">
9 <xsl:apply-templates select=
"@*|node()"/>
13 <xsl:template match=
"/">
14 <xsl:apply-templates select=
"/tutorial/page"/>
15 <xsl:call-template name=
"examples"/>
18 <title>STP Tutorial
</title>
19 <link rel=
"stylesheet" type=
"text/css" href=
"tutorial.css"/>
20 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8"/>
23 <xsl:call-template name=
"header"/>
26 <table cellspacing=
"0" cellpadding=
"0">
27 <xsl:for-each select=
"/tutorial/page">
30 <xsl:value-of select=
"position()"/>
33 <xsl:text>  </xsl:text>
35 href=
"pages/{position()}.html">
36 <xsl:value-of select=
"@title"/>
38 <xsl:if test=
"@description">
39 <xsl:text>:
</xsl:text>
40 <xsl:value-of select=
"@description"/>
47 <div class=
"navigation">
49 <a class=
"icon" href=
"pages/1.html">
57 <xsl:template name=
"examples">
58 <xsl:document href=
"examples.html"
61 doctype-public=
"-//W3C//DTD HTML 4.01 Transitional//EN"
62 doctype-system=
"http://www.w3.org/TR/html4/loose.dtd">
68 <link rel=
"stylesheet" type=
"text/css" href=
"tutorial.css"/>
69 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8"/>
72 <div class=
"main" style=
"font-size: 8pt;">
75 The following simple examples and code snippets have been
76 taken from the
<a href=
"index.html">STP tutorial
</a>. The
77 containing tutorial slide is linked from each example.
79 <xsl:for-each select=
"//page">
80 <xsl:variable name=
"i" select=
"position()"/>
81 <xsl:for-each select=
".//example">
83 <div class=
"example-header">
84 <a href=
"pages/{$i}.html"
85 style=
"color: #aaaaaa">
86 (Page
<xsl:value-of select=
"$i"/>)
 
88 <xsl:value-of select=
"@title"/>
90 <xsl:apply-templates/>
95 <xsl:for-each select="//example">
97 <div class="example-header">
98 <xsl:value-of select="@title"/>
100 <xsl:apply-templates/>
102 <xsl:for-each select="ancestor::page">
103 <a href="pages/{position()}.html">
104 <xsl:value-of select="position()"/>
115 <xsl:template match=
"page">
116 <xsl:document href=
"pages/{position()}.html"
119 doctype-public=
"-//W3C//DTD HTML 4.01 Transitional//EN"
120 doctype-system=
"http://www.w3.org/TR/html4/loose.dtd">
125 <xsl:value-of select=
"position()"/>
127 <xsl:value-of select=
"@title"/>
129 <link rel=
"stylesheet" type=
"text/css" href=
"../tutorial.css"/>
130 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8"/>
133 <xsl:call-template name=
"header">
134 <xsl:with-param name=
"base" select=
"'../'"/>
138 <xsl:value-of select=
"@title"/>
140 <xsl:apply-templates/>
142 <div class=
"navigation">
144 <a class=
"icon" href=
"../index.html">
149 <xsl:when test=
"position() > 1">
150 <a class=
"icon" href=
"{position()-1}.html">⬖</a>
153 <span class=
"icon" style=
"color: #aaaaaa">⬖</span>
156 <xsl:value-of select=
"position()"/>
157 <xsl:text>/
</xsl:text>
158 <xsl:value-of select=
"count(../page)"/>
160 <xsl:when test=
"position() < count(../page)">
161 <a class=
"icon" href=
"{position()+1}.html">⬗</a>
164 <span class=
"icon" style=
"color: #aaaaaa">⬗</span>
173 <xsl:template match=
"code">
175 <xsl:apply-templates/>
179 <xsl:template match=
"inline-code">
180 <tt class=
"inline-code">
181 <xsl:apply-templates/>
185 <xsl:template match=
"repl">
187 <xsl:apply-templates/>
191 <xsl:template match=
"result">
193 <xsl:apply-templates/>
197 <xsl:template match=
"spacy-list">
199 <xsl:apply-templates/>
203 <xsl:template match=
"em">
205 <xsl:apply-templates/>
209 <xsl:template name=
"header">
210 <xsl:param name=
"base"/>
212 <table cellspacing=
"0" cellpadding=
"0" width=
"100%">
215 <div style=
"margin-left: 30px">
216 <a href=
"{$base}../index.html">
218 <span>cxml
–</span>
219 <span style=
"color: #55a6e0">stp
</span>
224 <td valign=
"center" align=
"right">