1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta name="generator" content=
6"HTML Tidy for Mac OS X (vers 1st June 2003), see www.w3.org" />
7<link type="text/css" rel="stylesheet" href="tidy.css" />
8<title>HTML Tidy - Frequently Asked Questions</title>
9<style type="text/css">
10code { font-weight: bold; }
11</style>
12</head>
13<body>
14<h1>HTML Tidy - Frequently Asked Questions</h1>
15
16<h2>Overview</h2>
17
18<p class="abstract">Certain questions about Tidy come up on a
19regular basis. These are some that have been culled from postings
20to the html-tidy@w3.org and tidy-develop@lists.sourceforge.net
21mailing lists. If you don't see your question addressed here, see
22<a href="#support">How To Get Support</a> below.</p>
23
24<ul>
25<li><a href="#what-now">What Now?</a></li>
26
27<li><a href="#support">How to Get Support?</a></li>
28
29<li><a href="#bug">How to Submit A Bug Report</a></li>
30
31<li><a href="#feature">How to Submit A Feature Request</a></li>
32
33<li><a href="#layout">How Do I Control the Output Layout?</a></li>
34
35<li><a href="#version">What Version of Tidy Should I Use?</a></li>
36
37<li><a href="#regression">How Do I Run A Regression Test?</a></li>
38</ul>
39
40<hr />
41<dl>
42<dt><a name="what-now" id="what-now"></a>What Now?</dt>
43
44<dd><p>If you have a popup screen that reads as follows:
45<pre>
46HTML Tidy for Windows &lt;vers 1st August 2002; built on Aug 8 2002, at 15:41:13&gt;
47Parsing Console input &lt;stdin&gt;
48</pre>
49
50<p>and do not know what to do next, read on.</p>
51
52<p>Tidy is waiting for your HTML to come in, so it can parse it.
53 Tidy is fundamentally a tool that reads in HTML cleans it up and
54writes it out again. It was developed as a program you run from the
55console prompt, but there are GUI encapsulations available, e.g.
56HTML-Kit, which you might prefer.</p>
57
58<p>If you are using Windows, the first step is to unzip the zip file
59and place the tidy.exe file in a folder somewhere on your executables
60path. You may also want to set up a config file to save having to type
61lots of options each time you run Tidy. From the console prompt you can
62run Tidy like this:</p>
63
64<pre>
65C> tidy -m mywebpage.html
66</pre>
67
68<p>In this case, the <code>-m</code> option requests Tidy to write
69the tidied file back to the same filename as it read from
70(mywebpage.html). Tidy will give you a breakdown of the problems it
71found and the version of HTML the file appears to be using.</p>
72
73<p>To get a listing of Tidy command line options, just type 
74<code>tidy -?</code>.  To see a listing on configuration options,
75try <code>tidy -help-config</code>.  To get more info on the
76config options, see the <a 
77href="http://tidy.sourceforge.net/docs/quickref.html">Quick Reference</a>.</p>
78
79<p>See also Dave Raggett's <a href="http://tidy.sourceforge.net/docs/Overview.html#help">User Guide</a>.</p>
80
81<p>If you're not comfortable with the DOS command line, you should
82try one of the <a href="http://tidy.sourceforge.net/#tidylibapps">GUI
83Applications</a>.</p>
84</dd>
85
86<dt><a name="support" id="support"></a>How To Get Support</dt>
87
88<dd>
89<p>For general HTML Tidy support, the original mailing list
90html-tidy@w3.org is best. Sometimes developers are the last to
91know... Also, this list covers both Java and C versions, not to
92mention various value-added products such as GUI front ends, Perl
93and Python integration, etc. If you don't get a response after a
94couple tries or if you have a bug fix, bump it over to the
95developer list at tidy-develop@lists.sourceforge.net. It's not a
96hard line, but that is the general arrangement.</p>
97</dd>
98
99<dt><a name="bug" id="bug"></a>How to Submit A Bug Report</dt>
100
101<dd>
102<p>You are encouraged to report bugs you found to the Tidy
103developer team. Tidy's quality depends on your feedback. You can
104either file your bug report in the Sourceforge <a
105href="http://sourceforge.net/tracker/?func=add&group_id=27659&atid=390963">
106bug tracker</a> for HTML Tidy (<em>recommended</em>) or send a mail
107to the mailing list at html-tidy@w3.org. Note you do <em>not</em>
108have to have a Sourceforge account in order to file bug reports, or
109be subscribed to html-tidy@w3.org in order to post messages to the
110list.</p>
111
112<p>Prior to submitting a bug report, please check that the bug is
113not already known. Many are. If you are not sure, just ask. If it
114is new bug, make sure to include at least the following information
115in your report:</p>
116
117<ul>
118<li>A desciption of what you think went wrong.</li>
119
120<li>The HTML Tidy version (find it out by running <code>tidy
121-v</code>) and operating system you are running.</li>
122
123<li>The input, that exposes the bug.<br />
124 A small HTML document that reproduces the problem is best.</li>
125
126<li>The configuration options you've used. Command line options
127like<br />
128 <code>-asxml</code>, configuration files, etc. You may use
129<code>tidy -show-config</code> to get an overview of the active
130Tidy settings.</li>
131
132<li>Your e-mail address for further questions and comments.</li>
133</ul>
134
135<p>These information are necessary to reproduce whatever is
136failing, without them we cannot help you. Additional information -
137and patches - are very welcome!</p>
138
139<p><em>Please include only one bug per report.</em> Reports with
140multiple bugs are less easy to track and some bugs may get
141missed.</p>
142</dd>
143
144<dt><a name="feature" id="feature"></a>How to Submit A Feature
145Request</dt>
146
147<dd>
148<p>If you want Tidy to do something new that it doesn't do today
149(or stop doing something), then it is probably a feature
150request.</p>
151
152<p>The process for submitting a feature request is very similar to
153bug requests. A different <a
154href="http://sourceforge.net/tracker/?atid=390966&group_id=27659">
155tracker</a> is used on SourceForge to denote the difference in
156subject matter.</p>
157
158<p>As with bugs, please be sure that the feature has not already
159been requested. If the feature has already requested, you can add
160your comments to the feature request tracker, or send mail to the
161<a href="mailto:html-tidy@w3.org">mailing list</a> indicating your
162wish to also have the feature implemented. If the feature has not
163already been requested, send the same information as for a bug
164report, but place special emphasis on the desired output for a
165given input, desired options, etc. - please be as specific as
166possible about what you want Tidy to <em>do</em>.</p>
167</dd>
168
169<dt><a name="layout" id="layout"></a>How Do I Control the Output Layout?</dt>
170
171<dd>
172<p>There are three primary options that control how Tidy 
173formats your markup:</p>
174<ul>
175  <li><a class="code"
176         href="quickref.html#indent">indent</a></li>
177  <li><a class="code"
178         href="quickref.html#indent-attributes">indent-attributes</a></li>
179  <li><a class="code"
180         href="quickref.html#vertical-space">vertical-space</a></li>
181</ul>
182
183<p>Briefly, <code>indent</code> sets the level of left-to-right indenting 
184and, somewhat, how often elements are put onto a new line.  The options 
185are <code>yes</code>, <code>no</code>, and <code>auto</code>.  
186<code>indent-attributes</code> is a flag that, when set, tells Tidy to 
187put each attribute on a new line.  <code>vertical-space</code> is a flag
188that, when set, tells Tidy to add some empty lines for readability.  The 
189default for all three is <code>no</code>.  These options may be used in
190any combination to control you you want your markup to look.  The best
191thing is to experiment a bit to see what you like.  Be aware that 
192<code>indent yes</code> is deprecated for production use as it will 
193cause visual changes in most browsers.</p>
194
195<p>To get Tidy <em>Classic</em> <code>--indent auto</code> layout, use the following options:</p>
196
197<pre>
198indent: auto
199indent-attributes: no
200vertical-space: yes
201</pre>
202
203<p>You can read about more <em>Pretty Print</em> options
204<a href="quickref.html#PrettyPrintHeader">here</a>.</p>
205</dd>
206
207<dt><a name="version" id="version"></a>What Version of Tidy Should
208I Use?</dt>
209
210<dd>
211<p>The current Source Forge builds are recommended.  You can find these at 
212<a href="http://tidy.sourceforge.net">http://tidy.sourceforge.net</a>.
213People continue to report examples where Tidy does not catch some 
214ill-formed HTML or, worse, generates ill-formed HTML. These cases have 
215been significantly reduced. That said, be sure to test Tidy with some 
216representative files from your environment.</p>
217
218<p>For development work, use CVS directly on your development
219system. For information on how to pull Tidy sources from <a
220href="http://sourceforge.net/cvs/?group_id=27659">CVS</a>. This way
221you can keep abreast of changes to Tidy and quickly resolve
222conflicts.</p>
223
224<p>For building a front end (e.g. GUI or language binding), the
225simplest approach is to use TidyLib.  For more information
226about building and coding with TidyLib, see the <a 
227href="http://tidy.sourceforge.net/libintro.html">Introduction To TidyLib</a>.</p>
228</dd>
229
230<dt><a name="regression" id="regression">How Do I Run A 
231Regression Test?</a></dt>
232<dd>
233<p>You might ask, "Why should I run a regression test?".  If you
234are a Tidy user, you might want to compare a new version of Tidy
235to the version you are currently running.  This is a good idea
236if you are using Tidy in production applications such as web
237publishing.  If you are a Tidy developer, it is a good idea to
238run the regression test suite to make sure your fix or enhancement
239doesn't add new bugs.</p>
240
241<p>Detecting new bugs is easier said than done, because sometimes
242they are subtle and can only be seen in browsers (or one particular
243browser you don't even have).  But you can catch most crashes and
244many layout problems by running the test suite as described here.</p>
245
246<p>The basic process is simple: run the test suite <strong>before</strong>
247and <strong>after</strong> making changes to TidyLib and compare the output
248markup and messages.  Be aware that the test scripts for WinNT/2K/XP
249(alltest.cmd) and Linux/Unix (testall.sh) place the output files in
250<code>tidy/test/tmp</code>.  If you forget to run the <strong>before</strong>
251test, you can always download a binary from the <a 
252href="http://tidy.sourceforge.net/#binaries">Project Page</a>.  If you
253are not a TidyLib developer, you can download the <a 
254href="http://tidy.sourceforge.net/test/tidy_test.tgz">Test Suite</a> 
255directly.  Here are the steps to evaluate the impact of a TidyLib change.</p>
256
257<h3>For Windows</h3>
258<p><strong>Before</strong> making changes:</p>
259<pre>
260C:\tidy\test> alltest.cmd
261C:\tidy\test> ren tmp baseline
262</pre>
263
264<p><strong>After</strong> making changes and building Tidy:</p>
265<pre>
266C:\tidy\test> alltest.cmd
267C:\tidy\test> windiff tmp baseline
268</pre>
269
270<h3>For Linux/Unix</h3>
271<p><strong>Before</strong> making changes:</p>
272<pre>
273~/tidy/test$ /testall.sh
274~/tidy/test$ mv tmp baseline
275</pre>
276
277<p><strong>After</strong> making changes and building Tidy:</p>
278<pre>
279~/tidy/test$ /testall.sh
280~/tidy/test$ diff -u tmp baseline > diff.txt
281</pre>
282</dd>
283
284<!--
285        <dt><a name="" id=""></a></dt>
286        <dd>
287        </dd>
288
289        <dt><a name="" id=""></a></dt>
290        <dd>
291        </dd>
292        -->
293<!-- Save for future questions
294        <dt><a name="" id=""></a></dt>
295        <dd>
296        </dd>
297        -->
298</dl>
299</body>
300</html>
301