~ubuntu-branches/ubuntu/lucid/tidy/lucid

« back to all changes in this revision

Viewing changes to htmldoc/quickref-html.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Jason Thomas
  • Date: 2008-01-20 21:46:03 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080120214603-poklofici9og61tx
Tags: 20080116cvs-2
* debian/control: build depends on xsltproc
  (closes: #461608)
* debian/tidy.preinst,postinst: add code to move old config file
  (closes: #461623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!--
 
3
    For generating the `quickref.html` web page from output of
 
4
    `tidy -xml-config`
 
5
 
 
6
    (c) 2005 (W3C) MIT, ERCIM, Keio University
 
7
    See tidy.h for the copyright notice.
 
8
 
 
9
    Written by Charles Reitzel and Jelks Cabaniss
 
10
 
 
11
  CVS Info :
 
12
 
 
13
    $Author: arnaud02 $
 
14
    $Date: 2005/04/13 11:10:58 $
 
15
    $Revision: 1.2 $
 
16
 
 
17
-->
 
18
 
 
19
<xsl:stylesheet version="1.0"
 
20
                xmlns="http://www.w3.org/1999/xhtml"
 
21
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
22
 
 
23
<xsl:output method="xml" indent="yes"
 
24
     encoding="us-ascii"
 
25
     omit-xml-declaration="yes"
 
26
     doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
 
27
     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
 
28
 
 
29
<xsl:template match="/">
 
30
  <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
 
31
  <head>
 
32
    <title>HTML Tidy Configuration Options Quick Reference</title>
 
33
    <link type="text/css" rel="stylesheet" href="tidy.css" />
 
34
  </head>
 
35
 
 
36
  <body>
 
37
    <h1 id="top">Quick Reference</h1>
 
38
 
 
39
    <h2>HTML Tidy Configuration Options</h2>
 
40
 
 
41
    <p><em>Generated automatically with HTML Tidy released
 
42
    on <xsl:value-of select="config/@version" />.</em></p>
 
43
 
 
44
    <p><a class="h3" href="#MarkupHeader">HTML, XHTML, XML</a><br />
 
45
     <a class="h3" href="#DiagnosticsHeader">Diagnostics</a><br />
 
46
     <a class="h3" href="#PrettyPrintHeader">Pretty Print</a><br />
 
47
     <a class="h3" href="#EncodingHeader">Character Encoding</a><br />
 
48
     <a class="h3" href="#MiscellaneousHeader">Miscellaneous</a></p>
 
49
 
 
50
    <xsl:call-template name="link-section" />
 
51
 
 
52
    <xsl:call-template name="detail-section" />
 
53
 
 
54
  </body>
 
55
  </html>
 
56
</xsl:template>
 
57
 
 
58
 
 
59
<!-- Named Templates: -->
 
60
 
 
61
<xsl:template name="link-section">
 
62
  <table summary="Tidy Options Quick Reference Header Section" border="0"
 
63
  cellpadding="3" cellspacing="0">
 
64
    <colgroup>
 
65
      <col width="33%" />
 
66
      <col width="33%" />
 
67
      <col width="33%" />
 
68
    </colgroup>
 
69
    <xsl:call-template name="links">
 
70
      <xsl:with-param name="class">markup</xsl:with-param>
 
71
      <xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
 
72
      <xsl:with-param name="headerID">MarkupHeader</xsl:with-param>
 
73
    </xsl:call-template>
 
74
    <xsl:call-template name="links">
 
75
      <xsl:with-param name="class">diagnostics</xsl:with-param>
 
76
      <xsl:with-param name="header">Diagnostics</xsl:with-param>
 
77
      <xsl:with-param name="headerID">DiagnosticsHeader</xsl:with-param>
 
78
    </xsl:call-template>
 
79
    <xsl:call-template name="links">
 
80
      <xsl:with-param name="class">print</xsl:with-param>
 
81
      <xsl:with-param name="header">Pretty Print</xsl:with-param>
 
82
      <xsl:with-param name="headerID">PrettyPrintHeader</xsl:with-param>
 
83
    </xsl:call-template>
 
84
    <xsl:call-template name="links">
 
85
      <xsl:with-param name="class">encoding</xsl:with-param>
 
86
      <xsl:with-param name="header">Character Encoding</xsl:with-param>
 
87
      <xsl:with-param name="headerID">EncodingHeader</xsl:with-param>
 
88
    </xsl:call-template>
 
89
    <xsl:call-template name="links">
 
90
      <xsl:with-param name="class">misc</xsl:with-param>
 
91
      <xsl:with-param name="header">Miscellaneous</xsl:with-param>
 
92
      <xsl:with-param name="headerID">MiscellaneousHeader</xsl:with-param>
 
93
    </xsl:call-template>
 
94
  </table>
 
95
</xsl:template>
 
96
 
 
97
 
 
98
<xsl:template name="detail-section">
 
99
  <table summary="Tidy Options Quick Reference Detail Section" border="0"
 
100
    cellpadding="3" cellspacing="0">
 
101
    <xsl:call-template name="reference">
 
102
      <xsl:with-param name="class">markup</xsl:with-param>
 
103
      <xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
 
104
      <xsl:with-param name="headerID">MarkupReference</xsl:with-param>
 
105
    </xsl:call-template>
 
106
    <xsl:call-template name="reference">
 
107
      <xsl:with-param name="class">diagnostics</xsl:with-param>
 
108
      <xsl:with-param name="header">Diagnostics</xsl:with-param>
 
109
      <xsl:with-param name="headerID">DiagnosticsReference</xsl:with-param>
 
110
    </xsl:call-template>
 
111
    <xsl:call-template name="reference">
 
112
      <xsl:with-param name="class">print</xsl:with-param>
 
113
      <xsl:with-param name="header">Pretty Print</xsl:with-param>
 
114
      <xsl:with-param name="headerID">PrettyPrintReference</xsl:with-param>
 
115
    </xsl:call-template>
 
116
    <xsl:call-template name="reference">
 
117
      <xsl:with-param name="class">encoding</xsl:with-param>
 
118
      <xsl:with-param name="header">Character Encoding</xsl:with-param>
 
119
      <xsl:with-param name="headerID">EncodingReference</xsl:with-param>
 
120
    </xsl:call-template>
 
121
    <xsl:call-template name="reference">
 
122
      <xsl:with-param name="class">misc</xsl:with-param>
 
123
      <xsl:with-param name="header">Miscellaneous</xsl:with-param>
 
124
      <xsl:with-param name="headerID">MiscellaneousReference</xsl:with-param>
 
125
    </xsl:call-template>
 
126
  </table>
 
127
</xsl:template>
 
128
 
 
129
 
 
130
<xsl:template name="links">
 
131
  <xsl:param name="class"/>
 
132
  <xsl:param name="header"/>
 
133
  <xsl:param name="headerID"/>
 
134
  <tr valign="bottom">
 
135
    <td class="h3" colspan="2" id="{$headerID}">
 
136
      <xsl:value-of select="$header"/> Options</td>
 
137
    <td valign="top"><a href="#top">Top</a></td>
 
138
  </tr>
 
139
  <xsl:call-template name="ClassHeaders" />
 
140
  <xsl:for-each select="/config/option[@class=$class]">
 
141
    <xsl:sort select="name" order="ascending" />
 
142
    <tr>
 
143
      <td><a href="#{name}"><xsl:value-of select="name"/></a></td>
 
144
      <td><xsl:apply-templates select="type"/></td>
 
145
      <td><xsl:choose>
 
146
            <xsl:when test="string-length(default) &gt; 0 ">
 
147
              <xsl:apply-templates select="default" />
 
148
            </xsl:when>
 
149
            <xsl:otherwise>
 
150
              <strong>-</strong>
 
151
            </xsl:otherwise>
 
152
        </xsl:choose>
 
153
      </td>
 
154
    </tr>
 
155
  </xsl:for-each>
 
156
  <tr valign="bottom">
 
157
    <td colspan="3">&#160;</td>
 
158
  </tr>
 
159
</xsl:template>
 
160
 
 
161
 
 
162
<xsl:template name="reference">
 
163
  <xsl:param name="class"/>
 
164
  <xsl:param name="header"/>
 
165
  <xsl:param name="headerID"/>
 
166
 
 
167
  <tr>
 
168
    <td>&#160;</td>
 
169
  </tr>
 
170
  <tr valign="bottom">
 
171
    <td valign="top" colspan="2" class="h2" id="{$headerID}">
 
172
       <xsl:value-of select="$header"/> Options Reference
 
173
    </td>
 
174
  </tr>
 
175
  <tr>
 
176
    <td>&#160;</td>
 
177
  </tr>
 
178
 
 
179
  <xsl:for-each select="/config/option[@class=$class]">
 
180
    <xsl:sort select="name" order="ascending" />
 
181
    <tr>
 
182
      <td class="tabletitle" valign="top" id="{name}">
 
183
        <xsl:value-of select="name"/>
 
184
      </td>
 
185
      <td class="tabletitlelink" valign="top" align="right">
 
186
      <a href="#top">Top</a></td>
 
187
    </tr>
 
188
    <tr>
 
189
      <td valign="top">Type: <strong><xsl:value-of
 
190
        select="type"/></strong><br />
 
191
 
 
192
        <xsl:choose>
 
193
          <xsl:when test="string-length(default) &gt; 0">
 
194
            Default: <strong><xsl:apply-templates select="default" /></strong>
 
195
          </xsl:when>
 
196
          <xsl:otherwise>
 
197
            Default: <strong>-</strong>
 
198
          </xsl:otherwise>
 
199
        </xsl:choose>
 
200
 
 
201
        <xsl:choose>
 
202
          <xsl:when test="string-length(example) &gt; 0">
 
203
            <br />Example: <strong><xsl:apply-templates
 
204
                select="example"/></strong>
 
205
          </xsl:when>
 
206
          <xsl:otherwise>
 
207
            <br />Example: <strong>-</strong>
 
208
          </xsl:otherwise>
 
209
        </xsl:choose>
 
210
      </td>
 
211
      <td align="right" valign="top">
 
212
        <xsl:for-each select="seealso">
 
213
          <a href="#{.}"><xsl:apply-templates select="." /></a>
 
214
          <xsl:if test="position() != last()">
 
215
            <br />
 
216
          </xsl:if>
 
217
        </xsl:for-each>
 
218
      </td>
 
219
    </tr>
 
220
 
 
221
    <tr>
 
222
      <td colspan="2"><xsl:apply-templates select="description"/></td>
 
223
    </tr>
 
224
 
 
225
    <tr>
 
226
      <td>&#160;</td>
 
227
    </tr>
 
228
  </xsl:for-each>
 
229
</xsl:template>
 
230
 
 
231
<xsl:template name="ClassHeaders">
 
232
      <tr>
 
233
        <td class="tabletitle">Option</td>
 
234
        <td class="tabletitle">Type</td>
 
235
        <td class="tabletitle">Default</td>
 
236
      </tr>
 
237
</xsl:template>
 
238
 
 
239
 
 
240
<!-- Regular Templates: -->
 
241
<xsl:template match="a | code | em | strong | br">
 
242
    <xsl:element name="{local-name(.)}">
 
243
        <xsl:copy-of select="@* | node()" />
 
244
    </xsl:element>
 
245
</xsl:template>
 
246
 
 
247
</xsl:stylesheet>