2 <xsl:stylesheet xmlns=
"http://www.w3.org/1999/xhtml" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.1">
3 <xsl:output method=
"xml" indent=
"yes" doctype-system=
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" doctype-public=
"-//W3C//DTD XHTML 1.0 Strict//EN"/>
4 <xsl:strip-space elements=
"blockquote/l"/>
5 <xsl:template match=
"/">
6 <xsl:apply-templates select=
"html"/>
8 <xsl:template match=
"html">
9 <html><xsl:apply-templates select=
"head|body"/></html>
11 <xsl:template match=
"head">
13 <xsl:apply-templates select=
"title"/>
14 <link rel=
"stylesheet" type=
"text/css" href=
"default.css"/>
17 <xsl:template match=
"title">
18 <title><xsl:value-of select=
"."/></title>
20 <xsl:template match=
"body">
23 <a href=
"index.html"><xsl:value-of select=
"//title/text()"/></a>
25 <xsl:apply-templates select=
"h|p|section"/>
27 <xsl:for-each select=
"section">
29 <a href=
"{@id}.html"><xsl:value-of select=
"h/text()"/></a>
30 <xsl:if test=
"count(section) > 0">
32 <xsl:for-each select=
"section">
33 <li><a href=
"{../@id}.html#{@id}"><xsl:value-of select=
"h/text()"/></a></li>
42 <xsl:template match=
"body/h">
43 <h1><xsl:value-of select=
"text()"/></h1>
45 <xsl:template match=
"body/section">
46 <xsl:document href=
"{@id}.html" method=
"xml" indent=
"yes">
49 <title><xsl:value-of select=
"h/text()"/> -
<xsl:value-of select=
"//title/text()"/></title>
50 <link rel=
"stylesheet" type=
"text/css" href=
"default.css"/>
54 <a href=
"index.html"><xsl:value-of select=
"//title/text()"/></a>
56 <xsl:apply-templates select=
"h|p|section|div|blockcode|blockquote|ol|ul"/>
61 <xsl:template match=
"body/section/h">
62 <h2><xsl:value-of select=
"text()"/></h2>
64 <xsl:template match=
"body/section/section">
65 <xsl:apply-templates select=
"h|p|div|blockcode|blockquote|section|ol|ul"/>
67 <xsl:template match=
"body/section/section/h">
68 <h3><xsl:value-of select=
"text()"/><a id=
"{../@id}"><xsl:text> </xsl:text></a></h3>
70 <xsl:template match=
"body/section/section/section">
71 <xsl:apply-templates select=
"h|p|div|blockcode|blockquote|section|ol|ul"/>
73 <xsl:template match=
"body/section/section/section/h">
74 <h4><xsl:value-of select=
"text()"/><a id=
"{../@id}"><xsl:text> </xsl:text></a></h4>
76 <xsl:template match=
"div[@role='note']">
77 <div class=
"note"><xsl:apply-templates select=
"h|p|blockcode|blockquote"/></div>
79 <xsl:template match=
"div/h">
80 <h4><xsl:value-of select=
"text()"/></h4>
82 <xsl:template match=
"p">
83 <p><xsl:apply-templates select=
"text()|code"/></p>
85 <xsl:template match=
"code">
86 <code><xsl:value-of select=
"text()"/></code>
88 <xsl:template match=
"blockcode">
89 <pre><xsl:value-of select=
"text()"/></pre>
91 <xsl:template match=
"blockquote">
92 <blockquote><xsl:apply-templates select=
"text()|l"/></blockquote>
94 <xsl:template match=
"blockquote/l">
95 <span class=
"literal"><xsl:value-of select=
"text()"/></span>
97 <xsl:template match=
"ol">
98 <ol><xsl:apply-templates select=
"item"/></ol>
100 <xsl:template match=
"ul">
101 <ul><xsl:apply-templates select=
"item"/></ul>
103 <xsl:template match=
"ol/item|ul/item">
104 <li><xsl:value-of select=
"text()"/></li>