css und so
[cxml-rng.git] / doc / paginate.xsl
blobcd33738971c30754797d939e1e03e0b56a4be57f
1 <!--
2 The final stylesheet for HTML generation.
4 This file splits up the XML document and its <page> elements into
5 individual HTML files.
7 A few formatting elements like <columns> are resolved here.
8 -->
9 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
10 <xsl:output method="html"
11 indent="yes"
12 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
13 doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
15 <xsl:template match="@*|node()">
16 <xsl:copy>
17 <xsl:apply-templates select="@*|node()"/>
18 </xsl:copy>
19 </xsl:template>
21 <xsl:template match="/">
22 <xsl:apply-templates/>
23 </xsl:template>
25 <xsl:template match="pages">
26 <xsl:apply-templates/>
27 </xsl:template>
29 <xsl:template match="main-page">
30 <xsl:call-template name="page"/>
31 </xsl:template>
33 <xsl:template match="page">
34 <xsl:document href="{@pathname}"
35 method="html"
36 indent="yes"
37 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
38 doctype-system="http://www.w3.org/TR/html4/loose.dtd">
39 <xsl:call-template name="page"/>
40 </xsl:document>
41 </xsl:template>
43 <xsl:template name="page">
44 <html>
45 <head>
46 <title>
47 <xsl:value-of select="@title"/>
48 </title>
49 <link rel="stylesheet" type="text/css" href="{@base}doc.css"/>
50 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
51 </head>
52 <body>
53 <xsl:call-template name="header">
54 <xsl:with-param name="base" select="@base"/>
55 </xsl:call-template>
56 <div class="main">
57 <xsl:apply-templates/>
58 </div>
59 </body>
60 </html>
61 </xsl:template>
63 <xsl:template match="columns">
64 <table cellspacing="0" cellpadding="0">
65 <xsl:apply-templates select="@*"/>
66 <tr>
67 <xsl:apply-templates/>
68 </tr>
69 </table>
70 </xsl:template>
72 <xsl:template match="column">
73 <td valign="top">
74 <xsl:apply-templates select="@*"/>
75 <xsl:apply-templates/>
76 </td>
77 </xsl:template>
79 <xsl:template match="simple-table">
80 <table cellspacing="0" cellpadding="0">
81 <xsl:apply-templates select="@*"/>
82 <xsl:apply-templates/>
83 </table>
84 </xsl:template>
86 <xsl:template match="row">
87 <tr>
88 <xsl:apply-templates select="@*"/>
89 <xsl:apply-templates/>
90 </tr>
91 </xsl:template>
93 <xsl:template match="cell">
94 <td valign="top">
95 <xsl:apply-templates select="@*"/>
96 <xsl:apply-templates/>
97 </td>
98 </xsl:template>
100 <xsl:template match="padded">
101 <div class="padded">
102 <xsl:apply-templates/>
103 </div>
104 </xsl:template>
106 <xsl:template name="header">
107 <xsl:param name="base"/>
108 <div id="header">
109 <table cellspacing="0" cellpadding="0" width="100%">
110 <tr>
111 <td width="176">
112 <a id="headerlink" href="{$base}../index.html">
113 <img src="{$base}logo.png" border="0"/>
114 </a>
115 </td>
116 <td valign="center">
117 &#x2014;
118 <b> Relax NG for Closure XML</b>
119 </td>
120 <td valign="center" align="right">
121 <b>API documentation</b>
122 </td>
123 </tr>
124 </table>
125 </div>
126 </xsl:template>
127 </xsl:stylesheet>