2 The final stylesheet for HTML generation.
4 This file splits up the XML document and its <page> elements into
7 A few formatting elements like <columns> are resolved here.
9 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0">
10 <xsl:output method=
"html"
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()">
17 <xsl:apply-templates select=
"@*|node()"/>
21 <xsl:template match=
"/">
22 <xsl:apply-templates/>
25 <xsl:template match=
"pages">
26 <xsl:apply-templates/>
29 <xsl:template match=
"main-page">
30 <xsl:call-template name=
"page"/>
33 <xsl:template match=
"page">
34 <xsl:document href=
"{@pathname}"
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"/>
43 <xsl:template name=
"page">
47 <xsl:value-of select=
"@title"/>
49 <link rel=
"stylesheet" type=
"text/css" href=
"{@base}doc.css"/>
50 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8"/>
53 <xsl:call-template name=
"header">
54 <xsl:with-param name=
"base" select=
"@base"/>
57 <xsl:apply-templates/>
63 <xsl:template match=
"columns">
64 <table cellspacing=
"0" cellpadding=
"0">
65 <xsl:apply-templates select=
"@*"/>
67 <xsl:apply-templates/>
72 <xsl:template match=
"column">
74 <xsl:apply-templates select=
"@*"/>
75 <xsl:apply-templates/>
79 <xsl:template match=
"simple-table">
80 <table cellspacing=
"0" cellpadding=
"0">
81 <xsl:apply-templates select=
"@*"/>
82 <xsl:apply-templates/>
86 <xsl:template match=
"row">
88 <xsl:apply-templates select=
"@*"/>
89 <xsl:apply-templates/>
93 <xsl:template match=
"cell">
95 <xsl:apply-templates select=
"@*"/>
96 <xsl:apply-templates/>
100 <xsl:template match=
"padded">
102 <xsl:apply-templates/>
106 <xsl:template name=
"header">
107 <xsl:param name=
"base"/>
109 <table cellspacing=
"0" cellpadding=
"0" width=
"100%">
112 <a id=
"headerlink" href=
"{$base}../index.html">
113 <img src=
"{$base}logo.png" border=
"0"/>
118 <b> Relax NG for Closure XML
</b>
120 <td valign=
"center" align=
"right">
121 <b>API documentation
</b>