<|start_filename|>Support/Externals/tidy/test/input/in_487283.html<|end_filename|>
<HTML>
<HEAD>
<TITLE>[ #487283 ] &gt;/select&lt; does not terminate &gt;option&lt;</TITLE>
</HEAD>
<BODY>
<form>
<select>
<option>first selection
<option>next selection
<option>last selection
</select>
</form>
<table>
<tr>
<td>row 1, cell 1
<td>row 1, cell 2
<tr>
<td>row 2, cell 1
<td>row 2, cell 2
</table>
</BODY>
</HTML>

<|start_filename|>Support/Externals/tidy/test/input/in_443362.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title>[ #443362 ] null-pointer except. for doctype in pre</title> 
</head> 

<body> 
<h1>Unofficial W3C Validator FAQ</h1> 
<p>This is a list of frequently asked questions and answers asked on the 
<a href="http://lists.w3.org/Archive/Public/www-validator-css/" 
title="Mailing list archive"><EMAIL> mailing list</a>. 

<h2>
What does "<code>org.xml.sax.SAXException: 
Please, fix your system identifier (URI) in the DOCTYPE rule.</code>" mean?
</h2> 

<p>Your XHTML document contains a document type 
declaration but the system identifier points at some 
non-W3C URI. Your document probably contains something 
like this:
</p> 
<pre> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

</pre> 
</body> 
</html>

<|start_filename|>Support/Externals/tidy/test/accessTest/5-4-1-1.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/5.4.1</title>
</head>
<body>
<table summary="This layout table is using TH for formatting">
	<caption>This layout table is using TH for formatting.</caption>

	<tr>
		<th>Here is some text.</th><th>More text is this.</th>
	</tr>
	<tr>
		<td>Here is some text that is in a column.</td><td>Here is some more text that is also in a column.</td>
	</tr>

</table>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_450389.html<|end_filename|>
<html>
<head>
<title>[ #450389 ] Color attval check allows only black/#</title>
</head>
<body>
<!--
    {"black",   "#000000"}, {"green",  "#008000"},
    {"silver",  "#C0C0C0"}, {"lime",   "#00FF00"},
    {"gray",    "#808080"}, {"olive",  "#808000"},
    {"white",   "#FFFFFF"}, {"yellow", "#FFFF00"},
    {"maroon",  "#800000"}, {"navy",   "#000080"},
    {"red",     "#FF0000"}, {"blue",   "#0000FF"},
    {"purple",  "#800080"}, {"teal",   "#008080"},
    {"fuchsia", "#FF00FF"}, {"aqua",   "#00FFFF"},
-->

<!-- Bjoern says you can have any valid color, as long as it is black! -->

<p>
<font color = "black">Test black</font><br>
<font color = "green">Test green</font><br>
<font color = "silver">Test silver</font><br>
<font color = "lime">Test lime</font><br>
<font color = "gray">Test gray</font><br>
<font color = "olive">Test olive</font><br>
<font color = "white">Test white</font><br>
<font color = "yellow">Test yellow</font><br>
<font color = "maroon">Test maroon</font><br>
<font color = "navy">Test navy</font><br>
<font color = "red">Test red</font><br>
<font color = "blue">Test blue</font><br>
<font color = "purple">Test purple</font><br>
<font color = "teal">Test teal</font><br>
<font color = "fuchsia">Test fuchsia</font><br>
<font color = "aqua">Test aqua</font><br>
</p>

<p>
<font color = "Red">Test Red</font><br>
<font color = "RED">Test RED</font><br>
</p>

<p>
<font color = "reddish">Test invalid reddish</font><br>
</p>

<p>
<font color = "#000000">Test black #000000</font><br>
<font color = "#008000">Test green #008000</font><br>
<font color = "#C0C0C0">Test silver #C0C0C0</font><br>
<font color = "#00FF00">Test lime #00FF00</font><br>
<font color = "#808080">Test gray #808080</font><br>
<font color = "#808000">Test olive #808000</font><br>
<font color = "#FFFFFF">Test white #FFFFFF</font><br>
<font color = "#FFFF00">Test yellow #FFFF00</font><br>
<font color = "#800000">Test maroon #800000</font><br>
<font color = "#000080">Test navy #000080</font><br>
<font color = "#FF0000">Test red #FF0000</font><br>
<font color = "#0000FF">Test blue #0000FF</font><br>
<font color = "#800080">Test purple #800080</font><br>
<font color = "#008080">Test teal #008080</font><br>
<font color = "#FF00FF">Test fuchsia #FF00FF</font><br>
<font color = "#00FFFF">Test aqua #00FFFF</font><br>
</p>

<p>
<font color = "#ff0000">Test red #ff0000</font><br>
<font color = "#fF0000">Test red #fF0000</font><br>
</p>

<p>
<font color = "#FF">Test invalid red #FF</font><br>
</p>

<p>
<font color = "grurple">Test invalid grurple</font><br>
<font color = "#grurple">Test invalid #grurple</font><br>
<font color = "#1234567">Test invalid #1234567</font><br>
</p>

</body>
</html>

<|start_filename|>Support/Externals/tidy/test/input/in_427838.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<HTML> 
<HEAD> 
<META NAME="generator" CONTENT="Microsoft 
FrontPage 4.0"> 
<TITLE>[ #427838 ] Name Anchor thrown away</TITLE> 
</HEAD> 
<BODY> 
A fragment of html created by Frontpage..... 
<P><A 
NAME="clipboard"><H3>Clipboard</H3></A><P> 

lots more stuff deleted.... 

<!-- Dave's additions -->
<a href="bar">some text<a>
<a href="bar">some text<a href="foo">

</BODY> 
</HTML>

<|start_filename|>Support/Externals/tidy/test/input/in_680664.xhtml<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>
[ 680664 ] Malformed comment generates bad (X)HTML
</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<pre>
This is a test of some pre stuff.
See what happens to this comment <!-- right here !->
More pre
</pre>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_433360.html<|end_filename|>
<html>
<head><title>[ #433360 ] Tags with missing > can't be repaired</title></head>
<body>
<p>
<font size="-2">There seems to be an error occurring when you don't</font>
<font face="arial,helvetica, geneva" size="-2"<b>end</b> a tag with a &gt;.  Tidy won't fix it.</font>
</p>
</body>
</html>

<|start_filename|>Support/Externals/tidy/test/input/in_1052758.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<title><NAME></title>
</head>
<body>
<blockquote>
<p><cite>Pour qui sont ces serpents qui sifflent sur vos
t&ecirc;tes ?</cite><br />
&mdash; <NAME>, <cite>Andromaque</cite></p>
</blockquote>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/accessTest/13-1-1-3.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/13.1.1</title>
</head>
<body>
<a href="animals.htm">Want to find out more about small furry animals?
Then click here and this link will take you there.</a>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/alltest.cmd<|end_filename|>
@echo off

REM alltest.cmd - execute all test cases
REM
REM (c) 1998-2006 (W3C) MIT, ERCIM, Keio University
REM See tidy.c for the copyright notice.
REM
REM <URL:http://tidy.sourceforge.net/>
REM
REM CVS Info:
REM
REM    $Author: arnaud02 $
REM    $Date: 2006/12/30 08:36:33 $
REM    $Revision: 1.3 $

REM (for MS compiler users):
REM call alltest1 ..\build\msvc\Release\tidy.exe .\tmp

call alltest1 ..\bin\tidy.exe .\tmp


<|start_filename|>Support/Externals/tidy/test/input/in_431719.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 
<html> 
<head> 
  <title>Test input for bug #431719</title>
</head> 
<body> 
  <p>Problem is spec want "HTML 3.2 Final", but everyone
  in the world, including Tidy, uses "HTML 3.2".  So the 
  software has to recognize both FPI's as equivalent.

  <table> 
  <tr>
    <td>Missing table summary only applies to HTML 4.x</td> 
  </tr> 
  </table> 
</body> 
</html> 


<|start_filename|>Support/Externals/tidy/test/input/in_427810.html<|end_filename|>
<html>
<head>
<title>[ #427810 ] Proprietary elements not reported as err</title>
</head>
<body>
<!-- use "-clean" or not to test both cases -->
<p>Test inline element</p>
<blink>Proprietary inline element (blink)</blink>
<wbr>Proprietary inline element (wbr) - note starts on new line, doesn't need end tag
<nobr>Proprietary inline element (nobr)</nobr>
<p>Test inline element</p>
</body>
</html>


<|start_filename|>Support/Externals/tidy/build/gmake/Makefile<|end_filename|>
# Makefile - for tidy - HTML parser and pretty printer
#
#  CVS Info :
#
#     $Author: arnaud02 $ 
#     $Date: 2008/03/22 21:13:38 $ 
#     $Revision: 1.37 $ 
#
#  Copyright (c) 1998-2008 World Wide Web Consortium
#  (Massachusetts Institute of Technology, European Research 
#  Consortium for Informatics and Mathematics, Keio University).
#  All Rights Reserved.
#
#  Contributing Author(s):
#
#     <NAME> <<EMAIL>>
#     <NAME> <<EMAIL>>
#     <NAME><<EMAIL>>
#
#  The contributing author(s) would like to thank all those who
#  helped with testing, bug fixes, and patience.  This wouldn't
#  have been possible without all of you.
#
#  COPYRIGHT NOTICE:
#
#  This software and documentation is provided "as is," and
#  the copyright holders and contributing author(s) make no
#  representations or warranties, express or implied, including
#  but not limited to, warranties of merchantability or fitness
#  for any particular purpose or that the use of the software or
#  documentation will not infringe any third party patents,
#  copyrights, trademarks or other rights. 
#
#  The copyright holders and contributing author(s) will not be
#  liable for any direct, indirect, special or consequential damages
#  arising out of any use of the software or documentation, even if
#  advised of the possibility of such damage.
#
#  Permission is hereby granted to use, copy, modify, and distribute
#  this source code, or portions hereof, documentation and executables,
#  for any purpose, without fee, subject to the following restrictions:
#
#  1. The origin of this source code must not be misrepresented.
#  2. Altered versions must be plainly marked as such and must
#     not be misrepresented as being the original source.
#  3. This Copyright notice may not be removed or altered from any
#     source or altered source distribution.
# 
#  The copyright holders and contributing author(s) specifically
#  permit, without fee, and encourage the use of this source code
#  as a component for supporting the Hypertext Markup Language in
#  commercial products. If you use this source code in a product,
#  acknowledgment is not required but would be appreciated.
#

SHELL=/bin/sh

PROJECT=tidy

# Installation variables.  Spaces OK, only dir create and file copy operations.
runinst_prefix=/usr/local
devinst_prefix=/usr/local

bininst = ${runinst_prefix}/bin
libinst = ${devinst_prefix}/lib
incinst = ${devinst_prefix}/include/$(PROJECT)
maninst = ${devinst_prefix}/man

# Internal variables. - No spaces allowed: libtool chokes on spaces in directory names.
TOPDIR = ../..
INCDIR = ${TOPDIR}/include
APPDIR = ${TOPDIR}/console
SRCDIR = ${TOPDIR}/src
OBJDIR = ./obj
LIBDIR = ${TOPDIR}/lib
BINDIR = ${TOPDIR}/bin
DOCDIR = ${TOPDIR}/htmldoc

# Note about shared library and exported symbols:
# With gcc, one can control the exported symbols by either using 
# "-fvisibility=hidden -DTIDY_EXPORT='__attribute__((visibility("default")))'"
# or using a linker map (see GNU ld "--version-script").

# Lookup based on hash table can be disabled with 
# "-DELEMENT_HASH_LOOKUP=0 -DATTRIBUTE_HASH_LOOKUP=0"

# Memory mapped i/o can be disabled with -DSUPPORT_POSIX_MAPPED_FILES=0
#

# CFLAGS etc..
# For optimised builds, flags such as "-O2" should be added and -D_DEBUG=1
# disabled.
CC= gcc
CFLAGS= -g -pedantic -Wall -I $(INCDIR)
# flags only supported with gcc 3.x
CFLAGS += -Wunused-parameter

OTHERCFLAGS=
OTHERCFLAGS+= -D_DEBUG=1
# OTHERCFLAGS+= -fvisibility=hidden -DTIDY_EXPORT='__attribute__((visibility("default")))'
ifdef SUPPORT_UTF16_ENCODINGS
CFLAGS += -DSUPPORT_UTF16_ENCODINGS=$(SUPPORT_UTF16_ENCODINGS)
endif
ifdef SUPPORT_ASIAN_ENCODINGS
CFLAGS += -DSUPPORT_ASIAN_ENCODINGS=$(SUPPORT_ASIAN_ENCODINGS)
endif
ifdef SUPPORT_ACCESSIBILITY_CHECKS
CFLAGS += -DSUPPORT_ACCESSIBILITY_CHECKS=$(SUPPORT_ACCESSIBILITY_CHECKS)
endif

DEBUGFLAGS=-g
ifdef DMALLOC
DEBUGFLAGS += -DDMALLOC
endif

LIBS=
DEBUGLIBS=-ldmalloc

# Tidy lib related variables
TIDY_MAJOR = 1
TIDY_MINOR = 0

# This will come from autoconf again
LIBPREFIX = lib
LIBSUFFIX = .a
OBJSUF = .o

LIBRARY = $(LIBDIR)/$(LIBPREFIX)$(PROJECT)$(LIBSUFFIX)
AR=ar -r

XSLTPROC = xsltproc

EXES = $(BINDIR)/$(PROJECT) $(BINDIR)/tab2space

DOCS = $(DOCDIR)/quickref.html $(DOCDIR)/tidy.1

CONFIGXML = $(DOCDIR)/tidy-config.xml
HELPXML = $(DOCDIR)/tidy-help.xml

OBJFILES=\
        $(OBJDIR)/access$(OBJSUF)     $(OBJDIR)/attrs$(OBJSUF)      $(OBJDIR)/istack$(OBJSUF) \
        $(OBJDIR)/parser$(OBJSUF)     $(OBJDIR)/tags$(OBJSUF)       $(OBJDIR)/entities$(OBJSUF) \
        $(OBJDIR)/lexer$(OBJSUF)      $(OBJDIR)/pprint$(OBJSUF)     $(OBJDIR)/clean$(OBJSUF) \
        $(OBJDIR)/localize$(OBJSUF)   $(OBJDIR)/config$(OBJSUF)     $(OBJDIR)/alloc$(OBJSUF) \
        $(OBJDIR)/attrask$(OBJSUF)    $(OBJDIR)/attrdict$(OBJSUF)   $(OBJDIR)/attrget$(OBJSUF) \
        $(OBJDIR)/buffio$(OBJSUF)     $(OBJDIR)/fileio$(OBJSUF)     $(OBJDIR)/streamio$(OBJSUF) \
        $(OBJDIR)/tagask$(OBJSUF)     $(OBJDIR)/tmbstr$(OBJSUF)     $(OBJDIR)/utf8$(OBJSUF) \
        $(OBJDIR)/tidylib$(OBJSUF)    $(OBJDIR)/mappedio$(OBJSUF)

CFILES= \
        $(SRCDIR)/access.c       $(SRCDIR)/attrs.c        $(SRCDIR)/istack.c \
        $(SRCDIR)/parser.c       $(SRCDIR)/tags.c         $(SRCDIR)/entities.c \
        $(SRCDIR)/lexer.c        $(SRCDIR)/pprint.c       $(SRCDIR)/clean.c \
        $(SRCDIR)/localize.c     $(SRCDIR)/config.c       $(SRCDIR)/alloc.c \
        $(SRCDIR)/attrask.c      $(SRCDIR)/attrdict.c     $(SRCDIR)/attrget.c \
        $(SRCDIR)/buffio.c       $(SRCDIR)/fileio.c       $(SRCDIR)/streamio.c \
        $(SRCDIR)/tagask.c       $(SRCDIR)/tmbstr.c       $(SRCDIR)/utf8.c \
        $(SRCDIR)/tidylib.c      $(SRCDIR)/mappedio.c

HFILES= $(INCDIR)/platform.h     $(INCDIR)/tidy.h         $(INCDIR)/tidyenum.h \
        $(INCDIR)/buffio.h

LIBHFILES= \
        $(SRCDIR)/access.h       $(SRCDIR)/attrs.h        $(SRCDIR)/attrdict.h \
        $(SRCDIR)/clean.h        $(SRCDIR)/config.h       $(SRCDIR)/entities.h \
        $(SRCDIR)/fileio.h       $(SRCDIR)/forward.h      $(SRCDIR)/lexer.h \
        $(SRCDIR)/mappedio.h     $(SRCDIR)/message.h      $(SRCDIR)/parser.h \
        $(SRCDIR)/pprint.h       $(SRCDIR)/streamio.h     $(SRCDIR)/tags.h \
        $(SRCDIR)/tmbstr.h       $(SRCDIR)/utf8.h         $(SRCDIR)/tidy-int.h \
        $(SRCDIR)/version.h



all:    $(LIBRARY) $(EXES)

doc:    $(DOCS)

$(LIBRARY): $(OBJFILES)
	if [ ! -d $(LIBDIR) ]; then mkdir $(LIBDIR); fi
	$(AR) $@ $(OBJFILES)
ifdef RANLIB
	$(RANLIB) $@
endif

$(OBJDIR)/%$(OBJSUF):	$(SRCDIR)/%.c $(HFILES) $(LIBHFILES) Makefile
	if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi
	$(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ -c $<

$(BINDIR)/$(PROJECT):	$(APPDIR)/tidy.c $(HFILES) $(LIBRARY)
	if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi
	$(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ $(APPDIR)/tidy.c -I$(INCDIR) $(LIBRARY)

$(BINDIR)/tab2space: $(APPDIR)/tab2space.c
	if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR); fi
	$(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ $(APPDIR)/tab2space.c $(LIBS)

$(HELPXML): $(BINDIR)/$(PROJECT)
	$(BINDIR)/$(PROJECT) -xml-help > $@

$(CONFIGXML): $(BINDIR)/$(PROJECT)
	$(BINDIR)/$(PROJECT) -xml-config > $@

$(DOCDIR)/quickref.html: $(DOCDIR)/quickref-html.xsl $(CONFIGXML)
	$(XSLTPROC) -o $@ $(DOCDIR)/quickref-html.xsl $(CONFIGXML)

$(DOCDIR)/tidy.1: $(DOCDIR)/tidy1.xsl $(HELPXML) $(CONFIGXML)
	$(XSLTPROC) -o $@ $(DOCDIR)/tidy1.xsl $(HELPXML)

debug:
	@$(MAKE) CFLAGS='$(CFLAGS) $(DEBUGFLAGS)' LIBS='$(LIBS) $(DEBUGLIBS)' all

clean:
	rm -f $(OBJFILES) $(EXES) $(LIBRARY) $(DOCS) $(HELPXML) $(CONFIGXML) $(OBJDIR)/*.lo
	if [ -d $(OBJDIR)/.libs ]; then rmdir $(OBJDIR)/.libs; fi
	if [ -d $(LIBDIR)/.libs ]; then rmdir $(LIBDIR)/.libs; fi
	if [ "$(OBJDIR)" != "$(TOPDIR)" -a -d $(OBJDIR) ]; then rmdir $(OBJDIR); fi
	if [ "$(LIBDIR)" != "$(TOPDIR)" -a -d $(LIBDIR) ]; then rmdir $(LIBDIR); fi
	if [ "$(BINDIR)" != "$(TOPDIR)" -a -d $(BINDIR) ]; then rmdir $(BINDIR); fi

installhdrs: $(HFILES)
	if [ ! -d "$(incinst)" ]; then mkdir -p "$(incinst)"; fi
	cp -f $(HFILES) "$(incinst)/"

installib: $(LIBRARY)
	if [ ! -d "$(libinst)" ]; then mkdir -p "$(libinst)"; fi
	cp -f $(LIBRARY) "$(libinst)/"

installexes: $(EXES)
	if [ ! -d "$(bininst)" ]; then mkdir -p "$(bininst)"; fi
	cp -f $(EXES) "$(bininst)/"

installmanpage: $(DOCDIR)/tidy.1
	if [ ! -d "$(maninst)/man1" ]; then mkdir -p "$(maninst)/man1"; fi;
	cp -f $(DOCDIR)/tidy.1 "$(maninst)/man1/tidy.1";

install: installhdrs installib installexes installmanpage


<|start_filename|>Support/Externals/tidy/test/input/in_427823.html<|end_filename|>
<html> 
<head>
<title>[ #427823 ] Multiple &lt;BODY&gt;'s in &lt;NOFRAMES&gt; allowed</title>
</head> 
<frameset> 
<frame> 
<noframes> 
<body> 
Text in body 1. 
</body> 
<body> 
Text in illegal body 2. 
</body> 
Text in inferred illegal body 3. 
</noframes> 
</frameset> 
</html> 
Text in inferred illegal body 4.


<|start_filename|>Support/Externals/tidy/test/input/in_578216.html<|end_filename|>
<!-- use "-indent" on command line -->
<html>
<head>
<title>[ 578216 ] Incorrect indent of &lt;SPAN&gt; elements</title>
</head>
<body>
    <div 
class="indent">
    <span 
class="jobsectionhead">Benefits:</span> <span 
class="jobsectiontext">Using a new Project Profile Knowledge 
Base...</span><br>
    <span 
class="jobsectionhead">Solutions:</span> <span 
class="jobsectiontext">Comprehensive intranet-based 
knowledge base containing...</span><br>
    <span 
class="jobsectionhead">Roles:</span> <span 
class="jobsectiontext">Drove site and content management 
architecture...</span><br>
    <span 
class="jobsectionhead">Technology:</span> <span 
class="jobsectiontext">Visual InterDev, IIS, 
...</span><br>
    </div>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_427841.html<|end_filename|>
<HTML> 
<HEAD> 
<TITLE>Test input for bug #427841</TITLE> 
</HEAD> 
<BODY> 
<P>Tidy crashes on badly formed HTML 
involving nested lists. 

<UL> 
<LI> 
<UL> 
<LI><A HREF="rememberwhenb.html">Next</A> 
<LI><A HREF="daysofourlives.html">Back</A> 
<LI><A HREF="newstuff.html">New Stuff</A> 
</UL> 
</UL> 

<UL> 
<LI>Merge adjacent lists
</UL> 

<UL>

<UL> 
<LI><A HREF="one.html">One</A> 
<LI><A HREF="two.html">Two</A> 
<LI><A HREF="three.html">Three</A> 
</UL> 

</BODY> 
</HTML> 


<|start_filename|>Support/Externals/tidy/test/accessTest/5-1-2-1.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/5.1.2</title>
</head>
<body>

<table summary="This data table is missing row/column headers">
	<caption>This data table is missing row/column headers</caption>
	
	<tr>
		<td>age</td><td>height</td><td>weight</td>
	</tr>
	<tr>
		<td>10</td><td>1.3 m</td><td>50 kg.</td>
	</tr>
	<tr>
		<td>15</td><td>1.8 m</td><td>75 kg.</td>
	</tr>
	<tr>
		<td>20</td><td>2.1 m</td><td>100 kg.</td>
	</tr>
</table>

</body>
</html>


<|start_filename|>Support/Externals/tidy/experimental/TidyNodeIter.c<|end_filename|>
#include "platform.h"
#include "tidy-int.h"

#include "TidyNodeIter.h"

TidyNodeIter *newTidyNodeIter( Node *pStart )
{
    TidyNodeIter *pThis = NULL;
    if (NULL != (pThis = MemAlloc( sizeof( TidyNodeIter ))))
    {
        ClearMemory( pThis, sizeof( TidyNodeIter ));
        pThis->pTop = pStart;
    }
    return pThis;
}

Node *nextTidyNode( TidyNodeIter *pThis )
{
    if (NULL == pThis->pCurrent)
    {
        // just starting out, initialize
        pThis->pCurrent = pThis->pTop->content;
    }
    else if (NULL != pThis->pCurrent->content)
    {
        // the next element, if any, is my first-born child
        pThis->pCurrent = pThis->pCurrent->content;
    }
    else 
    {
        // no children, I guess my next younger brother inherits the throne.
        while (   NULL == pThis->pCurrent->next
               && pThis->pTop != pThis->pCurrent->parent )
        {
            //  no siblings, do any of my ancestors have younger sibs?
            pThis->pCurrent = pThis->pCurrent->parent;
        }
        pThis->pCurrent = pThis->pCurrent->next;
    }
    return pThis->pCurrent;
}

void setCurrentNode( TidyNodeIter *pThis, Node *newCurr )
{
    if (NULL != newCurr)
        pThis->pCurrent = newCurr;
}


<|start_filename|>Support/Externals/tidy/test/accessTest/3-6-1-2.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/3.6.1</title>
</head>
<body>
<ol>
   This is only for the indent.<br>
   And this as well.
   <ol>
       A further indent.
   </ol>
</ol>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_553468.xhtml<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<title>[ #553468 ] Doesn't warn about &lt;u&gt; in XHTML strict</title>
</head>
<body>
<p>Tidy doesn't complain about <u>underlining</u> in 
XHTML strict documents</p>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_1079820.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title></title>
</head>
<body>

<p>text <span lang="en">more text <span lang="la">latin
text</span> text
</span> text.</p>

<p>text <span lang="en">more text <span>latin
text</span> text
</span> text.</p>

<p>text <span lang="en"><span>latin
text</span> text
</span> text.</p>

<p>text <span>more text <span lang="la">latin
text</span> text
</span> text.</p>

<p><span class="helplink"><span>blah blah ... long
description</span>short text</span></p>


<p>text <u lang="en">more text <u lang="la">latin
text</u> text
</u> text.</p>

<p>text <u lang="en">more text <u>latin
text</u> text
</u> text.</p>

<p>text <u lang="en"><u>latin
text</u> text
</u> text.</p>

<p>text <u>more text <u lang="la">latin
text</u> text
</u> text.</p>

<u class="helplink"><u>blah blah ... long
description</u>short text</u>

</body>
</html>



<|start_filename|>Support/Externals/tidy/test/input/in_427671.html<|end_filename|>
<html> 
<head>
  <title>[#427671] &lt;LI&gt; w/FRAME/FRAMESET/OPTGROUP/OPTION loop</title>
</head> 
<body> 
<ul> 
<li>first item</li> 
<li><frame>frame item</frame></li> 
<li><frameset>frameset item</frameset></li> 
<li><optgroup>optgroup item</optgroup></li> 
<li><option>option item</option></li> 
<li>last item</li> 
</ul> 
</body> 
</html> 


<|start_filename|>Support/Externals/tidy/test/input/in_836462.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<TITLE>836462</TITLE>
</HEAD>
<BODY>
  <H3>Heading</H3>

  <UL>
  <LI><P>First list item</P></LI>
  <LI><P>Second list item</P></LI>
  <LI><P>Third list item</P></LI>
  <UL>
  <LI><P>First list item 2</P></LI>
  <LI><P>Second list item 2</P></LI>
  </UL>
  <LI><P>Fourth list item</P></LI>
  <LI><P>Fifth list item</P></LI>
  </UL>
</BODY>
</HTML>

<|start_filename|>Support/Externals/tidy/htmldoc/pending.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<title>HTML TIDY - Notes on pending work</title>
<meta name="keywords"
content="HTML, validation, error correction, pretty-printing" />
<meta name="author" content="<NAME> &lt;<EMAIL>&gt;" />
<style type="text/css">
  body { 
    margin-left: 10%; 
    margin-right: 10%; 
    font-family: sans-serif
  }
  h1 { margin-left: -8% }
  h2,h3,h4,h5,h6 { margin-left: -4% }
  pre { color: green; font-weight: bold;
   font-size: 80%; font-family: monospace}
  em { font-style: italic; font-weight: bold }
  strong { text-transform: uppercase; font-weight: bold }
  .note {font-style: italic; color: rgb(192, 101, 101) }
  //hr {text-align: center; width: 60% }
  blockquote {
    color: navy;
    margin-left: 1%;
    margin-right: 1%;
    text-align: center;
    font-family: "Comic Sans MS", "Times New Roman", serif
  }
  table {
    font-family: sans-serif;
    font-size: 80%;
    background: rgb(255,255,153)
  }
  td {
    font-size: 80%
  }
  .people {font-family: "Lucida Calligraphy", serif}
  :link { color: rgb(0, 0, 153) }
  :visited { color: rgb(153, 0, 153) }
  :active { color: rgb(255, 0, 102) }
  a :hover { color: rgb(0, 0, 255) }
</style>

<style type="text/css">
 p.c1 {font-style: italic}
</style>
</head>
<body bgcolor="#FFFFFF" background="grid.gif" text="black"
link="navy" vlink="black" alink="red">
<h1>HTML TIDY - Notes on Pending Work</h1>

<p><a href="http://www.w3.org/People/Raggett"><NAME></a> <a
href="mailto:<EMAIL>"><EMAIL></a></p>

<p>This is a page where I am keeping the suggestions for
improvements or bug fixes. My current work load means that I
don't get much time to work on HTML Tidy, so I am interested in
offers of help!</p>

<h4>Public Email List for Tidy: &lt;<a
href="mailto:<EMAIL>"><EMAIL></a>&gt;</h4>

<p>I have set up an archived mailing list devoted to Tidy. To
subscribe send an email to <EMAIL> with the word
subscribe in the subject line (include the word unsubscribe if
you want to unsubscribe). The <a
href="http://lists.w3.org/Archives/Public/html-tidy/">archive</a>
for this list is accessible online. Please use this list to
report errors or enhancement requests.</p>

<h2>Things awaiting further attention</h2>

<ul>
<li>Support for BIG5 and ShiftJIS (Rick Jelliffe)</li>

<li>Stronger checking on which attributes appear on what
elements</li>

<li>Sorting attributes in a canonical order</li>

<li>Version checking for HTML 4.01 vs 4.0 (Tidy currently will
set the document type to 4.01 in preference to 4.0)</li>

<li>Noticing that the document isn't really XHTML if it isn't
wellformed, i.e. it lacks end tags and quotes on attribute
values</li>

<li>Converting &lt;font face="Symbol"&gt;a&lt;/font&gt; etc. to
the corresponding Unicode characters, when cleaning HTML.</li>

<li>link checking - this would involve some platform dependent
code as the network interface varies significantly from one
platform to the next.</li>

<li>When exporting Word2000 to Web page, there is a need for
smarter rules of thumb for working out whether the paragraph is a
bulletted or numbered list item, and determining the level of
nesting. Perhaps the style attribute holds the key? This tends to
include substrings like: "mso-list:l0 level1 lfo2;" and
"mso-list:l1 level1 lfo1;". Unfortunately, these aren't always
present, and I have yet to figure out a foolproof heuristic.</li>
</ul>

<p>I need to set up an index of precisely what attributes are
supported on each element. Right now, some elements check their
own attributes, whilst others are checked via default checks
defined for each attribute independently of the element. Until
this is done, you sometimes find that validation services
discovering errors unnoticed by Tidy itself.</p>

<p><NAME> asks: <i>Could Tidy be made to automatically
"clean" (FONTs to CSS) if the Strict DOCTYPE is requested? An
HTML or XHTML Strict document can't have FONT tags according to
the DTDs</i>. Jelks has a bunch of other good ideas such as
converting the bgcolor attribute over to CSS.</p>

<p>Adding an option to select slide transition effects. I would
also like to provide an optional feature for sorting attribute
values.</p>

<p>I am having problems with form elements as direct children of
tr or table. It is dangerous to create an implicit table cell,
and what is needed is a way to move the form element into the
next cell. If this can't be done an error needs to be raised
since Tidy will be stuck. On a separate note, Tidy is still
breaking lines between &lt;img&gt; and &lt;/a&gt; which in
Netscape shows as an underlined space. It's fine in IE.</p>

<p><NAME> &lt;<EMAIL>&gt; writes: I'm
wrapping tidy (release-date 2000.01.13) in some perl objects
(using SWIG), and CharEncoding being a global is a bit of a pain.
I was wondering what your thoughts would be on how to fix that.
The character encoding is already a property of struct Out; is
there any reason why making it part of struct StreamIn as well,
and perhaps setting that property in OpenInput, based on the
existing CharEncoding variable, wouldn't allow us to move
CharEncoding to be local to main?</p>

<p>Oh, in case you're curious about the API, here's a short
script using my wrappers to be an html to xhtml filter:</p>

<pre>
      #!/usr/bin/perl

      require tidy;

      my $tidy     = Tidy-&gt;new(*STDIN);
      my $document = $tidy-&gt;parse;
      $tidy-&gt;as_xhtml(*STDOUT);
</pre>

<p><NAME> would like there to be a new wrap-attributes
option that can be used to suppress line wrapping within
attributes. There is already a similar option for JavaScript
literals.</p>

<p><NAME> would like tidy -h to display options sorted
alphabetically.</p>

<p><NAME> would like there to be an option to add the
xml:space="preserve" attribute to pre elements when outputting
xml.</p>

<p><NAME> would like to use Tidy to produce a list of
URLs for images or hypertext links according to a config option.
This would be straightforward, but is a lower priority than bug
fixes etc.</p>

<p><NAME> would like an option to wrap the contents of style
and script elements in CDATA marked sections when converting to
XHTML. He is also interested in direct support for 16 bit
character file I/O.</p>

<p><NAME> notes:</p>

<blockquote>If I configure Tidy to "upgrade to style sheets", it
does so for a few things in my main document, but the code thus
created get error reports if I feed it back to Tidy. It turns out
that Tidy creates extra "class" attributes on tags that already
have "class" attributes set. This happens with this page:
&lt;http://www.concinnity.se/bertilow/index.htm&gt;.</blockquote>

<p><NAME> notes:</p>

<blockquote>
<p>If a quoted URL attribute value (e.g., href in &lt;a&gt;
elements) contains a line break, 13-Jan-2000 Tidy changes the
line break to a space while IE and Netscape discard the line
break. This can result in a broken link in the tidied
document.</p>

<p>I believe the following change fixes the problem. In lexer.c,
insert the following lines before line 2502:</p>

<pre>
                            /* discard line breaks in quoted URLs */
                            if (c == '\n' &amp;&amp; IsUrl(name))
                                continue;

/* existing line 2502 */    c = ' ';
</pre>
</blockquote>

<p><NAME> would like Tidy to keep track of whether a
comment started on a new line and preserve this in the
output.</p>

<p>Terry Teague says:</p>

<blockquote>
<p>Sorry, I should have been more clear. Part of the problem is
the current HelpText() function in localize.c doesn't actually
reflect current reality.</p>

<p>You need to at least add the following line to HelpText()
:</p>

<pre>
    tidy_out(out, "  -version or -v  show version\n");
</pre>

<p>And I suppose it should mention the use of the new
"--&lt;config options&gt;" type syntax.</p>

<p>Regards, Terry</p>
</blockquote>

<p><NAME> notes:</p>

<pre>
 what i wonder is
1] does the specification indicate these are WRONG
2] if so why do they pass thru tidy ....
is url syntax such a can of worms that it is left to user
   to check .......

CASE 1: misuse of slash for folders
site had  background="pics\fancy.jpg"
  instead of   "pics/fancy.jpg"

CASE 2: spaces in filename
site had href="coin album.html"
instead of "coin%20album.html"
</pre>

<p><NAME> would like a way to prevent Tidy from
"cleaning" newly declared elements which don't have any content
but do have end tags, see his mail of 17th January 2000</p>

<p><NAME> would like to use Tidy with Microsoft's WebClass
tags. Unfortunately these include unusual characters in the tag
names such as @ which Tidy objects to, for instance:</p>

<pre>
&lt;WC@DOMAINNAME&gt;test.com&lt;/WC@DOMAINNAME&gt;
</pre>

<p>Perhaps it makes sense to offer an option to make Tidy less
picky about what characters it accepts in tag names. Or perhaps
"WebClass: yes".</p>

<p><NAME> suggests an option to control dropping of empty
elements, e.g. according to what attributes they have.</p>

<p><NAME> writes:</p>

<blockquote>
<p>Tidy always expands '&amp;' to '&amp;' even if I have
'quote-ampersand: no' defined in configuration file. This is not
a good thing to do for URLs that have '&amp;' characters in them.
OS is Debian GNU/Linux 2.1 SPARC. Same thing happens on Alpha.
Other architectures I have not tried.</p>

<p>My configuration looks like this:</p>

<pre>
char-encoding: latin1
error-file: ./errors
indent-spaces: 2
logical-emphasis: yes
output-xhtml: yes
quiet: no
quote-ampersand: no
show-warnings: yes
tidy-mark: yes
wrap: 78
wrap-attributes: no
write-back: yes
keep-time: yes
</pre>
</blockquote>

<p><NAME> reports that Tidy isn't recognizing HTML 3.2 when
the doctype is "-//W3C//DTD HTML 3.2 Final//EN" (as per the REC),
and similarly for HTML 4.01. This would appear to call for a
change to the table of names in lexer.c.</p>

<p><NAME> would like Tidy to detect and fix duplicate
attributes e.g. multiple class attributes. <NAME>
would like Tidy to replace spaces in URLs by %20 as some versions
of Netscape "croak big time" on this. <NAME> also wants
Tidy to remove duplicate attributes when the values are the same.
This apparently stops XSLT from working. <NAME> notes
that Tidy adds a 2nd class attribute rather than merging the
classes into a space separated list.</p>

<p><NAME> writes: Tidy seems not to recognize frame
elements with a closing "/". It actually removes them. Try his <a
href="http://www.concinnity.se/bertilow/pmeg/pmeg9/k_bazo.htm">example</a>.
Tidy can produce XHTML Frameset docs, but when fed them back</p>

<p>again it cries foul.</p>

<p><NAME> notes:</p>

<pre>
I've used `tidy' to convert a few HTML 4.0 files to XHTML 1.0 and noticed
a problem when dealing with constructs like

 &lt;small&gt;&lt;small&gt;some text&lt;/small&gt;&lt;/small&gt;

First, `tidy' acts as if the second "&lt;small&gt;" was meant as a closing tag:

 Warning: "&lt;small&gt; is probably intended as &lt;/small&gt;"

Then it trims the resulting empty &lt;small&gt;&lt;/small&gt;:

 Warning: trimming empty &lt;small&gt;

And finally both remaining closing tags ("&lt;/small&gt;"), now spurious,
are removed:

 Warning: discarding unexpected &lt;/small&gt;
 Warning: discarding unexpected &lt;/small&gt;

It would be convenient to have at least some `tidy' option to prevent this
from happening (or perhaps some different heuristics?).
</pre>

<p><NAME> would like to see Tidy warning about
duplicate attributes and fixing these when the values are
identical.</p>

<p>Jutta Wrage notes that: When parsing HTML 3.2 Pages, tidy
doesn't accept textareas in forms correctly. The HTML Reference
specification (HTML 3.2 Final) allows: name, rows and cols, but
upon seeing these Tidy thinks the document is 4.0.</p>

<p><NAME> notes that a heading start tag is coerced to
an end heading tag when the end tag is missing. This is
deliberate, but perhaps not the best heuristic.</p>

<p>HIYAMA Masayuki notes that Tidy should set the encoding
attribute to match the language encoding, e.g. ?xml version="1.0"
encoding="iso-2022-jp"?&gt;&lt;.</p>

<p><NAME> has extended Tidy to support selectively
stripping out listed tags and attributes, see his email of March
14th.</p>

<p>Yong Taek Bae notes that with the omit end tags option Tidy
omits the body tag even if it has attributes. This is an
error.</p>

<p>Tapio Markula reports that Tidy is incorrectly replacing
accented characters in script elements by entities. The script
element (in HTML but not XHTML) is CDATA and as such entities
won't be expanded. This bug needs to be fixed along with the
support for CDATA sections.</p>

<p><NAME> reports tidy crashing when producing slides,
and when the -i option has been set. He later added the crash
occurs when the page doesn't include an h1 element. See
Terrill-Bennett-11mar00.txt.</p>

<p><NAME> notes that if an &lt;hr&gt; element is present
in the head before the title element, then Tidy gets confused and
adds in a spurious extra empty title element. This would be
avoided if Tidy could move the hr into the body before the body
element is encountered. This raises a number of problems for
instance working out when to copy in attributes from an explicit
body element.</p>

<p><NAME> would like Tidy to avoid breaking lines before or
after the = sign in attribute values when this is practical.
Perhaps a simple rule of thumb could be used to decide this?</p>

<p><NAME> notes that Tidy crashes on CDATA marked sections
when parsing XML.</p>

<p><NAME> would like an option to set the DTD URI for XML
or XHTML.</p>

<p><NAME> notes: If I have php code the indentation behaves
strange. Repeated tidying php content and end tag indented one
level extra for each time. The result ends up something like
this:</p>

<pre>
...
    &lt;?php
                        $r=0;
                        ?&lt;
...

I have the fillowing config file for Tidy:
---
tidy-mark: no
markup: yes
wrap: 0
indent: auto
output-xml: no
output-xhtml: yes
doctype: loose
char-encoding: latin1
quote-marks: yes
assume-xml-procins: yes
word-2000: yes
clean: yes
logical-emphasis: yes
drop-empty-paras: yes
enclose-text: yes
fix-bad-comments: yes
alt-text: .
write-back: bool
keep-time: yes
show-warnings: no
quiet: yes
split: no
---

Best Regards,
<NAME>

</pre>

<p><NAME> notes that if you make a mistake and leave off the
ending "/" in the &lt;title&gt; tag, tidy will generate an extra
set of &lt;title&gt;s.</p>

<p>Example:</p>

<pre>
&lt;html&gt;
&lt;head&gt;&lt;title&gt;No end here&lt;title&gt;&lt;/head&gt;
&lt;body&gt;
Empty
&lt;/body&gt;
&lt;/html&gt;

</pre>

<p>produces this:</p>

<pre>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;No end here&lt;/title&gt;
&lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
Empty
&lt;/body&gt;
&lt;/html&gt;

</pre>

<p><NAME> would like the HTML Tidy page to include
internal anchors so that he can link directly to the appropriate
sections.</p>

<p><NAME> would like to be able to clean presentation
attributes on the body element, as well as translating b and i to
span.</p>

<p><NAME> and <NAME> would like there to be a way to
suppress the default handling of inline elements in favor of
simply inserting the appropriate end tag when encountering an
element that isn't allowed in an inline context. The default
behavior replicates the rendering on existing browsers but can
cause problems for hand editors.</p>

<p><NAME> notes that tidy isn't updating the column position
when parsing attributes.</p>

<p>Can Tidy track when a line break occurs after a PI or comment
and reproduce this in the output? This idea occurred to me after
reading a comment from <NAME>.</p>

<p>One interesting suggestion is to make some of Tidy's rules of
thumb sensitive to the program that generated the markup as
indicated by the meta element. This would allow for greater
robustness in how the rules operate.</p>

<p><NAME> would like the quiet mode to be tweaked to suppress
the general info at the end of the report. see
Dave-Bryan-24mar00.txt.</p>

<p><NAME> would like an option to suppress line wrap within
tags, so that the tag is always on the same line regardless of
the number and length of the attributes.</p>

<p><NAME> suggest that the clean mechanism check to see if
there are any existing matching style rules before adding new
ones.</p>

<p><NAME> suggests mapping the Netscape layer tag into
the equivalent CSS positioning syntax.</p>

<p><NAME> says Tidy doesn't correctly report errors such as
<tt>&lt;/&lt;/head&gt;</tt>.</p>

<p>Tidy's slide feature: see Johannes-Poutre-12jul00.txt</p>

<p><NAME> suggests Tidy should recover from multiple class
attributes on the same element.</p>

<h2>Other ideas</h2>

<ul>
<li>Recursion through subdirectories, so you can fix up your
entire web site at one go. This assumes I can find a way that is
portable across a wide range of platforms!</li>

<li>Support for W3C's <a
href="http://www.w3.org/TR/REC-DOM-Level-1/">Document Object
Model</a> (DOM) level one.</li>

<li>Full validation of all attribute values.</li>

<li>Mapping Unicode bidi control characters to HTML tags.</li>

<li>Full support for parsing XML (still somewhat limited).</li>

<li>How to say which XML elements should be printed
"inline".</li>

<li>Acting on the XML encoding attribute, e.g.
&lt;?xml&#160;encoding="iso-8859-1"&gt;</li>

<li>Improved mapping from HTML presentation attributes/elements
to CSS.</li>

<li>Improved support for <a
href="http://java.sun.com/products/jsp/">JSP</a> (Java Server
pages)</li>

<li>Ugly print option which removes all optional whitespace</li>
</ul>
</body>
</html>



<|start_filename|>Support/Externals/tidy/test/input/in_427821.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>[ #427821 ] XHTML TRANSITIONAL doctype set wrongly</title>
</head>
<frameset>
<noframes>
<body>
This is a test - use "-asxml" on the command line.
</body>
</noframes>
</frameset>
</html>


<|start_filename|>Support/Externals/tidy/test/accessTest/5-2-1-2.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/5.2.1</title>
</head>
<body>

<table summary="This data table should use markup to associate multiple levels of row and column headers">
	<caption>This data table should use markup to associate multiple levels of row and column headers</caption>

	<tr>
		<th>System</th><td>a-1</td><td>Susan</td><td>Macintosh</td>
	</tr>
	<tr>
		<th rowspan="2">ID<br>location or code</th><td>Local</td><td>Building 1</td><td>Front Desk</td>
	</tr>
	<tr>
		<td>Local</td><td>Building 2</td><td>Back Desk</td>
	</tr>
	<tr>
		<th>Required</th><td>yes</td><td>yes<td></td><td>no</td>
	</tr>
</table>

</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_449348.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>[ #449348 ] Whitespace added/removed to inline tags</title>
</head>
<body>
<p>Make this wrap at the end of the line12345678: white-<em>space</em><a href="joebob.html"><img alt="joebob" src=
"joebob.gif" /></a></p>

<p>This is long enough a wrap at the next line <em>text</em>
...</p>
</body>
</html>



<|start_filename|>Support/Externals/tidy/test/accessTest/13-10-1-1.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/13.10.1</title>
</head>
<body>
<pre>
  %   __ __ __ __ __ __ __ __ __ __ __ __ __ __
100 |             *                             |
 90 |                *  *                       |
 80 |          *           *                    |
 70 |             @           *                 |
 60 |          @                 *              |
 50 |       *        @              *           |
 40 |                   @              *        |
 30 |    *  @              @  @           *     |
 20 |                                           |
 10 |    @                       @  @  @  @     |
      0  5 10 15 20 25 30 35 40 45 50 55 60 65 70
      Flash frequency (Hertz)
</pre>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_836462-2.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<TITLE>836462-2</TITLE>
</HEAD>
<BODY>
  <H3>Heading</H3>

  <OL>
  <LI><P>First ordered list item</P></LI>
  <LI><P>Second ordered list item</P></LI>
  <LI><P>Third ordered list item</P></LI>
  <UL>
  <LI><P>First unordered list item</P></LI>
  <LI><P>Second unordered list item</P></LI>
  </UL>
  <LI><P>Fourth unordered list item</P></LI>
  <LI><P>Fifth unordered list item</P></LI>
  </OL>
</BODY>
</HTML>

<|start_filename|>Support/Externals/tidy/test/input/in_603128.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>[ 603128 ] tidy adds newlines after &lt;/html&gt;</title>
</head>
<body>
There is exactly one line-ending after the &lt;/html&gt; -
older versions of Tidy will add an additional line-ending.
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_765852.html<|end_filename|>
<html>
<title>#765852 Empty tag striping</title>
<p>Text following <i>italics<B> </B></I>without a blank after the i end tag is not cleaned up correctly (the bold blank is eliminated).</p>

<|start_filename|>Support/Externals/tidy/test/input/in_427677.html<|end_filename|>
<html> 
<head>
  <title>[ #427677 ] TrimInitialSpace() can trim too much</title>
</head> 
<body>
<p>This is a <span style="color:#FF0000">        Red</span> 
          <a href="foo">
                link            </a></p>
</body> 
</html> 


<|start_filename|>Support/Externals/tidy/test/input/in_540571.html<|end_filename|>
<html>
<head>
<title>#540571 Inconsistent behaviour with span inline element</title>
</head>
<body>
<font color="red"><h1>Hello World</h1></font>
<p>
The font inline is moved so it becomes a child of the h1 element.
</p>
<span color="red"><h1>Hello World</h1></span>
<p>
The span inline is not moved so it becomes a child of the h1 element, which is inconsistent and does not correspond with current browser behaviour any more.
</p>
</body>
</html>

<|start_filename|>Support/Externals/tidy/test/accessTest/5-3-1-1.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/5.3.1</title>
</head>
<body>
<table summary="This layout table should make sense when linearized">
	<caption>Does this layout table make sense when linearized?</caption>

	<tr>
		<td>Here is some text that is in a column.</td><td>Here is some more text that is also in a column.</td>
	</tr>
</table>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_434940.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>[ #434940 ] --show-body-only: print only body contents</title>
</head>
<body> 
Use "--show-body-only yes" on the command line
</body> 
</html>

<|start_filename|>Support/Externals/tidy/htmldoc/faq.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 1st June 2003), see www.w3.org" />
<link type="text/css" rel="stylesheet" href="tidy.css" />
<title>HTML Tidy - Frequently Asked Questions</title>
<style type="text/css">
code { font-weight: bold; }
</style>
</head>
<body>
<h1>HTML Tidy - Frequently Asked Questions</h1>

<h2>Overview</h2>

<p class="abstract">Certain questions about Tidy come up on a
regular basis. These are some that have been culled from postings
to the <EMAIL> and <EMAIL>
mailing lists. If you don't see your question addressed here, see
<a href="#support">How To Get Support</a> below.</p>

<ul>
<li><a href="#what-now">What Now?</a></li>

<li><a href="#support">How to Get Support?</a></li>

<li><a href="#bug">How to Submit A Bug Report</a></li>

<li><a href="#feature">How to Submit A Feature Request</a></li>

<li><a href="#layout">How Do I Control the Output Layout?</a></li>

<li><a href="#version">What Version of Tidy Should I Use?</a></li>

<li><a href="#regression">How Do I Run A Regression Test?</a></li>
</ul>

<hr />
<dl>
<dt><a name="what-now" id="what-now"></a>What Now?</dt>

<dd><p>If you have a popup screen that reads as follows:
<pre>
HTML Tidy for Windows &lt;vers 1st August 2002; built on Aug 8 2002, at 15:41:13&gt;
Parsing Console input &lt;stdin&gt;
</pre>

<p>and do not know what to do next, read on.</p>

<p>Tidy is waiting for your HTML to come in, so it can parse it.
 Tidy is fundamentally a tool that reads in HTML cleans it up and
writes it out again. It was developed as a program you run from the
console prompt, but there are GUI encapsulations available, e.g.
HTML-Kit, which you might prefer.</p>

<p>If you are using Windows, the first step is to unzip the zip file
and place the tidy.exe file in a folder somewhere on your executables
path. You may also want to set up a config file to save having to type
lots of options each time you run Tidy. From the console prompt you can
run Tidy like this:</p>

<pre>
C> tidy -m mywebpage.html
</pre>

<p>In this case, the <code>-m</code> option requests Tidy to write
the tidied file back to the same filename as it read from
(mywebpage.html). Tidy will give you a breakdown of the problems it
found and the version of HTML the file appears to be using.</p>

<p>To get a listing of Tidy command line options, just type 
<code>tidy -?</code>.  To see a listing on configuration options,
try <code>tidy -help-config</code>.  To get more info on the
config options, see the <a 
href="http://tidy.sourceforge.net/docs/quickref.html">Quick Reference</a>.</p>

<p>See also <NAME>'s <a href="http://tidy.sourceforge.net/docs/Overview.html#help">User Guide</a>.</p>

<p>If you're not comfortable with the DOS command line, you should
try one of the <a href="http://tidy.sourceforge.net/#tidylibapps">GUI
Applications</a>.</p>
</dd>

<dt><a name="support" id="support"></a>How To Get Support</dt>

<dd>
<p>For general HTML Tidy support, the original mailing list
<EMAIL> is best. Sometimes developers are the last to
know... Also, this list covers both Java and C versions, not to
mention various value-added products such as GUI front ends, Perl
and Python integration, etc. If you don't get a response after a
couple tries or if you have a bug fix, bump it over to the
developer list at <EMAIL>. It's not a
hard line, but that is the general arrangement.</p>
</dd>

<dt><a name="bug" id="bug"></a>How to Submit A Bug Report</dt>

<dd>
<p>You are encouraged to report bugs you found to the Tidy
developer team. Tidy's quality depends on your feedback. You can
either file your bug report in the Sourceforge <a
href="http://sourceforge.net/tracker/?func=add&amp;group_id=27659&amp;atid=390963">
bug tracker</a> for HTML Tidy (<em>recommended</em>) or send a mail
to the mailing list at <EMAIL>. Note you do <em>not</em>
have to have a Sourceforge account in order to file bug reports, or
be subscribed to <EMAIL> in order to post messages to the
list.</p>

<p>Prior to submitting a bug report, please check that the bug is
not already known. Many are. If you are not sure, just ask. If it
is new bug, make sure to include at least the following information
in your report:</p>

<ul>
<li>A desciption of what you think went wrong.</li>

<li>The HTML Tidy version (find it out by running <code>tidy
-v</code>) and operating system you are running.</li>

<li>The input, that exposes the bug.<br />
 A small HTML document that reproduces the problem is best.</li>

<li>The configuration options you've used. Command line options
like<br />
 <code>-asxml</code>, configuration files, etc. You may use
<code>tidy -show-config</code> to get an overview of the active
Tidy settings.</li>

<li>Your e-mail address for further questions and comments.</li>
</ul>

<p>These information are necessary to reproduce whatever is
failing, without them we cannot help you. Additional information -
and patches - are very welcome!</p>

<p><em>Please include only one bug per report.</em> Reports with
multiple bugs are less easy to track and some bugs may get
missed.</p>
</dd>

<dt><a name="feature" id="feature"></a>How to Submit A Feature
Request</dt>

<dd>
<p>If you want Tidy to do something new that it doesn't do today
(or stop doing something), then it is probably a feature
request.</p>

<p>The process for submitting a feature request is very similar to
bug requests. A different <a
href="http://sourceforge.net/tracker/?atid=390966&amp;group_id=27659">
tracker</a> is used on SourceForge to denote the difference in
subject matter.</p>

<p>As with bugs, please be sure that the feature has not already
been requested. If the feature has already requested, you can add
your comments to the feature request tracker, or send mail to the
<a href="mailto:<EMAIL>">mailing list</a> indicating your
wish to also have the feature implemented. If the feature has not
already been requested, send the same information as for a bug
report, but place special emphasis on the desired output for a
given input, desired options, etc. - please be as specific as
possible about what you want Tidy to <em>do</em>.</p>
</dd>

<dt><a name="layout" id="layout"></a>How Do I Control the Output Layout?</dt>

<dd>
<p>There are three primary options that control how Tidy 
formats your markup:</p>
<ul>
  <li><a class="code"
         href="quickref.html#indent">indent</a></li>
  <li><a class="code"
         href="quickref.html#indent-attributes">indent-attributes</a></li>
  <li><a class="code"
         href="quickref.html#vertical-space">vertical-space</a></li>
</ul>

<p>Briefly, <code>indent</code> sets the level of left-to-right indenting 
and, somewhat, how often elements are put onto a new line.  The options 
are <code>yes</code>, <code>no</code>, and <code>auto</code>.  
<code>indent-attributes</code> is a flag that, when set, tells Tidy to 
put each attribute on a new line.  <code>vertical-space</code> is a flag
that, when set, tells Tidy to add some empty lines for readability.  The 
default for all three is <code>no</code>.  These options may be used in
any combination to control you you want your markup to look.  The best
thing is to experiment a bit to see what you like.  Be aware that 
<code>indent yes</code> is deprecated for production use as it will 
cause visual changes in most browsers.</p>

<p>To get Tidy <em>Classic</em> <code>--indent auto</code> layout, use the following options:</p>

<pre>
indent: auto
indent-attributes: no
vertical-space: yes
</pre>

<p>You can read about more <em>Pretty Print</em> options
<a href="quickref.html#PrettyPrintHeader">here</a>.</p>
</dd>

<dt><a name="version" id="version"></a>What Version of Tidy Should
I Use?</dt>

<dd>
<p>The current Source Forge builds are recommended.  You can find these at 
<a href="http://tidy.sourceforge.net">http://tidy.sourceforge.net</a>.
People continue to report examples where Tidy does not catch some 
ill-formed HTML or, worse, generates ill-formed HTML. These cases have 
been significantly reduced. That said, be sure to test Tidy with some 
representative files from your environment.</p>

<p>For development work, use CVS directly on your development
system. For information on how to pull Tidy sources from <a
href="http://sourceforge.net/cvs/?group_id=27659">CVS</a>. This way
you can keep abreast of changes to Tidy and quickly resolve
conflicts.</p>

<p>For building a front end (e.g. GUI or language binding), the
simplest approach is to use TidyLib.  For more information
about building and coding with TidyLib, see the <a 
href="http://tidy.sourceforge.net/libintro.html">Introduction To TidyLib</a>.</p>
</dd>

<dt><a name="regression" id="regression">How Do I Run A 
Regression Test?</a></dt>
<dd>
<p>You might ask, "Why should I run a regression test?".  If you
are a Tidy user, you might want to compare a new version of Tidy
to the version you are currently running.  This is a good idea
if you are using Tidy in production applications such as web
publishing.  If you are a Tidy developer, it is a good idea to
run the regression test suite to make sure your fix or enhancement
doesn't add new bugs.</p>

<p>Detecting new bugs is easier said than done, because sometimes
they are subtle and can only be seen in browsers (or one particular
browser you don't even have).  But you can catch most crashes and
many layout problems by running the test suite as described here.</p>

<p>The basic process is simple: run the test suite <strong>before</strong>
and <strong>after</strong> making changes to TidyLib and compare the output
markup and messages.  Be aware that the test scripts for WinNT/2K/XP
(alltest.cmd) and Linux/Unix (testall.sh) place the output files in
<code>tidy/test/tmp</code>.  If you forget to run the <strong>before</strong>
test, you can always download a binary from the <a 
href="http://tidy.sourceforge.net/#binaries">Project Page</a>.  If you
are not a TidyLib developer, you can download the <a 
href="http://tidy.sourceforge.net/test/tidy_test.tgz">Test Suite</a> 
directly.  Here are the steps to evaluate the impact of a TidyLib change.</p>

<h3>For Windows</h3>
<p><strong>Before</strong> making changes:</p>
<pre>
C:\tidy\test> alltest.cmd
C:\tidy\test> ren tmp baseline
</pre>

<p><strong>After</strong> making changes and building Tidy:</p>
<pre>
C:\tidy\test> alltest.cmd
C:\tidy\test> windiff tmp baseline
</pre>

<h3>For Linux/Unix</h3>
<p><strong>Before</strong> making changes:</p>
<pre>
~/tidy/test$ ./testall.sh
~/tidy/test$ mv tmp baseline
</pre>

<p><strong>After</strong> making changes and building Tidy:</p>
<pre>
~/tidy/test$ ./testall.sh
~/tidy/test$ diff -u tmp baseline > diff.txt
</pre>
</dd>

<!--
        <dt><a name="" id=""></a></dt>
        <dd>
        </dd>

        <dt><a name="" id=""></a></dt>
        <dd>
        </dd>
        -->
<!-- Save for future questions
        <dt><a name="" id=""></a></dt>
        <dd>
        </dd>
        -->
</dl>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_427633.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html> 
<head>
  <title>[#427663] Line endings not supported correctly</title>
</head> 
<body>
<p>This is a carriage return
This is a Unix line-ending
This is a DOS line ending

</body> 
</html> 


<|start_filename|>Support/Externals/tidy/test/input/in_427819.html<|end_filename|>
<html> 
<head> 
<title>[ #427819 ] OPTION w/illegal FONT eats whitespace</title> 
</head> 
<body> 
<form method="get"> 
<select name="select"> 
<option value="1"> Tidy <font size="7"> gets </font> 
this right </option> 
<!-- The following gets tidied into "Tidy getsthis 
wrong" --> 
<option value="2"> Tidy <font size="7"> gets</font> 
this wrong </option> 
</select> 
</form> 
</body> 
</html>

<|start_filename|>Support/Externals/tidy/test/input/in_566542.html<|end_filename|>
<title>[ 566542 ] parser hangs</title>
<!-- This is a particularly horrid bit of markup.  Tidy should
     probably throw up its hands and emit an error. -->
<li><p>Identify the member disks with <b>ssaraid -H -lssa0 -n pdisk
     <i>[n]</i> -u -a use=member
     <p>
<li><p><b>Identify the hot spare with <b>ssaraid -H -lssa0 -n pdisk
     <i>[n]</i>-u -a use=spare</b><p>


<|start_filename|>Support/Externals/tidy/console/tab2space.c<|end_filename|>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "platform.h"

#define true       1
#define false      0
#define TABSIZE    4

#define DOS_CRLF   0
#define UNIX_LF    1
#define MAC_CR     2

typedef struct
{
    Bool pushed;
    int tabs;
    int curcol;
    int lastcol;
    int maxcol;
    int curline;
    int pushed_char;
    uint size;
    uint length;
    char *buf;
    FILE *fp;
} Stream;

static int tabsize = TABSIZE;
static int endline = DOS_CRLF;
static Bool tabs = false;

/*
 Memory allocation functions vary from one environment to
 the next, and experience shows that wrapping the local
 mechanisms up provides for greater flexibility and allows
 out of memory conditions to be detected in one place.
*/
void *MemAlloc(size_t size)
{
    void *p;

    p = malloc(size);

    if (!p)
    {
        fprintf(stderr, "***** Out of memory! *****\n");
        exit(1);
    }

    return p;
}

void *MemRealloc(void *old, size_t size)
{
    void *p;

    p = realloc(old, size);

    if (!p)
    {
        fprintf(stderr, "***** Out of memory! *****\n");
        return NULL;
    }

    return p;
}

void MemFree(void *p)
{
    free(p);
    p = NULL;
}

static Stream *NewStream(FILE *fp)
{
    Stream *in;

    in = (Stream *)MemAlloc(sizeof(Stream));

    memset(in, 0, sizeof(Stream));
    in->fp = fp;
    return in;
}

static void FreeStream(Stream *in)
{
    if (in->buf)
        MemFree(in->buf);

    MemFree(in);
}

static void AddByte(Stream *in, uint c)
{
    if (in->size + 1 >= in->length)
    {
        while (in->size + 1 >= in->length)
        {
            if (in->length == 0)
                in->length = 8192;
            else
                in->length = in->length * 2;
        }

        in->buf = (char *)MemRealloc(in->buf, in->length*sizeof(char));
    }

    in->buf[in->size++] = (char)c;
    in->buf[in->size] = '\0';  /* debug */
}



/*
  Read a character from a stream, keeping track
  of lines, columns etc. This is used for parsing
  markup and plain text etc. A single level
  pushback is allowed with UngetChar(c, in).
  Returns EndOfStream if there's nothing more to read.
*/
static int ReadChar(Stream *in)
{
    int c;

    if (in->pushed)
    {
        in->pushed = false;

        if (in->pushed_char == '\n')
            in->curline--;

        return in->pushed_char;
    }

    in->lastcol = in->curcol;

    /* expanding tab ? */
    if (in->tabs > 0)
    {
        in->curcol++;
        in->tabs--;
        return ' ';
    }
    
    /* Else go on with normal buffer: */
    for (;;)
    {
        c = getc(in->fp);

        /* end of file? */
        if (c == EOF)
            break;

        /* coerce \r\n  and isolated \r as equivalent to \n : */
        if (c == '\r')
        {
            c = getc(in->fp);

            if (c != '\n')
                ungetc(c, in->fp);

            c = '\n';
        }

        if (c == '\n')
        {
            if (in->maxcol < in->curcol)
                in->maxcol = in->curcol;

            in->curcol = 1;
            in->curline++;
            break;
        }

        if (c == '\t')
        {
            if (tabs)
              in->curcol += tabsize - ((in->curcol - 1) % tabsize);
            else /* expand to spaces */
            {
                in->tabs = tabsize - ((in->curcol - 1) % tabsize) - 1;
                in->curcol++;
                c = ' ';
            }

            break;
        }

        if (c == '\033')
            break;

        /* strip control characters including '\r' */

        if (0 < c && c < 32)
            continue;

        in->curcol++;
        break;
    }

    return c;
}

static Stream *ReadFile(FILE *fin)
{
    int c;
    Stream *in  = NewStream(fin);

    while ((c = ReadChar(in)) >= 0)
        AddByte(in, (uint)c);

    return in;
}

static void WriteFile(Stream *in, FILE *fout)
{
    int i, c;
    char *p;

    i = in->size;
    p = in->buf;

    while (i--)
    {
        c = *p++;

        if (c == '\n')
        {
            if (endline == DOS_CRLF)
            {
                putc('\r', fout);
                putc('\n', fout);
            }
            else if (endline == UNIX_LF)
                putc('\n', fout);
            else if (endline == MAC_CR)
                putc('\r', fout);

            continue;
        }

        putc(c, fout);
    }
}

static void HelpText(FILE *errout, char *prog)
{
    fprintf(errout, "%s: [options] [infile [outfile]] ...\n", prog);
    fprintf(errout, "Utility to expand tabs and ensure consistent line endings\n");
    fprintf(errout, "options for tab2space vers: 6th February 2003\n");
    fprintf(errout, "  -help or -h     display this help message\n");
    fprintf(errout, "  -dos  or -crlf  set line ends to CRLF (PC-DOS/Windows - default)\n");
    fprintf(errout, "  -mac  or -cr    set line ends to CR (classic Mac OS)\n");
    fprintf(errout, "  -unix or -lf    set line ends to LF (Unix)\n");
    fprintf(errout, "  -tabs           preserve tabs, e.g. for Makefile\n");
    fprintf(errout, "  -t<n>           set tabs to <n> (default is 4) spaces\n");
    fprintf(errout, "\nNote this utility doesn't map spaces to tabs!\n");
}

int main(int argc, char **argv)
{
    char const *infile, *outfile;
    char *prog;
    FILE *fin, *fout;
    Stream *in = NULL;

    prog = argv[0];

    while (argc > 0)
    {
        if (argc > 1 && argv[1][0] == '-')
        {
            if (strcmp(argv[1], "-help") == 0 || argv[1][1] == 'h')
            {
                HelpText(stdout, prog);
                return 1;
            }

            if (strcmp(argv[1], "-dos") == 0 ||
                strcmp(argv[1], "-crlf") == 0)
                 endline = DOS_CRLF;

            else if (strcmp(argv[1], "-mac") == 0 ||
                strcmp(argv[1], "-cr") == 0)
                endline = MAC_CR;

            else if (strcmp(argv[1], "-unix") == 0 ||
                strcmp(argv[1], "-lf") == 0)
                endline = UNIX_LF;

            else if (strcmp(argv[1], "-tabs") == 0)
                tabs = true;

            else if (strncmp(argv[1], "-t", 2) == 0)
                sscanf(argv[1]+2, "%d", &tabsize);

            --argc;
            ++argv;
            continue;
        }

        if (argc > 1)
        {
            infile = argv[1];
            fin = fopen(infile, "rb");
        }
        else
        {
            infile = "stdin";
            fin = stdin;
        }

        if (argc > 2)
        {
            outfile = argv[2];
            fout = NULL;
            --argc;
            ++argv;
        }
        else
        {
            outfile = "stdout";
            fout = stdout;
        }

        if (fin)
        {
            in = ReadFile(fin);

            if (fin != stdin)
                fclose(fin);
            
            if (fout != stdout)
               fout = fopen(outfile, "wb");
            
            if (fout)
            {
               WriteFile(in, fout);
                
               if (fout != stdout)
                  fclose(fout);
            }
            else
                fprintf(stderr, "%s - can't open \"%s\" for writing\n", prog, outfile);

            FreeStream(in);
        }
        else
            fprintf(stderr, "%s - can't open \"%s\" for reading\n", prog, infile);

        --argc;
        ++argv;
        
        if (argc <= 1)
            break;
    }

    return 0;
}



<|start_filename|>Support/Externals/tidy/test/input/in_1426419.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>[1426419] mal-formed inline elements</title>
</head>
<body>
<p><b>Bold <i>Bold and Italics</b> Italics Only</i></p>
<p><tt>Mono <b>Mono and Bold</tt> Bold Only</b></p>
<p><i>Italics <b>Italics and Bold</i> Bold Only</b></p>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_978947.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content=
"text/html; charset=us-ascii">
<meta name="AUTHOR" content="<NAME>uml;m">
<title>Bug: &amp;nbsp; disappears after &lt;/pre&gt;</title>
</head>
<body lang="en-US">
Here the non-breaking spaces (&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)
remain.
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Works multiple times
(&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) as well.<br>
But&nbsp;.&nbsp;.&nbsp;.&nbsp;&nbsp;:</p>
<pre>
A&nbsp;block&nbsp;of&nbsp;
preformatted&nbsp;text.
</pre>
Now the non-breaking spaces (&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)
are replaced with ordinary spaces, and disappear.
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_433672.html<|end_filename|>
<html> 
<head> 
<title>[ #433672 ] Anchor enclosing Header tags is omitted</title> 
</head> 
<body> 
<A NAME="xyz"><H2>Section heading</H2></A> 
<H2><A NAME="abc">Another heading</A></H2> 

<a href='#xyz'><center><img alt='ack!' src='joebob.gif'></center></a>
<p><a href='#abc'>Goto Another Heading</a>
</body> 
</html> 


<|start_filename|>Support/Externals/tidy/htmldoc/Overview.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<title>Clean up your Web pages with HTML TIDY</title>
<meta name="keywords"
content="HTML, validation, error correction, pretty-printing" />
<meta name="author" content="<NAME> &lt;<EMAIL>&gt;" />
<style type="text/css">
  body { 
    margin-left: 10%; 
    margin-right: 10%; 
    font-family: sans-serif
  }
  h1 { margin-left: -8% }
  h2,h3 { margin-left: -4% }
  pre { color: green; font-weight: bold; font-family: monospace}
  em { font-style: italic; color: rgb(0, 0, 153) }
  strong { text-transform: uppercase; font-weight: bold }
  .note {font-style: italic; color: rgb(192, 101, 101) }
  //hr {text-align: center; width: 60% }
  blockquote {
    color: navy;
    font-family: "Comic Sans MS", "Times New Roman", serif
  }
  blockquote.people { text-align: center; }
  p.splash { color: maroon}
  div h4 {margin-left 3%}
  div p {margin-left: 5%}
  table {
    font-family: sans-serif;
    font-size: 80%;
    background: rgb(255,255,153)
  }
  td {
    font-size: 80%
  }
  .people {font-family: "Lucida Calligraphy", serif}
  :link { color: rgb(0, 0, 153) }
  :visited { color: rgb(153, 0, 153) }
  :active { color: rgb(255, 0, 102) }
  a :hover { color: rgb(0, 0, 255) }
</style>

<style type="text/css">
 blockquote.c9 {font-style: italic}
 span.c8 {color: maroon}
 p.c7 {font-style: italic}
 a.c6 {font-weight: bold}
 div.c5 {text-align: center}
 hr.c4 {text-align: center}
 p.c3 {text-align: center}
 p.c2 {font-weight: bold; text-align: center}
 h1.c1 {text-align: center}
</style>

<style type="text/css">
 p.c1 {font-weight: bold}
</style>
</head>
<body bgcolor="#FFFFFF" background="grid.gif" text="black"
link="navy" vlink="black" alink="red">
<h1 class="c1"><img src="tidy.gif" width="32" height="32"
align="top" alt="icon" /> Clean up your Web pages<br />
 with HTML TIDY</h1>

<p class="c2">This version 4th August 2000</p>

<p class="c3"><small>Copyright &#169; 1998-2000 <a
href="http://www.w3.org/">W3C</a>, see <a
href="tidy.c">tidy.c</a> for copyright notice.</small></p>

<blockquote>With many thanks to <a
href="http://www.hp.com/">Hewlett Packard</a> for financial
support during the development of this software!</blockquote>

<hr width="80%" class="c4" />
<p class="c3"><a href="#help">How to use Tidy</a> | <a
href="#download">Downloading Tidy</a> | <a
href="release-notes.html">Release Notes</a><br />
 <a href="#quotes">Integration with other Software</a> | <a
href="#acks">Acknowledgements</a></p>

<hr width="80%" class="c4" />
<p>To get the latest version of Tidy please visit the original
version of this page at: <a
href="http://www.w3.org/People/Raggett/tidy/">http://www.w3.org/People/Raggett/tidy/</a>.
Courtesy of Netmind, you can register for email reminders when
new versions of tidy become available.</p>

<form method="get"
action="http://www.netmind.com/cgi-bin/uncgi/url-mind">
<div class="c5"><input type="submit"
value="Press Here to Register" /></div>
</form>

<p>The public email list devoted to HTML Tidy is: &lt;<a
href="mailto:<EMAIL>"><EMAIL></a>&gt;. To
subscribe send an email to <EMAIL> with the word
subscribe in the subject line (include the word unsubscribe if
you want to unsubscribe). The <a
href="http://lists.w3.org/Archives/Public/html-tidy/">archive</a>
for this list is accessible online. Please use this list to
report errors or enhancement requests. See the <a
href="release-notes.html" class="c6">release notes</a> for
information on recent changes. Your feedback is welcome!</p>

<p>If you find HTML Tidy useful and you would like to say thanks,
then please send me a (paper) postcard or other souvenir from the
area in which you live along with a few words on what you are
using Tidy for. It will be fun to map out where Tidy users are to
be found! My <a href="#address">postal address</a> is given at
the end of this file.</p>

<h3>Tutorials for HTML and CSS</h3>

<p>If you are just starting off and would like to know more about
how to author Web pages, you may find my <a
href="http://www.w3.org/MarkUp/Guide/">guide to HTML and CSS</a>
helpful. Please send me feedback on this, and I will do my best
to further improve it.</p>

<h4>Support for Word2000</h4>

<p>Tidy can now perform wonders on HTML saved from Microsoft Word
2000! Word bulks out HTML files with stuff for round-tripping
presentation between HTML and Word. If you are more concerned
about using HTML on the Web, check out Tidy's "<a
href="#word2000">Word-2000"</a> config option! Of course Tidy
does a good job on Word'97 files as well!</p>

<h3>Introduction to TIDY</h3>

<p>When editing HTML it's easy to make mistakes. Wouldn't it be
nice if there was a simple way to fix these mistakes
automatically and tidy up sloppy editing into nicely layed out
markup? Well now there is! <NAME>'s HTML TIDY is a free
utility for doing just that. It also works great on the
atrociously hard to read markup generated by specialized HTML
editors and conversion tools, and can help you identify where you
need to pay further attention on making your pages more
accessible to people with disabilities.</p>

<p>Tidy is able to fix up a wide range of problems and to bring
to your attention things that you need to work on yourself. Each
item found is listed with the line number and column so that you
can see where the problem lies in your markup. Tidy won't
generate a cleaned up version when there are problems that it
can't be sure of how to handle. These are logged as "errors"
rather than "warnings".</p>

<p class="c7">Tidy features in a <a
href="http://webreview.com/wr/pub/1999/07/16/feature/index.html">recent
article on XHTML</a> by webreview.com.</p>

<!-- is the final "index.html" needed or appropriate? -->
<h3>Examples of TIDY at work</h3>

<p>Tidy corrects the markup in a way that matches where possible
the observed rendering in popular browsers from Netscape and
Microsoft. Here are just a few examples of how TIDY perfects your
HTML for you:</p>

<ul>
<li><b>Missing or mismatched end tags are detected and
corrected</b> 

<pre>
   &lt;h1&gt;heading
   &lt;h2&gt;subheading&lt;/h3&gt;
</pre>

<p>is mapped to</p>

<pre>
   &lt;h1&gt;heading&lt;/h1&gt;
   &lt;h2&gt;subheading&lt;/h2&gt;
</pre>
</li>

<li><b>End tags in the wrong order are corrected:</b> 

<pre>
   &lt;p&gt;here is a para &lt;b&gt;bold &lt;i&gt;bold italic&lt;/b&gt; bold?&lt;/i&gt; normal?
</pre>

<p>is mapped to</p>

<pre>
   &lt;p&gt;here is a para &lt;b&gt;bold &lt;i&gt;bold italic&lt;/i&gt; bold?&lt;/b&gt; normal?
</pre>
</li>

<li><b>Fixes problems with heading emphasis</b> 

<pre>
   &lt;h1&gt;&lt;i&gt;italic heading&lt;/h1&gt;
   &lt;p&gt;new paragraph
</pre>

<p>In Netscape and Internet Explorer this causes everything
following the heading to be in the heading font size, not the
desired effect at all!</p>

<p>Tidy maps the example to</p>

<pre>
   &lt;h1&gt;&lt;i&gt;italic heading&lt;/i&gt;&lt;/h1&gt;
   &lt;p&gt;new paragraph
</pre>
</li>

<li><b>Recovers from mixed up tags</b> 

<pre>
   &lt;i&gt;&lt;h1&gt;heading&lt;/h1&gt;&lt;/i&gt;
   &lt;p&gt;new paragraph &lt;b&gt;bold text
   &lt;p&gt;some more bold text
</pre>

<p>Tidy maps this to</p>

<pre>
   &lt;h1&gt;&lt;i&gt;heading&lt;/i&gt;&lt;/h1&gt;
   &lt;p&gt;new paragraph &lt;b&gt;bold text&lt;/b&gt;
   &lt;p&gt;&lt;b&gt;some more bold text&lt;/b&gt;
</pre>
</li>

<li><b>Getting the &lt;hr&gt; in the right place:</b> 

<pre>
   &lt;h1&gt;&lt;hr&gt;heading&lt;/h1&gt;
   &lt;h2&gt;sub&lt;hr&gt;heading&lt;/h2&gt;
</pre>

<p>Tidy maps this to</p>

<pre>
   &lt;hr&gt;
   &lt;h1&gt;heading&lt;/h1&gt;
   &lt;h2&gt;sub&lt;/h2&gt;
   &lt;hr&gt;
   &lt;h2&gt;heading&lt;/h2&gt;
</pre>
</li>

<li><b>Adding the missing "/" in end tags for anchors:</b> 

<pre>
   &lt;a href="#refs"&gt;References&lt;a&gt;
</pre>

<p>Tidy maps this to</p>

<pre>
   &lt;a href="#refs"&gt;References&lt;/a&gt;
</pre>
</li>

<li><b>Perfecting lists by putting in tags missed out:</b> 

<pre>
   &lt;body&gt;
   &lt;li&gt;1st list item
   &lt;li&gt;2nd list item
</pre>

<p>is mapped to</p>

<pre>
   &lt;body&gt;
   &lt;ul&gt;
   &lt;li&gt;1st list item&lt;/li&gt;
   &lt;li&gt;2nd list item&lt;/li&gt;
   &lt;/ul&gt;
</pre>
</li>

<li><b>Missing quotes around attribute values are added</b> 

<p>Tidy inserts quote marks around all attribute values for you.
It can also detect when you have forgotten the closing quote
mark, although this is something you will have to fix
yourself.</p>
</li>

<li><b>Unknown/Proprietary attributes are reported</b> 

<p>Tidy has a comprehensive knowledge of the attributes defined
in the HTML 4.0 recommendation from W3C. This often allows you to
spot where you have mistyped an attribute or value.</p>
</li>

<li><b>Proprietary elements are recognized and reported as
such.</b> 

<p>Tidy will even work out which version of HTML you are using
and insert the appropriate DOCTYPE element, as per the W3C
recommendations.</p>
</li>

<li><b>Tags lacking a terminating '&gt;' are spotted</b> 

<p>This is something you then have to fix yourself as Tidy is
unsure of where the &gt; should be inserted.</p>
</li>
</ul>

<h3>Layout style</h3>

<p>You can choose which style you want Tidy to use when it
generates the cleaned up markup: for instance whether you like
elements to indent their contents or not. Several people have
asked if Tidy could preserve the original layout. I am sorry to
say that this would be very hard to support due to the way Tidy
is implemented. Tidy starts by building a clean parse tree from
the source file. The parse tree doesn't contain any information
about the original layout. Tidy then pretty prints the parse tree
using the current layout options. Trying to preserve the original
layout would interact badly with the repair operations needed to
build a clean parse tree and considerably complicate the
code.</p>

<p>Some browsers can screw up the right alignment of text
depending on how you layout headings. As an example,
consider:</p>

<pre>
&lt;h1 align="right"&gt;
  Heading
&lt;/h1&gt;

&lt;h1 align="right"&gt;Heading&lt;/h1&gt;
</pre>

<p>Both of these should be rendered the same. Sadly a common
browser bug fails to trim trailing whitespace and misaligns the
first heading. HTML Tidy will protect you from this bug, except
when you set the indent option to "yes".</p>

<p>Setting the indent option to yes can also cause problems with
table layout for some browsers:</p>

<pre>
&lt;td&gt;&lt;img src="foo.gif"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="foo.gif"&gt;&lt;/td&gt;
</pre>

<p>will look slightly different from:</p>

<pre>
&lt;td&gt;
  &lt;img src="foo.gif"&gt;
&lt;/td&gt;
&lt;td&gt;
  &lt;img src="foo.gif"&gt;
&lt;/td&gt;
</pre>

<p>You can avoid such quirks by using indent:&#160;no or
indent:&#160;auto in the config file.</p>

<h3>Internationalization issues</h3>

<p>Tidy offers you a choice of character encodings: US ASCII, ISO
Latin-1, UTF-8 and the ISO 2022 family of 7 bit encodings. The
full set of HTML 4.0 entities are defined. Cleaned up output uses
HTML entity names for characters when appropriate. Otherwise
characters outside the normal range are output as numeric
character entities. Tidy defaults to assuming you want the output
to be in US ASCII. Tidy doesn't yet recognize the use of the HTML
meta element for specifying the character encoding.</p>

<h3>Accessibility</h3>

<p>Tidy offers advice on accessibility problems for people using
non-graphical browsers. The most common thing you will see is the
suggestion you add a summary attribute to table elements. The
idea is to provide a summary of the table's role and structure
suitable for use with aural browsers.</p>

<h3>Cleaning up presentational markup</h3>

<p>Many tools generate HTML with an excess of FONT, NOBR and
CENTER tags. Tidy's <em>-clean</em> option will replace them by
style properties and rules using CSS. This makes the markup
easier to read and maintain as well as reducing the file size!
Tidy is expected to get smarter at this in the future.</p>

<p>Some pages rely on the presentation effects of isolated
&lt;p&gt; or &lt;/p&gt; tags.Tidy deletes empty paragraph and
heading elements etc. The use of empty paragraph elements is not
recommended for adding vertical whitespace. Instead use style
sheets, or the &lt;br&gt; element. Tidy won't discard paragraphs
only containing a nonbreaking space &amp;nbsp;</p>

<h3>Teaching Tidy about new tags!</h3>

<p>You can teach Tidy about new tags by declaring them in the
configuration file, the syntax is:</p>

<pre>
  new-inline-tags: <em>tag1, tag2, tag3</em>
  new-empty-tags: <em>tag1, tag2, tag3</em>
  new-blocklevel-tags: <em>tag1, tag2, tag3</em>
  new-pre-tags: <em>tag1, tag2, tag3</em>
</pre>

<p>The same tag can be defined as empty and as inline or as empty
and as block.</p>

<p>These declarations can be combined to define an a new empty
inline or empty block element, but you are not advised to declare
tags as being both inline and block!</p>

<p>Note that the new tags can only appear where Tidy expects
inline or block-level tags respectively. This means you can't
(yet) place new tags within the document head or other contexts
with restricted content models. So far the most popular use of
this feature is to allow Tidy to be applied to Cold Fusion
files.</p>

<p class="c7">I am working on ways to make it easy to customize
the permitted document syntax using <a
href="http://www.w3.org/People/Raggett/dtdgen/Docs/">assertion
grammars</a>, and hope to apply this to a much smarter version of
Tidy for release later this year or early next year.</p>

<h3>Limited support for ASP, JSTE and PHP</h3>

<p>Tidy is somewhat aware of the preprocessing language called
ASP which uses a pseudo element syntax &lt;%&#160;...&#160;%&gt;
to include preprocessor directives. ASP is normally interpreted
by the web server before delivery to the browser. JSTE shares the
same syntax, but sometimes also uses &lt;#&#160;...&#160;#&gt;.
Tidy can also cope with another such language called PHP, which
uses the syntax &lt;?php&#160;...&#160;?&gt;</p>

<p>Tidy will cope with ASP, JSTE and PHP pseudo elements within
element content and as replacements for attributes, for
example:</p>

<pre>
  &lt;option &lt;% if rsSchool.Fields("ID").Value
    = session("sessSchoolID")
    then Response.Write("selected") %&gt;
    value='&lt;%=rsSchool.Fields("ID").Value%&gt;'&gt;
    &lt;%=rsSchool.Fields("Name").Value%&gt;
    (&lt;%=rsSchool.Fields("ID").Value%&gt;)
  &lt;/option&gt;
</pre>

<p>Note that Tidy doesn't understand the scripting language used
within pseudo elements and attributes, and can easily get
confused. Tidy may report missing attributes when these are
hidden within preprocessor code. Tidy can also get things wrong
if the code includes quote marks, e.g. if the example above is
changed to:</p>

<pre>
    value="&lt;%=rsSchool.Fields("ID").Value%&gt;"
</pre>

<p>Tidy will now see the quote mark preceding ID as ending the
attribute value, and proceed to complain about what follows. Note
you can choose whether to allow line wrapping on spaces within
pseudo elements or not using the <tt>wrap-asp</tt> option. If you
used ASP, JSTE or PHP to create a start tag, but placed the end
tag explicitly in the markup, Tidy won't be able to match them
up, and will delete the end tag for you. So in this case you are
advise to make the start tag explicit and to use ASP, JSTE or PHP
for just the attributes, e.g.</p>

<pre>
   &lt;a href="&lt;%=random.site()%&gt;"&gt;do you feel lucky?&lt;/a&gt;
</pre>

<p>Tidy allows you to control whether line wrapping is enabled
for ASP, JSTE and PHP instructions, see the wrap-asp, wrap-jste
and wrap-php config options, respectively.</p>

<p>I regret that Tidy does <b>not</b> support Tango preprocessing
instructions which look like:</p>

<pre>
&lt;@if variable_1='a'&gt;
    do something
&lt;@else&gt;
    do nothing
&lt;/@if&gt;

&lt;@include &lt;@cgi&gt;&lt;@appfilepath&gt;includes/message.html&gt;
</pre>

<p>Tidy supports another preprocessing syntax called "Tango", but
only for attribute values. Adding support for pseudo elements
written in Tango looks as if it would be quite tough, so I would
like to gauge the level of interest before committing to this
work.</p>

<h3>Limited support for XML</h3>

<p>XML processors compliant with W3C's XML 1.0 recommendation are
very picky about which files they will accept. Tidy can help you
to fix errors that cause your XML files to be rejected. Tidy
doesn't yet recognize all XML features though, e.g. it doesn't
understand CDATA sections or DTD subsets.</p>

<h3>Creating Slides</h3>

<p>The <em>-slides</em> option allows you to burst a single HTML
file into a number of linked slides. Each H2 element in the input
file is treated as delimiting the start of the next slide. The
slides are named slide1.html, slide2.html, slide3.html etc. This
is a relatively new feature and ideas are welcomed as to how to
improve it. In particular, I plan to add support to the
configuration file for setting the style sheet for slides and for
customizing the slides via a template.</p>

<p>I would be interested in hearing from anyone who can offer
help with using JavaScript for adding dynamic effects to slides,
for instance similar to those available in Microsoft
PowerPoint.</p>

<h3>Indenting text for a better layout</h3>

<p>Indenting the content of elements makes the markup easier to
read. Tidy can do this for all elements or just for those where
it's needed. The auto-indent mode has been used below to avoid
indenting the content of title, p and li elements:</p>

<pre>
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Test document&lt;/title&gt;
  &lt;/head&gt;

  &lt;body&gt;
    &lt;p&gt;para which has enough text to cause a line break,
    and so test the wrapping mechanism for long lines.&lt;/p&gt;
&lt;pre&gt;
This is
&lt;em&gt;genuine
       preformatted&lt;/em&gt;
   text
&lt;/pre&gt;

    &lt;ul&gt;
      &lt;li&gt;1st list item&lt;/li&gt;

      &lt;li&gt;2nd list item&lt;/li&gt;
    &lt;/ul&gt;
    &lt;!-- end comment --&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>

<p>Indenting the content does increase the size of the file, so
you may prefer Tidy's default style:</p>

<pre>
 &lt;html&gt;
 &lt;head&gt;
 &lt;title&gt;Test document&lt;/title&gt;
 &lt;/head&gt;
 &lt;body&gt;
 &lt;p&gt;para which has enough text to cause a line break,
 and so test the wrapping mechanism for long lines.&lt;/p&gt;
 
 &lt;pre&gt;This is
 &lt;em&gt;genuine
       preformatted&lt;/em&gt;
    text
 &lt;/pre&gt;
 
 &lt;ul&gt;
 &lt;li&gt;1st list item &lt;/li&gt;
 
 &lt;li&gt;2nd list item&lt;/li&gt;
 &lt;/ul&gt;
 
 &lt;!-- end comment --&gt;
 &lt;/body&gt;
 &lt;/html&gt;
 
</pre>

<h3><a id="help" name="help">How to run tidy</a></h3>

<pre>
   <span class="c8">tidy</span> <em>[[options] filename]*</em>
</pre>

<p>HTML tidy is not (yet) a Windows program. If you run tidy
without any arguments, it will just sit there waiting to read
markup on the stdin stream. Tidy's input and output default to
stdin and stdout respectively. Errors are written to stderr but
can be redirected to a file with the -f <em>filename</em>
option.</p>

<p>I generally use the -m option to get tidy to update the
original file, and if the file is particularly bad I also use the
-f option to write the errors to a file to make it easier to
review them. Tidy supports a small set of character encoding
options. The default is ASCII, which makes it easy to edit markup
in regular text editors.</p>

<p>For instance:</p>

<pre>
   tidy -f errs.txt -m index.html
</pre>

<p>which runs tidy on the file "index.html" updating it in place
and writing the error messages to the file "errs.txt". Its a good
idea to save your work before tidying it, as with all complex
software, tidy may have bugs. If you find any please let me
know!</p>

<p>Thanks to <NAME>, The Win32 executable for tidy is
now able to example wild cards in filenames. This utilizes the
setargv library supplied with VC++.</p>

<p>Tidy writes errors to stderr, and won't be paused by the more
command. A work around is to redirect stderr to stdout as
follows. This works on Unix and Windows NT, but not on other
platforms. My thanks to <NAME> for this tip!</p>

<pre>
   tidy file.html 2&gt;&amp;1 | more
</pre>

<h4>Tidy's Options</h4>

<p>To get a list of available options use:</p>

<pre>
   tidy -help
</pre>

<p>You may want to run it through more to view the help a page at
a time.</p>

<pre>
   tidy -help | more
</pre>

<p>Input and Output default to stdin/stdout respectively. Single
letter options apart from -f may be combined as in: tidy -f
errs.txt -imu foo.html</p>

<p><NAME> &lt;<a
href="mailto:<EMAIL>"><EMAIL></a>&gt; has written
a <a href="man_page.txt">Unix man page for Tidy</a>, but for the
latest details on config options and for the release notes please
visit this page: <a
href="http://www.w3.org/People/Raggett/tidy">http://www.w3.org/People/Raggett/tidy</a>.</p>

<h3><a id="config" name="config">Using a Configuration
File</a></h3>

<p>Tidy now supports a configuration file, and this is now much
the most convenient way to configure Tidy. Assuming you have
created a config file named "config.txt" (the name doesn't
matter), you can instruct Tidy to use it via the command line
option <tt>-config config.txt</tt>, e.g.</p>

<pre>
   tidy -config config.txt file1.html file2.html
</pre>

<p>Alternatively, you can name the default config file via the
environment variable named "HTML_TIDY". Note this should be the
absolute path since you are likely to want to run Tidy in
different directories. You can also set a config file at compile
time by defining TIDY_CONFIG_FILE as the path string, see
platform.h.</p>

<p>You can now set config options on the command line by
preceding the name of the option immediately (no intervening
space) by "--", for example:</p>

<pre>
  tidy --break-before-br true --show-warnings false
</pre>

<p>The following options are supported:</p>

<dl>
<dt>tidy-mark: <em>bool</em></dt>

<dd>If set to <em>yes</em> (the default) Tidy will add a meta
element to the document head to indicate that the document has
been tidied. To suppress this, set tidy-mark to <em>no</em>. Tidy
won't add a meta element if one is already present.</dd>

<dt>markup: <em>bool</em></dt>

<dd>Determines whether Tidy generates a pretty printed version of
the markup. Bool values are either <em>yes</em> or <em>no</em>.
Note that Tidy won't generate a pretty printed version if it
finds unknown tags, or missing trailing quotes on attribute
values, or missing trailing '&gt;' on tags. The default is
<em>yes</em>.</dd>

<dt>wrap: <em>number</em></dt>

<dd>Sets the right margin for line wrapping. Tidy tries to wrap
lines so that they do not exceed this length. The default is 66.
Set wrap to zero if you want to disable line wrapping.</dd>

<dt>wrap-attributes: <em>bool</em></dt>

<dd>If set to <em>yes</em>, attribute values may be wrapped
across lines for easier editing. The default is no. This option
can be set independently of wrap-scriptlets</dd>

<dt>wrap-script-literals: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this allows lines to be wrapped
within string literals that appear in script attributes. The
default is <em>no</em>. The example shows how Tidy wraps a really
really long script string literal inserting a backslash character
before the linebreak: 

<pre>
&lt;a href="somewhere.html" onmouseover="document.status = '...some \
really, really, really, really, really, really, really, really, \
really, really long string..';"&gt;test&lt;/a&gt;
</pre>
</dd>

<dt>wrap-asp: <em>bool</em></dt>

<dd>If set to <em>no</em>, this prevents lines from being wrapped
within ASP pseudo elements, which look like:
&lt;%&#160;...&#160;%&gt;. The default is <em>yes</em>.</dd>

<dt>wrap-jste: <em>bool</em></dt>

<dd>If set to <em>no</em>, this prevents lines from being wrapped
within JSTE pseudo elements, which look like:
&lt;#&#160;...&#160;#&gt;. The default is <em>yes</em>.</dd>

<dt>wrap-php: <em>bool</em></dt>

<dd>If set to <em>no</em>, this prevents lines from being wrapped
within PHP pseudo elements. The default is <em>yes</em>.</dd>

<dt>literal-attributes: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this ensures that whitespace
characters within attribute values are passed through unchanged.
The default is <em>no</em>.</dd>

<dt>tab-size: <em>number</em></dt>

<dd>Sets the number of columns between successive tab stops. The
default is 4. It is used to map tabs to spaces when reading
files. Tidy never outputs files with tabs.</dd>

<dt>indent: <em>no, yes</em> or <em>auto</em></dt>

<dd>If set to <em>yes</em>, Tidy will indent block-level tags.
The default is <em>no</em>. If set to <em>auto</em> Tidy will
decide whether or not to indent the content of tags such as
title, h1-h6, li, td, th, or p depending on whether or not the
content includes a block-level element. You are advised to avoid
setting indent to yes as this can expose layout bugs in some
browsers.</dd>

<dt>indent-spaces: <em>number</em></dt>

<dd>Sets the number of spaces to indent content when indentation
is enabled. The default is 2 spaces.</dd>

<dt>indent-attributes: <em>bool</em></dt>

<dd>If set to <em>yes</em>, each attribute will begin on a new
line. The default is <em>no</em>.</dd>

<dt>hide-endtags: <em>bool</em></dt>

<dd>If set to <em>yes</em>, optional end-tags will be omitted
when generating the pretty printed markup. This option is ignored
if you are outputting to XML. The default is <em>no</em>.</dd>

<dt>input-xml: <em>bool</em></dt>

<dd>If set to <em>yes</em>, Tidy will use the XML parser rather
than the error correcting HTML parser. The default is
<em>no</em>.</dd>

<dt>output-xml: <em>bool</em></dt>

<dd>If set to <em>yes</em>, Tidy will use generate the pretty
printed output writing it as well-formed XML. Any entities not
defined in XML 1.0 will be written as numeric entities to allow
them to be parsed by an XML parser. The tags and attributes will
be in the case used in the input document, regardless of other
options. The default is <em>no</em>.</dd>

<dt>add-xml-pi: <em>bool</em></dt>

<dt>add-xml-decl: <em>bool</em></dt>

<dd>If set to <em>yes</em>, Tidy will add the XML declatation
when outputting XML or XHTML. The default is <em>no</em>. Note
that if the input document includes an &lt;?xml?&gt; declaration
then it will appear in the output independent of the value of
this option.</dd>

<dt>output-xhtml: <em>bool</em></dt>

<dd>If set to <em>yes</em>, Tidy will generate the pretty printed
output writing it as extensible HTML. The default is <em>no</em>.
This option causes Tidy to set the doctype and default namespace
as appropriate to XHTML. If a doctype or namespace is given they
will checked for consistency with the content of the document. In
the case of an inconsistency, the corrected values will appear in
the output. For XHTML, entities can be written as named or
numeric entities according to the value of the "numeric-entities"
property. The tags and attributes will be output in the case used
in the input document, regardless of other options.</dd>

<dt>doctype: <em>omit, auto, strict, loose</em> or
&lt;<em>fpi</em>&gt;</dt>

<dd>This property controls the doctype declaration generated by
Tidy. If set to <em>omit</em> the output file won't contain a
doctype declaration. If set to <em>auto</em> (the default) Tidy
will use an educated guess based upon the contents of the
document. If set to <em>strict</em>, Tidy will set the doctype to
the strict DTD. If set to <em>loose</em>, the doctype is set to
the loose (transitional) DTD. Alternatively, you can supply a
string for the formal public identifier (fpi) for example:</dd>

<dd>
<pre>
    doctype: "-//ACME//DTD HTML 3.14159//EN"
</pre>
</dd>

<dd>If you specify the fpi for an XHTML document, Tidy will set
the system identifier to the empty string. Tidy leaves the
document type for generic XML documents unchanged.</dd>

<dt>char-encoding: <em>raw, ascii, latin1, utf8</em> or
<em>iso2022</em></dt>

<dd>Determines how Tidy interprets character streams. For
<em>ascii</em>, Tidy will accept Latin-1 character values, but
will use entities for all characters whose value &gt; 127. For
<em>raw</em>, Tidy will output values above 127 without
translating them into entities. For <em>latin1</em> characters
above 255 will be written as entities. For <em>utf8</em>, Tidy
assumes that both input and output is encoded as UTF-8. You can
use <em>iso2022</em> for files encoded using the ISO2022 family
of encodings e.g. ISO 2022-JP. The default is
<em>ascii</em>.</dd>

<dt>numeric-entities: <em>bool</em></dt>

<dd>Causes entities other than the basic XML 1.0 named entities
to be written in the numeric rather than the named entity form.
The default is <em>no</em></dd>

<dt>quote-marks: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this causes " characters to be
written out as &amp;quot; as is preferred by some editing
environments. The apostrophe character ' is written out as
&amp;#39; since many web browsers don't yet support &amp;apos;.
The default is <em>no</em>.</dd>

<dt>quote-nbsp: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this causes non-breaking space
characters to be written out as entities, rather than as the
Unicode character value 160 (decimal). The default is
<em>yes</em>.</dd>

<dt>quote-ampersand: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this causes unadorned &amp;
characters to be written out as &amp;amp;. The default is
<em>yes</em>.</dd>

<dt>assume-xml-procins: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this changes the parsing of
processing instructions to require ?&gt; as the terminator rather
than &gt;. The default is <em>no</em>. This option is
automatically set if the input is in XML.</dd>

<dt>fix-backslash: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this causes backslash characters "\"
in URLs to be replaced by forward slashes "/". The default is
<em>yes</em>.</dd>

<dt>break-before-br: <em>bool</em></dt>

<dd>If set to <em>yes</em>, Tidy will output a line break before
each &lt;br&gt; element. The default is <em>no</em>.</dd>

<dt>uppercase-tags: <em>bool</em></dt>

<dd>Causes tag names to be output in upper case. The default is
<em>no</em> resulting in lowercase, except for XML input where
the original case is preserved.</dd>

<dt>uppercase-attributes: <em>bool</em></dt>

<dd>If set to <em>yes</em> attribute names are output in upper
case. The default is <em>no</em> resulting in lowercase, except
for XML where the original case is preserved.</dd>

<dt><a id="word2000" name="word2000">word-2000:
<em>bool</em></a></dt>

<dd>If set to <em>yes</em>, Tidy will go to great pains to strip
out all the surplus stuff Microsoft Word 2000 inserts when you
save Word documents as "Web pages". The default is <em>no</em>.
Note that Tidy doesn't yet know what to do with VML markup from
Word, but in future I hope to be able to map VML to SVG.<br />
<br />
 Microsoft has developed its own optional filter for exporting to
HTML, and the 2.0 version is much improved. You can download the
filter free from the <a
href="http://officeupdate.microsoft.com/2000/downloadDetails/Msohtmf2.htm">
Microsoft Office Update site</a>.</dd>

<dt>clean: <em>bool</em></dt>

<dd>If set to <em>yes</em>, causes Tidy to strip out surplus
presentational tags and attributes replacing them by style rules
and structural markup as appropriate. It works well on the html
saved from Microsoft Office'97. The default is <em>no</em>.</dd>

<dt>logical-emphasis: <em>bool</em></dt>

<dd>If set to <em>yes</em>, causes Tidy to replace any occurrence
of i by em and any occurrence of b by strong. In both cases, the
attributes are preserved unchanged. The default is <em>no</em>.
This option can now be set independently of the clean and
drop-font-tags options.</dd>

<dt>drop-empty-paras: <em>bool</em></dt>

<dd>If set to <em>yes</em>, empty paragraphs will be discarded.
If set to no, empty paragraphs are replaced by a pair of
<code>br</code> elements as HTML4 precludes empty paragraphs. The
default is <em>yes</em>.</dd>

<dt>drop-font-tags: <em>bool</em></dt>

<dd>If set to <em>yes</em> together with the clean option (see
above), Tidy will discard font and center tags rather than
creating the corresponding style rules. The default is
<em>no</em>.</dd>

<dt>enclose-text: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this causes Tidy to enclose any text
it finds in the body element within a p element. This is useful
when you want to take an existing html file and use it with a
style sheet. Any text at the body level will screw up the
margins, but wrap the text within a p element and all is well!
The default is <em>no</em>.</dd>

<dt>enclose-block-text: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this causes Tidy to insert a p
element to enclose any text it finds in any element that allows
mixed content for HTML transitional but not HTML strict. The
default is <em>no</em>.</dd>

<dt>fix-bad-comments: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this causes Tidy to replace
unexpected hyphens with "=" characters when it comes across
adjacent hyphens. The default is <em>yes</em>. This option is
provided for users of Cold Fusion which uses the comment syntax:
&lt;!---&#160;---&gt;</dd>

<dt>add-xml-space: <em>bool</em></dt>

<dd>If set to <em>yes</em>, this causes Tidy to add
xml:space="preserve" to elements such as pre, style and script
when generating XML. This is needed if the whitespace in such
elements is to be parsed appropriately without having access to
the DTD. The default is <em>no</em>.</dd>

<dt>alt-text: <em>string</em></dt>

<dd>This allows you to set the default alt text for img
attributes. This feature is dangerous as it suppresses further
accessibility warnings. <b>YOU ARE RESPONSIBLE FOR MAKING YOUR
DOCUMENTS ACCESSIBLE TO PEOPLE WHO CAN'T SEE THE
IMAGES!!!</b></dd>

<dt>write-back: <em>bool</em></dt>

<dd>If set to <em>yes</em>, Tidy will write back the tidied
markup to the same file it read from. The default is <em>no</em>.
You are advised to keep copies of important files before tidying
them as on rare occasions the result may not always be what you
expect.</dd>

<dt>keep-time: <em>bool</em></dt>

<dd>If set to <em>yes</em>, Tidy won't alter the last modified
time for files it writes back to. The default is <em>yes</em>.
This allows you to tidy files without effecting which ones will
be uploaded to the Web server when using a tool such as
'SiteCopy'. Note that this feature may not work on some
platforms.</dd>

<dt>error-file: <em>filename</em></dt>

<dd>Writes errors and warnings to the named file rather than to
stderr.</dd>

<dt>show-warnings: <em>bool</em></dt>

<dd>If set to <em>no</em>, warnings are suppressed. This can be
useful when a few errors are hidden in a flurry of warnings. The
default is <em>yes</em>.</dd>

<dt>quiet: <em>bool</em></dt>

<dd>If set to <em>yes</em>, Tidy won't output the welcome message
or the summary of the numbers of errors and warnings. The default
is <em>no</em>.</dd>

<dt>gnu-emacs: <em>bool</em></dt>

<dd>If set to <em>yes</em>, Tidy changes the format for reporting
errors and warnings to a format that is more easily parsed by GNU
Emacs. The default is <em>no</em>.</dd>

<dt>split: <em>bool</em></dt>

<dd>If set to <em>yes</em> Tidy will use the input file to create
a sequence of slides, splitting the markup prior to each
successive &lt;h2&gt;. You can see an example of the results in a
<a
href="http://www.w3.org/Talks/1999/03/24-stockholm-xhtml/">recent
talk I made on XHTML</a>. The slides are written to
"slide1.html", "slide2.html" etc. The default is
<em>no</em>.</dd>

<dt>new-empty-tags: <em>tag1, tag2, tag3</em></dt>

<dd>Use this to declare new empty inline tags. The option takes a
space or comma separated list of tag names. Unless you declare
new tags, Tidy will refuse to generate a tidied file if the input
includes previously unknown tags. Remember to also declare empty
tags as either inline or blocklevel, see below.</dd>

<dt>new-inline-tags: <em>tag1, tag2, tag3</em></dt>

<dd>Use this to declare new non-empty inline tags. The option
takes a space or comma separated list of tag names. Unless you
declare new tags, Tidy will refuse to generate a tidied file if
the input includes previously unknown tags.</dd>

<dt>new-blocklevel-tags: <em>tag1, tag2, tag3</em></dt>

<dd>Use this to declare new block-level tags. The option takes a
space or comma separated list of tag names. Unless you declare
new tags, Tidy will refuse to generate a tidied file if the input
includes previously unknown tags. Note you can't change the
content model for elements such as table, ul, ol and dl. This is
explained in more detail in the <a
href="release-notes.html">release notes</a>.</dd>

<dt>new-pre-tags: <em>tag1, tag2, tag3</em></dt>

<dd>Use this to declare new tags that are to be processed in
exactly the same way as HTML's pre element. The option takes a
space or comma separated list of tag names. Unless you declare
new tags, Tidy will refuse to generate a tidied file if the input
includes previously unknown tags. Note you can't as yet add new
CDATA elements (similar to script).</dd>
</dl>

<h4>Sample Config File</h4>

<p>This is just an example to get you started.</p>

<pre>
// sample config file for HTML tidy
indent: auto
indent-spaces: 2
wrap: 72
markup: yes
output-xml: no
input-xml: no
show-warnings: yes
numeric-entities: yes
quote-marks: yes
quote-nbsp: yes
quote-ampersand: no
break-before-br: no
uppercase-tags: no
uppercase-attributes: no
char-encoding: latin1
new-inline-tags: cfif, cfelse, math, mroot, 
  mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover,
  munder, mover, mmultiscripts, msup, msub, mtext,
  mprescripts, mtable, mtr, mtd, mth
new-blocklevel-tags: cfoutput, cfquery
new-empty-tags: cfelse
</pre>

<h3><a id="scripts" name="scripts">Using Tidy from
scripts</a></h3>

<p>If you want to run Tidy from a Perl or other scripting
language you may find it of value to inspect the result returned
by Tidy when it exits: 0 if everything is fine, 1 if there were
warnings and 2 if there were errors. This is an example using
Perl:</p>

<pre>
if (close(TIDY) == 0) {
  my $exitcode = $? &gt;&gt; 8;
  if ($exitcode == 1) {
    printf STDERR "tidy issued warning messages\n";
  } elsif ($exitcode == 2) {
    printf STDERR "tidy issued error messages\n";
  } else {
    die "tidy exited with code: $exitcode\n";
  }
} else {
  printf STDERR "tidy detected no errors\n";
}
</pre>

<h3><a id="download" name="download">Downloadable
Binaries</a></h3>

<p class="note">If you are prepared to maintain a public URL for
HTML Tidy compiled for a specific platform, please let me know so
that I can add a link to your page. This will avoid the need for
me to update this page whenever you recompile.</p>

<div class="platforms">
<h4>Windows 95/98/NT/2000</h4>

<p><b><a
href="http://www.w3.org/People/Raggett/tidy.exe">tidy.exe</a></b>.
Windows 95/98/NT/2000 executable (32-bit Windows console-mode
program). This is the executable that I maintain as part of the
HTML Tidy distribution. The command line parameters are described
above, along with the extensive configuration file options.</p>

<p><b><a
href="http://www.chami.com/free/html-kit/">HTML-Kit</a></b> - a
free HTML editor for Windows 95/98/NT/2000 with integrated
support for Tidy.</p>

<p><b><a
href="http://perso.wanadoo.fr/ablavier/TidyGUI/">TidyGUI</a></b>.
Windows front end for running Tidy, written by Andr&#233;
Blavier. Andr&#233; has also written a <b><a
href="http://perso.wanadoo.fr/ablavier/TidyCOM/">Windows COM
wrapper</a></b> for Tidy. He describes how to use this from
Visual Basic.</p>

<p><b><a href="http://www.evrsoft.com/">Evrsoft's 1st Page
2000</a></b> - a free HTML editor for Windows 95/98/NT/2000 with
integrated support for Tidy. 1st Page 2000 is a high-end
authoring tool that makes it easy to add effects based upon
scripting.</p>

<p><b><a href="http://www.notetab.com/">NoteTab</a></b> - an
award winning text and html editor for Windows with built-in
support for running HTML Tidy. NoteTab is written by Eric
Fookes.</p>

<h4>Mac OS</h4>

Several versions of <a
href="http://www.geocities.com/SiliconValley/1057/tidy.html">HTML
Tidy for Mac OS</a> are available, including a standalone
Macintosh application with a graphical user interface, a BBEdit
plugin, a MPW tool, or as a FilterTop filter ( <a
href="http://www.geocities.com/SiliconValley/1057/images/TidyHTML.GIF">
Screenshot</a>). My thanks to <a
href="mailto:<EMAIL>"><NAME></a> for this
port.<br />
<br />
 

<h4>Atari</h4>

<p><NAME>'s site for the <a
href="http://tidy.atari.org">Atari binary for Tidy</a>.</p>

<h4>Amiga</h4>

<p><NAME> maintains a page for <a
href="http://www.amiga.u-net.com/MadDogSoftware/Tidy.html">Tidy
on Amiga</a>.</p>

<h4>BeOS</h4>

<p><NAME> is maintaining <a
href="http://www.bytepeople.com/beos/apps/htmltidy.html">HTML
Tidy</a> for BeOS. Link points to download for HTML Tidy as well
as HTML Tidy editor addons for BeOS.</p>

<h4>AIX</h4>

<p>Ciaran Deignan maintains an <a
href="http://www-frec.bull.com/cgi-bin/list_dir.cgi/download/">AIX
binary for Tidy</a>. The link is to a general download page. The
executable is available for AIX 4.3.2 and later.</p>

<h4>Linux</h4>

<p><NAME> maintains a <a
href="http://perso.club-internet.fr/dpo/rpm/">Tidy RPM package
for Redhat Linux</a> You may also be able to find Tidy on other
Linux distribution sites, e.g. <a
href="http://rpmfind.net/">http://rpmfind.net/</a>.</p>

<!-- no longer accessible :-( 
      <p><b><a href= 
      "http://www.astro.uni-bonn.de/~webstw/cm/w3c_tidy/index.html">
      Linux users</a></b>! ochen <NAME> is maintaining Tidy binary
      for Linux (ELF 32-bit LSB executable using '<tt>libc.so.5</tt>'
      for Intel&#160;80386): '<a href= 
      "ftp://ftp.astro.uni-bonn.de/pub/webstw/linsoft/tidy"><tt>tidy</tt></a>
      '. Additionally a man page can be downloaded: <a href= 
      "ftp://ftp.astro.uni-bonn.de/pub/webstw/linsoft/tidy.1"><tt>
      tidy.1</tt></a>.</p>
       -->
<h4>UnixWare</h4>

<p><NAME> &lt;<a
href="mailto:<EMAIL>"><EMAIL></a>&gt; maintains
a <a href="http://www.ocston.org/~simon/tidy/">Tidy binary for
Unixware</a>.</p>

<h4>HP-UX</h4>

<p>You can get precompiled versions of Tidy for HPUX, from <a
href="http://www.informatik.uni-stuttgart.de/ifi/gr/mitarbeiter/hopp/tidy/tidy.html">
Olaf Hopp</a>, and from <a
href="http://geocities.com/ian_springer/hpux_tidy.html">Ian
Springer</a>.</p>

<h4>MSDOS</h4>

<p><NAME>. maintains <a
href="http://members.xoom.com/nickbeee/tidy386/">Tidy386 for
DOS</a>. This exploits the DPMI mechanism for the memory
management.</p>

<h4>Solaris</h4>

<p><NAME> maintains a page for <a
href="http://www.hep.utexas.edu/~sfuqua/unix">Tidy on
Solaris</a>.</p>

<h4>OS/2</h4>

<p><NAME> &lt;<a
href="mailto:<EMAIL>"><EMAIL></a>&gt; maintains
an <a
href="http://www.dd.iij4u.or.jp/~kshimz/warp/tidy/index.html">OS/2
binary for Tidy</a>.</p>

<h4>FreeBSD</h4>

<p><NAME> maintains <a
href="http://www.fogey.com/fouts/tidy.htm">Tidy on
FreeBSD</a>.</p>

<h4>RISC OS</h4>

<p><a href="mailto:<EMAIL>"><NAME></a> maintains a <a
href="http://www.toth.org.uk/~aardvark/programs/tidy.shtml">port
of Tidy to the RISC OS</a>.</p>

<h4>MiNT (Atari) OS</h4>

<p><a href="mailto:<EMAIL>)"><NAME></a>
maintains a <a
href="http://wh58-508.st.uni-magdeburg.de/sparemint/html/packages/tidy.html">
port of Tidy to the MiNT OS</a>. MiNT is a UNIX for m68k Atari
computers and is nearly FHS compliant (we don't use bootable OS
images nor have any mounting capabilities, so neither /boot nor
/mnt are used). The binary also runs on ordinary TOS, since the
MiNT libraries cover all GEMDOS/GEM functions.</p>
</div>

<h3><a id="quotes" name="quotes">Integrating Tidy as part of
other Software</a></h3>

<p>You can also incorporate Tidy as part of a larger program, for
instance in HTML editors or HTML transformation tools used for
import filters, or for when you want to customize Web content to
get the best out of different kinds of browsers. Imagine
authoring clean HTML with CSS and at a touch of a button
producing variants that look great and work reliably on a large
variety of different browsers, taking into account the quirks of
each. For instance, providing the ability to tune content for
different versions of Netscape and Internet Explorer, and for
browsers running on set-top boxes for televisions, handheld and
palmtop devices, cell phones, and voice browsers. I am happy to
quote for software development for such tools.</p>

<p><NAME> has contributed a perl wrapper for calling
Tidy from your perl scripts, see <a
href="sl-tidy.pl">sl-tidy.pl</a>.</p>

<h4>Using Tidy from emacs</h4>

<p><NAME> emailed this <a
href="http://lists.w3.org/Archives/Public/html-tidy/2000AprJun/0047.html">
tip</a> for using Tidy with the Unix version of emacs. lets you
highlight a region of text and run Tidy on it. Tidy's "fixed"
output will replace your highlighted region right in place. The
error/warnings output will be directed into a separate
mini-buffer below in your main screen.</p>

<h3><a id="java" name="java">Java port of HTML Tidy</a></h3>

<p><NAME> &lt;<a
href="mailto:<EMAIL>"><EMAIL></a>&gt;
maintains a Java port of Tidy, so you can now integrate Tidy into
your Java applications. Andy is tracking the releases of Tidy in
C (this page). More information is available on <a
href="http://www3.sympatico.ca/ac.quick/">Andy's home
page</a>.</p>

<h3><a id="implementation" name="implementation">Source
Code</a></h3>

<p>The code is in ANSI C and uses the C standard library for i/o.
The parser works top down, building a complete parse tree in
memory. Document text is held as Unicode represented as UTF-8 in
a character buffer that expands as needed. The code has so far
been tested on Windows'95, Windows'98, Windows NT, Windows 2000,
Linux, FreeBSD, NetBSD, Ultrix, OSF, OS/MP, IRIX, NeXtStep,
MacOS, BeOS, OS/2, AIX, Amiga, Atari, SunOS, Solaris, IRIX and
HP-UX, amongst others.</p>

<p>Here is a link to the Open Source <a href="tidy.c">copyright
notice and license</a>.</p>

<dl>
<dt><a href="../tidy4aug00.tgz">tidy4aug00.tgz</a></dt>

<dd>gzipped tar file for source code (Unix line ends)</dd>

<dt><a href="../tidy4aug00.zip">tidy4aug00.zip</a></dt>

<dd>zipped source code (Windows line ends)</dd>

<dt><a href="platform.h">platform.h</a>, <a
href="html.h">html.h</a></dt>

<dd>the include files with common definitions</dd>

<dt><a href="config.c">config.c</a></dt>

<dd>support for customizing Tidy via config files</dd>

<dt><a href="lexer.c">lexer.c</a></dt>

<dd>lexical analysis and buffer management</dd>

<dt><a href="parser.c">parser.c</a></dt>

<dd>HTML and XML parsers</dd>

<dt><a href="tags.c">tags.c</a></dt>

<dd>dictionary of tags and their properties</dd>

<dt><a href="attrs.c">attrs.c</a></dt>

<dd>dictionary of attributes and their properties</dd>

<dt><a href="istack.c">istack.c</a></dt>

<dd>stack of active inline elements</dd>

<dt><a href="entities.c">entities.c</a></dt>

<dd>dictionary of entities</dd>

<dt><a href="clean.c">clean.c</a></dt>

<dd>smarts for cleaning up presentational markup</dd>

<dt><a href="pprint.c">pprint.c</a></dt>

<dd>pretty printing for HTML and XML</dd>

<dt><a href="localize.c">localize.c</a></dt>

<dd>Change this file to localize tidy's messages</dd>

<dt><a href="tidy.c">tidy.c</a></dt>

<dd>main() and error reporting routines</dd>

<dt><a href="Makefile">Makefile</a></dt>

<dd>Makefile for gcc</dd>

<dt><a href="man_page.txt">Unix Man page</a></dt>

<dd>Maintained by <NAME> &lt;<EMAIL>&gt;</dd>
</dl>

<p>Conventions for whether lines end with CRLF, LF or CR vary
from one system to another. I have included the C source for a
utility <b>tab2space</b> which can be used to ensure that files
use the line end convention of your choice, and to expand tabs to
spaces.</p>

<pre>
   tab2space -t4 -unix *.h *.c
   tab2space -tabs -unix Makefile
</pre>

<p>Note use of "-tabs" to ensure that tabs are preserved in the
Makefile (it won't work without them!).</p>

<p>For those of you on Unix, here is a script you can use to
strip carriage returns:</p>

<pre>
#!/bin/sh
echo Stripping Carriage Returns from files...
for i
do
        # If a writable file
        if [ -f $i ]
        then
                if [ -w $i ]
                then
                        echo $i
                        # strip CRs from input and output to temp file
                        tr -d '\015' &lt; $i &gt; toix.tmp
                        mv toix.tmp $i
                else
                        echo $i: write-protected
                fi
        else
                echo $i: not a file
        fi
done
</pre>

<p>Save this script to a file, e.g. "<em>scripcr</em>" and use
"<em>chmod +x stripcr</em>" to make it executable. You can then
run it as "<em>stripcr *.c *.h Overview.html Makefile</em>"</p>

<h2><a id="acks" name="acks">Acknowledgements</a></h2>

<p>I would like to thank the many people who have written to me
with suggestions for improvements or reporting bugs. Your help
has been invaluable.</p>

<blockquote class="people"><NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>&#233;
F&#228;rber, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, L&#233;<NAME>, <NAME>, <NAME>, <NAME>&#228;iki&#246;, <NAME>,
Johann-<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
Gert-<NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, Paul
Ossenbruggen, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>&#252;ler, Klaus
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, Lo&#239;<NAME>&#233;gan,
<NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME></blockquote>

<h3><a id="address" name="address">Dave's Address</a></h3>

<pre>
    73b Ground Corner
    Holt
    Wiltshire
    BA14 6RT
    United Kingdom
</pre>

<p><small><a href="http://www.w3.org/People/Raggett">Dave
Raggett</a> &lt;<a href="mailto:<EMAIL>">dsr<EMAIL></a>&gt; is
an engineer from <a href="http://www.hp.com/">Hewlett
Packard</a>'s <a href="http://www.hpl.hp.co.uk">UK
Laboratories</a>, and works on assignment to the World Wide Web
Consortium, where he is the W3C lead for HTML, XForms and Voice
Browsers and Math.</small></p>
</body>
</html>



<|start_filename|>Support/Externals/tidy/htmldoc/release-notes.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<title>HTML TIDY - Release Notes</title>
<meta name="keywords"
content="HTML, validation, error correction, pretty-printing" />
<meta name="author" content="<NAME> &lt;<EMAIL>&gt;" />
<style type="text/css">
  body { 
    margin-left: 10%; 
    margin-right: 10%; 
    font-family: sans-serif
  }
  h1 { margin-left: -8% }
  h2,h3,h4,h5,h6 { margin-left: -4% }
  pre { color: green; font-weight: bold;
   font-size: 80%; font-family: monospace}
  em { font-style: italic; font-weight: bold }
  strong { text-transform: uppercase; font-weight: bold }
  .note {font-style: italic; color: rgb(192, 101, 101) }
  //hr {text-align: center; width: 60% }
  blockquote {
    color: navy;
    margin-left: 1%;
    margin-right: 1%;
    text-align: center;
    font-family: "Comic Sans MS", "Times New Roman", serif
  }
  table {
    font-family: sans-serif;
    font-size: 80%;
    background: rgb(255,255,153)
  }
  td {
    font-size: 80%
  }
  .people {font-family: "Lucida Calligraphy", serif}
  :link { color: rgb(0, 0, 153) }
  :visited { color: rgb(153, 0, 153) }
  :active { color: rgb(255, 0, 102) }
  a :hover { color: rgb(0, 0, 255) }
</style>

<style type="text/css">
 p.c1 {font-style: italic}
</style>
</head>
<body bgcolor="#FFFFFF" background="grid.gif" text="black"
link="navy" vlink="black" alink="red">
<h1>HTML TIDY - Release Notes</h1>

<p><a href="http://www.w3.org/People/Raggett"><NAME></a> <a
href="mailto:<EMAIL>"><EMAIL></a></p>

<h4>Public Email List for Tidy: &lt;<a
href="mailto:<EMAIL>"><EMAIL></a>&gt;</h4>

<p>I have set up an archived mailing list devoted to Tidy. To
subscribe send an email to <EMAIL> with the word
subscribe in the subject line (include the word unsubscribe if
you want to unsubscribe). The <a
href="http://lists.w3.org/Archives/Public/html-tidy/">archive</a>
for this list is accessible online. Please use this list to
report errors or enhancement requests.</p>

<h3>Things awaiting further attention</h3>

<p>These have been moved to the <a href="pending.html">pending
page</a>, which includes all the suggestions for improvements and
bug fixes. I am looking for volunteers to help with these as my
current workload means that I don't get much time left to work on
HTML Tidy.</p>

<h2>August 2000</h2>

<p><NAME> comments that the "appears to" message is
confusing when it differs from the doctype declaration. Perhaps
it would make sense to also report the doctype? Tidy will now
report the FPI when present, and then the apparent version as
deduced from the elements and attributes present in the rest of
the document.</p>

<p><NAME> sent in an example which featured a script
element in a frameset document where the script element appears
after the head and before the frameset. This is I believe
illegal, but Tidy proceeds to do the dumb thing discarding the
frameset element! I think it should move the script element into
the head and continue. This is now implemented.</p>

<p><NAME> says that Tidy doesn't know about the HTML4 char
attribute for col elements. Now fixed.</p>

<p><NAME> would like Tidy to detect all cases of
repeated attributes, e.g. repeated valign in table cells. This
was introduced a few releases back, but I forgot to apply this
check for the elements with special purpose attribute checking
methods. Now fixed. Tidy will issue a warning for each repeated
attribute. In principle Tidy could merge repeated class
attributes, but this will require more work. My apologies to
<NAME> for not having the time to do this now.</p>

<p><NAME> would like an option to suppress whitespace
munging on selected attributes used for legacy scripts passed as
parameters to plugins. I have added a new boolean option
"literal-attributes" which can be set to yes to preserve
whitespace within attribute values. A better solution would be to
make this selectable on a per element basis, but I don't have
time to explore this now.</p>

<p><NAME> spotted that Tidy always removed newlines
immediately after start tags even for empty elements such as img.
An exception to this rule is the br element. Now fixed.</p>

<h2>July 2000</h2>

<p><NAME> sent me an example, where Tidy was inadvertently
wrapping lines after an image element. The problem was a
conditional in pprint.c, now fixed.</p>

<p><NAME> offered a bug fix for the AddClass() function in
clean.c. My thanks to <NAME> for bringing this to my
attention. <NAME> reported a problem with the -f option. I
discovered a bug in line 898 in tidy.c, now fixed.</p>

<h2>June 2000</h2>

<p>Fixed bug in NormalizeSpaces (== in place of =) on line
1699.</p>

<p>I have added a new config option "gnu-emacs" following a
suggestion by <NAME>. The option changes the way errors
and warnings are reported to make them easier for Emacs to
parse.</p>

<p><NAME> noticed that Tidy didn't know that width and
height attributes on the img element aren't allowed in HTML 2.0.
He also noted that Tidy didn't know that HTML 2.0 allows img as a
direct child of body. Both of these bugs are now fixed.</p>

<p>I have refined CanPrune() to block pruning empty elements with
if they have id or name attributes. Previously any attribute
would prevent an empty element from being pruned. The rationale
is that such empty elements are placed there to be filled
dynamically by a script. This is unlikely to occur unless the
element can be referenced via id or name.</p>

<p><NAME> sent in details patches that suppresses numerous
warnings when compiling tidy, especially:</p>

<ul>
<li>`static' declaration of subroutines when possible</li>

<li>initialization of variables when it might be used before
assignment</li>

<li>change name of local variables when it overrides global ones
(count, index, fp)</li>

<li>suppression of long jump, buffers are closed in
FatalError</li>
</ul>

<p>Fixed memory leak in CoerceNode. My thanks to <NAME>
for spotting this. <NAME> asked if Tidy could give
improved detection of spurious &lt;/ in script elements. Now
done.</p>

<p>My thanks to <NAME> who pointed out that Tidy wasn't
complaining about src attributes on hr elements. My thanks to
<NAME> who spotted that Tidy didn't know about
the Netscape wrap attribute for the text area element.</p>

<p><NAME> has contributed a perl wrapper for calling
Tidy from your perl scripts, see <a
href="sl-tidy.pl">sl-tidy.pl</a>.</p>

<p><NAME> would like comments that end with a line
break to retain this property when tidied. I have added a new
boolean property to the node structure which is set by the end
comment parser in lexer.c and acted on by the comment formatting
code in pprint.c</p>

<p><NAME> (sp?) reported that XHTML &lt;param\&gt; elements
were being discarded. This was due to an error in ParseBlock, now
fixed.</p>

<p><NAME> noted that Tidy doesn't complain if there are
two or more title elements. Tidy will now complain if there are
more than one title element or more than one base element.</p>

<h2>May 2000</h2>

<p>Following a suggestion by <NAME>, I have added an
option to add xml:space="preserve" to elements such as pre, style
and script when generating XML. This is needed if these elements
are to be correctly parsed without access to the DTD.</p>

<h2>April 2000</h2>

<p><NAME> notes that IsValidAttribute() wasn't checking that
the first character in an attribute name is a letter. Now
fixed.</p>

<p><NAME> wants the naked li style hack made into an
option or at least tweaked to work in IE and Opera as well as
Navigator. Sadly, even Navigator 6 preview 1 replicates the buggy
CSS support for lists found in Navigator 4. Neither Navigator 6
nor IE5 (win32) supports the CSS marker-offset property, and so
far I have been unable to find a safe way to replicate the visual
rendering of naked li elements (ones without an enclosing ul or
ol element). As a result I have opted for the safer approach of
adding a class value to the generated ul element
(class="noindent") to keep track of which li's weren't properly
enclosed.</p>

<p><NAME> would like to be able to use quote marks around
file names which include spaces, when specifying files in the
config file. Currently, this only effects the "error-file"
option. I have changed that to use ParseString. You can specify
error files with spaces in their names.</p>

<p><NAME> would like tidy to avoid pruning empty span
elements when these have id attributes, e.g. for use in setting
the content later via the DOM. Done.</p>

<p>I have modified GetToken() to switch mode from
IgnoreWhitespace to MixedContent when encountering non-white
textual content. This solves a problem noticed by Murray
Longmore, where Tidy was swallowing white space before an end
tag, when the text is the first child of the body element.</p>

<p>Tidy needs to check for text as direct child of blockquote
etc. which isn't allowed in HTML 4 strict. This could be
implemented as a special check which or's in transitional into
the version vector when appropriate.</p>

<p>ParseBlock now recognizes that text isn't allowed directly in
the block content model for HTML strict. Furthermore, following a
suggestion by <NAME>, a new option enclose-block-text has
the same effect as enclose-text but also applies to any block
element that allows mixed content for HTML transitional but not
HTML strict.</p>

<p><NAME> noted that Tidy didn't realise the width and
height attribute aren't allowed on table cells in HTML strict
(it's fine on HTML transitional). This is now fixed. Nigel
Wadsworth wanted border on table without a value to be mapped
into border="1". Tidy already does this but only if the output is
XHTML.</p>

<p><NAME> wanted Tidy to check that a link to a external
style sheet includes a type attribute. This is now done. He also
suggested extending the clean operation to migrate presentation
attributes on body to style rules. Done.</p>

<h2>March 2000</h2>

<p>I have been working on improving the Word2000 cleanup, but
have yet to figure out foolproof rules of thumb for recognizing
when paragraphs should be included as part of ul or ol lists.
Tidy recognizes the class "MsoListBullet" which Word seems to
derive from the Word style named "List Bullet". I have yet to
deal with nested lists in Word2000. This is something I was able
to deal with for html exported from Word97, but it looks like
being significantly harder to deal with for Word2000.</p>

<p>Tidy is now able to create a pre element for paragraphs with
the style "Code". So try to use this style in your Word documents
for preformatted text. Tidy strips out the p tags and coerces
non-breaking spaces to regular spaces when assembling the pre
element's content.</p>

<p>I would very much welcome any suggestions on how to make the
Word2000 clean up work better!</p>

<p>Changed Style2Rule() in clean.c to check for an existing class
attribute, and to append the new class after a space. Previously
you got two class attributes which is an error</p>

<p>Changed default for add-xml-pi to no since this was causing
serious problems for several browsers.</p>

<p><NAME> notes that tidy crashes on ASP when used for
attributes. The problem turned out to be caused by
CheckUniqueAttribute() which was being inappropriate apply to ASP
nodes.</p>

<p><NAME> noted that Tidy didn't know about Microsoft's data
binding feature. I have added the corresponding attributes to the
table in attr.c and tweaked CanPrune() so that empty elements
aren't deleted if they have attributes.</p>

<p>Tidy is now more sophistocated about how it treats nested
&lt;b&gt;'s etc. It will prune redundant tags as needed. One
difficulty is in knowing whether a start tag is a typo and should
have been an end-tag or whether it starts a nested element. I
can't think of a hard and fast rule for this. Tidy will coerce a
&lt;b&gt; to &lt;/b&gt; except when it is directly after a
preceding &lt;b&gt;.</p>

<p><NAME> noted that Tidy lost &lt;frame/&gt;
elements. This has now been fixed with a patch to
ParseFrameSet.</p>

<h2>February 2000</h2>

<p><NAME> spotted an error in pprint.c which allowed some
attributes to be wrapped even when wrap-attributes was set to no.
On a separate point, I have now added a check to issue a warning
if SYSTEM, PUBLIC, //W3C, //DTD or //EN are not in upper
case.</p>

<p>Tidy now realises that inline content and text is not allowed
as a direct child of body in HTML strict.</p>

<p><NAME> also noticed that Tidy was preferring HTML 4.0 to
4.01 when doctype is set to strict or transitional, since the
entries for 4.0 appeared earlier than those for 4.01 in the table
named W3C_Version in lexer.c. I have reversed the order of the
entries to correct this. Dave also spotted that ParseString() in
config.c is erroneously calling NextProperty() even though it has
already reached the end of the line.</p>

<h2>January 2000</h2>

<p>I have added a new function ApparentVersion() which takes the
doctype into account as well as other clues. This is now used to
report the apparent version of the html in use.</p>

<p>Thanks to the encouragement of <NAME>, I finally got
around to deal with the extra bracketing needed to quiet gcc
-Wall. This involved the initialization of the tag, attribute and
entity tables, and miscellaneous side-effecting while and for
loops.</p>

<p>PPrintXMLTree has been updated so that it only inserts line
breaks after start tags and before end tags for elements without
mixed content. This brings Tidy into line with current wisdom for
XML editors. My thanks to <NAME> for suggesting a fix
to FindTag that ensures that Tidy doesn't mistreat elements
looking like html.</p>

<p>&lt;table border&gt; is now converted to
&lt;table&#160;border="1"&gt; when converting to XHTML.</p>

<p>I have added support for CDATA marked sections which are
passed through without change, e.g.</p>

<pre>
&lt;![CDATA[ .. markup here has no effect .. ]]&gt;
</pre>

<p>A number of people were interested in Tidied documents be
marked as such using a meta element. Tidy will now add the
following to the head if not already present:</p>

<pre>
&lt;meta name="generator" content="HTML Tidy, see www.w3.org"&gt;
</pre>

<p>If you don't want this added, set the option tidy-mark to
no.</p>

<p>In the January 12th release, ParseXMLElement screwed up on
doctypes and toplevel comments, causing a memory exception. This
has now been fixed. PPrintXMLTree now uses zero indent for
comments to avoid progressive indentation as an XML document is
repeatedly tidied. I have added a blank line after elements
unless they are the last in the parent's content.</p>

<p><NAME> reports that Tidy didn't realise that HTML4 allows
the object element in the document head. Now fixed. Rainer
Gutsche noticed that Tidy wasn't moving an initial space after a
anchor start tag to just before the element. I have streamlined
the trimming of spaces.</p>

<p><NAME> spotted that newly declared preformatted tags
weren't being treated as such for XML documents. Now fixed.</p>

<h2>December 1999</h2>

<p>Tidy now generates the XHTML namespace and system identifier
as specified by the current <a
href="http://www.w3.org/TR/xhtml1/">XHTML Proposed
Recommendation</a>. In addition it now assumes the latest version
of HTML4 - HTML 4.01. This fixes an omission in 4.0 by adding the
name attribute to the img and form elements. This means that
documents with rollovers and smart forms will now validate!</p>

<p><NAME> noticed that Tidy was missing off the xhtml-
prefix for the XHTML DTD file names in the system identifier on
the doctype. This was a recent change to XHTML. I have fixed
lexer.c to deal with this.</p>

<p>This release adds support for <a
href="http://developer.netscape.com/viewsource/schroder_template/schroder_template.html">
JSTE</a> psuedo elements looking like: &lt;#&#160;#&gt;. Note
that Tidy can't distinguish between ASP and JSTE for psuedo
elements looking like: &lt;%&#160;%&gt;. Line wrapping of this
syntax is inhibited by setting either the wrap-asp or wrap-jste
options to no.</p>

<p>Thanks to <NAME>, The Win32 executable for tidy is
now able to example wild cards in filenames. This utilizes the
setargv library supplied with VC++.</p>

<p><NAME> asked for the hashtables to be cleared when
emptied to avoid problems when running Tidy a second time, when
Tidy is embedded in other code. I have applied this to
FreeEntities(), FreeAttrTable(), FreeConfig(), and
FreeTags().</p>

<p><NAME> spotted that Tidy wasn't deleting inline emphasis
elements when these only contained whitespace (other than
non-breaking spaces). This was due to an oversight in the
CanPrune() function, now fixed.</p>

<p><NAME> spotted some bugs in if statements and provided
some sample html files that caused Tidy to crash. On further
study, I found a bug in the code that moves font elements inside
anchors. I have fixed this and added a new method to test the
tree for internal consistency in its bidirectional links:
CheckNodeIntegrity().</p>

<p>I have also refined the code for handling noframes to make it
more robust. It will now handle noframes within a body within a
noframes etc. (something permitted by HTML4). It will also
recover if the noframes end tag is missing or is in the wrong
place.</p>

<p>I have fleshed out the table for mapping characters in the
Windows Western character set into Unicode, see Win2Unicode[].
Yahoo was, for example, using the Windows Western character for
bullet, which is in Unicode is U+2022.</p>

<p><NAME> noticed that applets without any content
between the start and end tags were being pruned by Tidy. This is
a bug and has now been fixed.</p>

<p>I have changed the way Tidy handles empty paragraphs when the
drop-empty-paras is set to no. HTML4 doesn't allow empty
paragraphs so I am now replacing them by a pair of br elements,
so that the formatting is preserved. When drop-empty-paras is set
to yes, empty paragraphs are simply removed.</p>

<p><NAME> asked for a way to suppress fixing up of
comments when these include adjacent hyphens since this was
screwing up C<NAME>usion's special comment syntax. The new option
is called: <i>fix-bad-comments</i> and defaults to yes.</p>

<p>Using Michel's examples I have improved the way the table
parser deals with unexpected content. This is now consistently
moved before the table, or to the head element as appropriate.
Microsoft and Netscape differ in how an unclosed blockquote
renders when found at the table or tr level. Netscape indents the
table but Microsoft does not. This is getting too tricky for me
to deal with!</p>

<p>Using a sample page from Yahoo, I discovered that Netscape
Navigator doesn't implement the text-align style property on tr
or table elements. As a result I have added a special check for
this in BlockStyle() to avoid translating the align attribute on
tr or table into a style rule.</p>

<p><NAME> would like to be able to map b/i to
strong/em without the full clean process being invoked. I have
therefore decoupled these two options. Note that setting
logical-emphasis is also decoupled from drop-font-tags.</p>

<h2>30th November 1999</h2>

<p>This is an interim release to provide a bug fix for a bug
introduced earlier in the month. I have fixed a bug in the
emphasis code which looks for start tags Which are most likely
intended as end tags. This bug only appeared in the November
release and could cause a crash or indefinite looping. My thanks
to a respondent calling himself "Michael" who provided a
collection of files that allowed me to track this down.</p>

<p>I have also added page transition effects for the slide maker
feature. The effects are currently only visible on IE4 and above,
and take advantage of the meta element. I will provide an option
to select between a range of transition effects in the next
release.</p>

<h2>November 1999</h2>

<p><NAME> found a case causing Tidy to loop indefinitely.
The problem occurred when a blocklevel element is found within a
list item that isn't enclosed in a ul or ol element. I have added
a check to ParseList to prevent this.</p>

<p>Takuya Asada tells me that in Raw mode Tidy is incorrectly
mapping 0xA0 to the entity &#160; causing problems for Shift_JIS
etc. Now fixed. <NAME> reported a problem with ParseConfig
when one of the arguments was null. I have added a check for
this.</p>

<p><NAME> notes that Tidy issues a warning for noframes
elements without a body element. HTML4 is defined so that the
content of the noframes element is restricted to a single body
element. However, it also allows you to omit the start and end
tags for body, something that isn't allowed for XHTML. I have
changed the code to only issue the warning when generating
XML.</p>

<p>Added new --version or -v option that reports the release date
to the error stream. ParseConfig() now returns false if it
doesn't use the parameter. This avoids the next argument on the
command line from being swallowed inadvertently, e.g. for unknown
options. Tidy now warns about unrecognized options.</p>

<p>I have revised the way Tidy deals with comments to avoid
problems with repeated hyphens. First "--" is illegal in XML, and
second, the comment syntax for SGML is very error prone when it
comes to when and where you can use hyphens. As a result, Tidy
will now replace repeated hyphens with "=" characters. My thanks
to <NAME> and <NAME> for their input on this.</p>

<p>Emphasis start tags will now be coerced to end tags when the
corresponding element is already open. For instance
&lt;u&gt;...&lt;u&gt;. This behavior doesn't apply to font tags
or start tags with attributes. My thanks to <NAME> for
suggesting this idea.</p>

<p><NAME> would like Tidy to warn when the same attribute
appears more than once in the same element. This is an error for
both SGML and XML. The best way to make this check would be to
sort the attributes and look for duplicate entries. Other people
have asked for the attributes to be sorted, but I need further
input on the appropriate sort order. As an interim solution, Tidy
uses a simple test which generates n+1 warnings if an attribute
is repeated n times.</p>

<h2>October 1999</h2>

<p>On Unix systems you can get Tidy to look for a config file in
~/.tidyrc or ~your/.tidyrc etc. when the HTML_TIDY environment
variable isn't set. To enable this feature don't forget to
uncomment SUPPORT_GETPWNAM in the platform.h file. This feature
won't work on Windows. My thanks to <NAME> who contributed
the code.</p>

<p><NAME> reports that Cold Fusion uses the following
syntax:</p>

<pre>
&lt;CFIF True IS True&gt;
   This should always be output 
&lt;CFELSE&gt;
   This will never output 
&lt;/CFIF&gt;
</pre>

<p>After declaring the CFIF tag in the config file, Tidy was
screwing up the Cold Fusion expression syntax, mapping 'True' to
'True=""' etc. My fix was to leave such pseudo attributes
untouched if they occur on user defined elements.</p>

<p><NAME> noticed that Tidy wasn't adding an id attribute
to the map element when converting to XHTML. I have added
routines to do this for both 'a' and 'map'. The value of the id
attribute is taken from the name attribute.</p>

<p><NAME> noted that Tidy is now screwing up on option
elements. This proved to be a recently introduced error, which I
have now fixed. <NAME> forwarded an example that caused
Tidy to loop endlessly. The problem was caused by an ol start tag
followed by a b start tag and then an li element. I have solved
the problem with a fix to ParseBlock.</p>

<p>I have revised the way Tidy deals with unexpected content in
lists. Tidy now wraps such content in list items with the style
attribute set to "list-style: none" to suppress list bullets. If
an li element is found unexpectedly in the body or block-level
content, it is wrapped into a ul element with the style attribute
set to "margin-left: -2em". This provides a closer match to the
observed rendering on current browsers. I use a couple of
postprocessing steps (List2BQ and BQ2Div) to further clean this
up to use div elements. My thanks to <NAME> for sending
me a challenging example that led me to this solution.</p>

<p>A number of people have asked for a config option to set the
alt attribute for images when missing. The alt-text property can
now be used for this purpose. Please note that YOU are
responsible for making your documents accessible to people who
can't view the images!</p>

<p><NAME> spotted a bug in ParseConfigFile() that prevented
Tidy from parsing more that one file. This has been fixed by
setting the char buffer to zero in the call to InitConfig()
before parsing. Terry also noted a few places where I had slipped
back into using malloc and free rather than MemAlloc and MemFree,
now fixed.</p>

<p><NAME> notes that the September 27th release mapped
empty paragraphs to br elements, which introduces extra
whitespace in IE and Navigator. The former behavior to strip
empty paragraphs is as per HTML4 and works fine on most browsers
with the exception of Lynx. I have reverted to stripping empty
P's, but have added an option to leave them alone.</p>

<p>Bjoern also drew my attention to a bug in the September
release where table content is lacking a preceding td or th start
tag. Tidy moves such content to before the table element to match
the observed rendering. This is now working as planned. I have
tweaked the printing behavior when the omit end tags option is
set. It now omits the &lt;/html&gt; as well as the optional start
tags for html, head and body.</p>

<p><NAME> had problems with the contents of the option
element being discarded. I was unable to reproduce this problem,
but did notice that I unintentionally preserving newlines within
option text. This is now fixed. <NAME> spotted that
table cells containing a single font element, when cleaned
dropped the font element without getting the corresponding style.
Now fixed via a tweak to InlineStyle().</p>

<p><NAME> wanted Tidy to do a better job on font elements
with relative size changes. This is in fact rather tricky.
Currently, Tidy uses percentage scaling values for fonts rather
than the enumeration defined by CSS [xx-small | x-small | small |
medium | large | x-large | xx-large]. The first problem is to
match these 7 values onto the 6 define by the font element. The
next problem is caused by the fact that CSS doesn't provide
matching relative font size values that you could match to the
ones defined for the font element. I have done my best using
percentage values, base on tests with IE and Navigator. If anyone
can come up with a better approach, please let me know.</p>

<p><NAME> reported a problem when quote-marks was set to yes.
Using his test file everything is now working fine. Several
people asked for a way to turn off line wrapping. Tidy will now
interpret zero as meaning disable wrapping. <NAME>
wants to include some tcl code in his XML markup and asks for a
way define new tags that behave in the same way as HTML's pre
element. The new option is new-pre-tags.</p>

<h2>September 1999</h2>

<p>Tidy will now add a type attribute to the style and script
attributes when this is missing. Tidy examines the language
attribute to determine what media type to use. I have also added
code to create an id attribute for anchors when a name attribute
is present, and to report a warning if id and name don't
match.</p>

<p>Added support for cleaning up HTML generated by Microsoft Word
2000 when you save as "Web Page". When you set "word-2000: yes"
Tidy makes a Herculean effort to clean up the mess created when
Word 2000 exports to HTML. Word bulks out HTML with presentation
information that allows it to round-trip documents between HTML
and Word without lost of information. This makes the HTML hard to
edit and can cause some very popular browsers to crash! I haven't
dealt with the VML markup Word uses for line drawings.</p>

<p>Applied fix to InsertNodeAfterElement() to set
node-&gt;next-&gt;prev. My thanks to "Advocate" for this. This
was only encountered when dealing with PRE tags containing
content illegal for PRE. (Called twice by ParsePre to move
illegal PRE content to be a later sibling of PRE, then open PRE
again afterward)</p>

<p>Change to table row parser so that when Tidy comes across an
empty row, it inserts an empty cell rather than deleting it. This
is consistent with browser behavior and avoids problems with
cells that span rows.</p>

<p>Baruch Even sent extensive patches for improved support for
the PHP preprocessing psuedo tags. You can now use the 'wrap-php:
no' to suppress line wrapping within PHP instructions. In the
process of this work, I have created a new function InsertMisc()
for dealing with comments, processing instructions, ASP and
PHP.</p>

<p>I have update the table of tags to include additional
proprietary tags such as server, ilayer, layer, nolayer and
multicol. Using patches sent in by <NAME>, Tidy now offers a
quiet mode which suppresses the initial welcome message and the
summary report on the number of errors or warnings. <NAME> sent in patches to allow config options normally set in
the config file to be set on the command line, by preceding them
with a "--" (no intervening space), for example:</p>

<pre>
  tidy --break-before-br true --show-warnings false
</pre>

<p><NAME> discovered that Tidy looped indefinitely for
examples similar to the following:</p>

<pre>
&lt;font size=+2&gt;Title
&lt;ol&gt;
&lt;/font&gt;Text
&lt;/ol&gt;
</pre>

<p>I have now cured this problem which used to occur when a
&lt;/font&gt; tag was placed at the beginning of a list element.
If the example included a list item before the &lt;/ol&gt; Tidy
will now create the following markup:</p>

<pre>
&lt;font size=+2&gt;Title&lt;/font&gt;
&lt;blockquote&gt;Text &lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;list item&lt;/li&gt;
&lt;/ol&gt;
</pre>

<p>This uses blockquote to indent the text without the
bullet/number and switches back to the ol list for the first true
list item.</p>

<p>I have worked hard to improve support for server side
preprocessing instructions such as ASP, PHP and Tango. Tidy now
allows you to replace attribute values by such instructions and
is able to fix up the case where the instruction appears without
delimiting quote marks. Tidy supports ASP and PHP in element
content and also in place of attribute value pairs. Support for
Tango is limited to attribute values only.</p>

<p><NAME>-Jensen contribute a table for mapping the MacRoman
character set into Unicode. I have added a new charset option
"mac" to support this. Note the translation is one way and
doesn't convert back to the Mac codes on output.</p>

<p>Some people place &lt;p&gt; at the end of their list items to
introduce whitespace before the next item. I have modified
TrimEmptyElement to coerce empty p elements to br elements to
reproduce this rendering. If a p start tag is found in dt
elements, I now coerce the p to a br. Satwinder Mangat has
alerted me to several such problems. First, text as a direct
child of dl should be wrapped in a dt and not a dd element.
Second, unlike other inline tags, browser only close anchors on a
anchor start or end tag. Actually Navigator and IE differ in how
they handle this. Try the following example:</p>

<pre>
&lt;p&gt;&lt;b&gt;&lt;a href=foo&gt;some text&lt;/i&gt; which should be in the label&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;next para and guess what the emphasis will be?&lt;/p&gt;
</pre>

<p>Navigator 4 renders the second paragraph in normal text while
IE renders it in bold. If you substitute &lt;a&gt; for the
&lt;/i&gt;, once again the browsers differ. IE stops underlining
at the &lt;a&gt; text while Navigator continues until the
&lt;/a&gt;, although it realizes that you can't click there.</p>

<p>Satwinder continues: browsers happily interpret center within
a heading. Tidy now moves the center element to be the parent of
the rest of the heading, splitting it as needed, rather than
prematurely ending the heading. The same applies to a div element
within a heading. Satwinder notes that Tidy inserts a ul when an
li is encountered as a direct child of body.</p>

<p>This is a case where you can't produce a legal HTML file that
renders the same way as browsers handle this. The same applies to
a dt or dd element without an enclosing dl element. I can report
that W3C's HTML working group was unwilling to bless naked li's
etc. A similar problem arises for dt elements when they contain
hr, center or div. The specs say this is illegal, but browsers
render it fine!</p>

<p>I have done my best for hr, splitting the dt as needed and
enclosing the hr within a dd. The hr doesn't look the same,
sadly, as it now starts at the left margin for the dd'st rather
than the left margin for dt's. I wasn't sure how to deal with
center and div within dt, and chose to discard them.</p>

<p>&lt;/br&gt; is now mapped to &lt;br&gt; to match observed
browser rendering. On the same basis, an unmatched &lt;/p&gt; is
mapped to &lt;br&gt;&lt;br&gt;. This should improve fidelity of
tidied files to the original rendering, subject to the
limitations in the HTML standards described above.</p>

<p><NAME> spotted that Tidy was swallowing the first and
last spaces within inline elements when in a pre element. Now
fixed. <NAME> spotted that Tidy didn't know that the tags
s, strike and u weren't allowed in HTML4 strict. I have now fixed
this.</p>

<p>Tidy now preserves the last modified time for the files it
writes back to. This was introduced on the suggestion of
Ren&#233; Fritz, who uses the SiteCopy utility to upload recently
modified files to his Web server. By preserving file timestamps
Tidy can be used on all files in a directory without impacting
which ones will be uploaded, the next time SiteCopy runs. This is
implemented using the fstat and futime system calls. If your
platform doesn't support these calls, set PRESERVEFILETIMES to 0
in platform.h</p>

<p>I have fixed a bug on lexer.c which screwed up the removal of
doctype elements. This bug was associated with the symptom of
printing an indefinite number of doctype elements.</p>

<h2>August 1999</h2>

<p>Added lowsrc and bgproperties attributes to attribute table.
<NAME> tells me that bgproperties="fixed" on the body elements
causes NS and IE to fix the background relative to the window
rather that the document's content.</p>

<p><NAME> kindly drew my attention to several bugs
discovered by other people: My thanks to <NAME> for
discovering a bug when an unexpected inline end-tag is found in a
ul or ol element. I have added new code to ParseList in parser.c
to pop the inline stack and discard the end tag. I am checking to
see whether a similar problem occurs elsewhere. Randy also
discovered a bug (now fixed) in TrimInitialSpace() in parser.c
which caused it to fail when the element was the first in the
content. <NAME> found that comments cause problems in table
row group elements such as tbody. I have fixed this oversight in
this release.</p>

<p><NAME> tells me that bgsound is only allowed in the
head and not in the body, according to the Microsoft
documentation. I have therefore updated the entry in tags.c. The
slide generation feature caused an exception when the original
document didn't include a document type declaration. The fix
involve setting the link to the parent node when creating the
doctype node.</p>

<h2>26th July 1999</h2>

<p><NAME> reported a bug in FixDocType in lexer.c which
caused tidy to corrupt the parse tree, leading to an infinite
loop. I independently spotted this and fixed it. Justin
Farnsworth spotted that Tidy wasn't handling XML processing
instructions which end in ?&gt; rather than just &gt; as
specified by SGML. I have added a new option:
assume-xml-procins:&#160;yes which when set to yes expects the
XML style of processing instruction. It defaults to no, but is
automatically set to yes for XML input. Justin notes that the XML
PIs are used for a server preprocessor format called PHP, which
will now be easy to handle with Tidy. <NAME>'s mail
prompted me to make sure that the contents of processing
instructions are treated as CDATA so that &lt; and &gt; etc. are
passed through unescaped.</p>

<p><NAME> asks for Tidy to support another server
preprocessor format called Tango which features syntax such
as:</p>

<pre>
&lt;b&gt;&lt;@include &lt;@cgi&gt;&lt;appfilepath&gt;includes/message.html&gt;&lt;/b&gt;
</pre>

<p>I don't have time to add support for Tango in this release,
but would be happy if someone else were to mail in appropriate
changes. <NAME> reports problems when using DOS on
Win98. I am using Win95 and have been unable to reproduce the
problem. <NAME> notes that Tidy doesn't support XML
document type subset declarations. This is a documented
shortcoming and needs to be fixed in the not too distant future.
Tidy focuses on HTML, so this hasn't been a priority todate.</p>

<p><NAME> asks for an optional feature for mapping IP
addresses to DNS hostnames and back again in URLs. Sadly, I don't
expect to be able to do this for quite a while. Adding network
support to Tidy would also allow it to check for bad URLs.</p>

<p><NAME> reports that Tidy's behavior when finding a ul
element when it expects an li start tag doesn't match Netscape or
IE. I have confirmed this and have changed the code for parsing
lists to append misplaced lists to the end of the previous list
item. If a new list is found in place of the first list item, I
now place it into a blockquote and move it before the start of
the current list, so as to preserve the intended rendering.</p>

<p>I have added a new option - enclose-text which encloses any
text it finds at the body level within p elements. This is very
useful for curing problems with the margins when applying style
sheets.</p>

<h2>9th July 1999</h2>

<p>Added bgsound to tags.c. Added '_' to definition of namechars
to match html4.decl. My thanks to <NAME> for spotting
this.</p>

<p><NAME> asked for the clean option to be automatically
set when the drop-font-tags option is set. Jelks also notes that
a lot of the authoring tools automatically generate, for example,
&lt;I&gt; and &lt;B&gt; in place of &lt;em&gt; and &lt;strong&gt;
(MS FrontPage 98 generated the latter, but FP2000 has reverted to
the former - with no option to change or set it). Jelks suggested
adding a general tag substitution mechanism. As a simpler measure
for now, I have added a new property called logical-emphasis to
the config file for replacing i by em and b by strong.</p>

<h2>7th July 1999</h2>

<p>Fixed recent bug with escaping ampersands and plugged memory
leaks following Terry Teagues suggestions. Changed
IsValidAttrName() in lexer.c to test for namechars to allow - and
: in names.</p>

<h2>2nd July 1999</h2>

<p>Chami noticed that the definition for the marquee tag was
wrong. I have fixed the entry in tags.c and Tidy now works fine
on the example he sent. To support mixing MathML with HTML I have
added a new config option for declaring empty inline tags
"new-empty-tags". <NAME> noted that single quote marks
were being silently dropped unless quote marks was set to yes.
This is an unfortunate bug recently introduced and now fixed.</p>

<p><NAME> sent in an example of badly formed tables, where
paragraph elements occurred in table rows without enclosing table
cells. Tidy was handling this by inserting a table cell. After
comparison with Netscape and IE, I have revised the code for
parsing table rows to move unexpected content to just before the
table.</p>

<h2>26th June 1999</h2>

<p><NAME> reports that Tidy incorrectly thinks the table
frame attribute is a transitional feature. Now fixed. Chami
reported a bug in ParseIndent in config.c and that onsumbit is
missing from the table of attributes. Both now fixed. Carsten
Allefeld reports that Tidy doesn't know that the valign attribute
was introduced in HTML 3.2 and is ok in HTML 4.0 strict,
necessitating a trivial change to attrs.c.</p>

<p><NAME> notes that Tidy wasn't checking the preamble for
the DOCTYPE tag matches either "html PUBLIC" or "html SYSTEM".
<NAME> spotted changes needed for Tidy to compile with SGI
MIPSpro C++. All of Bill's changes have been incorporated, except
for the include file "unistd.h" (for the unlink call) which isn't
available on win32. To include this define NEEDS_UNISTD_H</p>

<p><NAME> asked for information on how to use the
result returned by Tidy when it exits. I have included a example
using Perl that Bjoern sent in. <NAME> reported that Tidy gave
misleading warning when title text is emphasized. It now reports
a missing &lt;/title&gt; before any unexpected markup.</p>

<p><NAME> says that many WYSIWYG HTML editors place a font
element around an hypertext link enclosing the anchor element
rather that its contents. Unfortunately, the anchor element then
overrides the color change specified by the font element! I have
added an extra rule to ParseInline to move the font element
inside an anchor when the anchor is the only child of the font
element. Note CSS is a better long term solution, and Tidy can be
used to replace font elements by style rules using the clean
option.</p>

<p><NAME> reported that valign on table cells caused
Tidy to mislabel content as HTML 4.0 transitional rather than
strict. Now fixed. A number of people said they expected the
quote-mark option to apply to all text and not just to attribute
values. I have obliged and changed the option accordingly.</p>

<p>Some people have wondered why "&lt;/" causes an error when
present within scripts. The reason is that this substring is not
permitted by the SGML and XML standards. Tidy now fixes this by
inserting a backslash, changing the substring to "&lt;\/". Note
this is only done for JavaScript and not for other scripting
languages.</p>

<p>Chami reported that onsubmit wasn't recognized by Tidy - now
fixed. <NAME> drew my attention to the fact that script
string literals in attributes weren't being wrapped correctly
when QuoteMarks was set to no. Now fixed. <NAME>
asked for support for the POSIX long options format e.g. --help.
I have modified tidy.c to support this for all the long options.
I have kept support for -help and -clean etc.</p>

<p><NAME> sent in a routine for checking attribute names
don't contain invalid characters, such as commas. I have used
this to avoid spurious attribute/value pairs when a quotemark is
misplaced. <NAME> is interested in wrapping Tidy up as a
Win32 DLL. Darren asked for Tidy to release its memory resources
for the various tables on exit. Now done, see DeInitTidy() in
tidy.c</p>

<p>Darren also asks about the config file mechanism for declaring
additional tags, e.g. <b>new-blocklevel-tags: cfoutput,
cfquery</b> for use with Cold Fusion. You can add inline and
blocklevel elements but as yet you can't add empty elements
(similar to br or hr) or to change the content model for the
table, ul, ol and dl elements. Note that the indent option
applies to new elements in the same way as it does for built-in
elements. Tidy will accept the following:</p>

<pre>
&lt;cfquery name="MyQuery" datasource="Customer"&gt;
 select CustomerName from foo where x &gt; 1
&lt;/cfquery&gt;

&lt;cfoutput query="MyQuery"&gt;
  &lt;table&gt;
    &lt;tr&gt;
    &lt;td&gt;#CustomerName#&lt;/TD&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/cfoutput&gt;
</pre>

<p>but the next example <b>won't</b> since you can't as yet
modify the content model for the table element:</p>

<pre>
&lt;cfquery name="MyQuery" datasource="Customer"&gt;
 select CustomerName from foo where x &gt; 1
&lt;/cfquery&gt;

&lt;table&gt;
  &lt;cfoutput query="MyQuery"&gt;
    &lt;tr&gt;
    &lt;td&gt;#CustomerName#&lt;/TD&gt;
    &lt;/tr&gt;
  &lt;/cfoutput&gt;
&lt;/table&gt;
</pre>

<p>I have been studying richer ways to support modular extensions
to html using assertions and a generalization of regular
expressions to trees. This work has led a tool for generating
DTDs named <b>dtdgen</b> and I am in the process of creating a
further tool for verification. More information is available in
my note on <a
href="http://www.w3.org/People/Raggett/dtdgen/Docs">Assertion
Grammars</a>. Please contact me if you are interested in helping
with this work.</p>

<p><NAME> is interested in using Tidy to dynamically repair
markup in an HTML editor as people type. My recommendation is to
take advantage of the tables in tags.c and attrs.c for this, and
to defer to application of the full range of heuristics to such a
time as saving to disk or when explicitly requested. The CM_OPT
property in the tags table indicates that the end tag is
optional, while CM_EMPTY indicates that an element is
<i>empty</i>, i.e. has no content.</p>

<p><NAME> reports: <i>I tried printing the HTML Tidy page
for a class I am teaching tomorrow on HTML, and everything in the
"green" style (all of the examples) print in the smallest font I
have ever seen (in fact they look like tiny little horizontal
lines). Any explanation?</i>.</p>

<p>Yes. This is a problem with Internet Explorer and Style
Sheets. The Tidy page includes a CSS style sheet that tries to
make the size of the font used for the examples 80% smaller than
for normal text. Internet Explorer gets this wrong, picking a
very much smaller font. I am hoping this bug is fixed in the IE
5.0 release. I have changed the style sheet to work around
this.</p>

<p><NAME> writes that Tidy wasn't fixing frameset
documents with body elements unenclosed in noframes elements. Now
fixed. <NAME> found that comments after the html end tag
generated a warning for content after body. I can't reproduce
this symptom and assume it was fixed in an earlier release.</p>

<p><NAME> wants to know how to format tables so that tr
elements indent their content, but td tags do not. The solution
is to use <i>indent: auto</i>. <NAME> noted that the
clean option created style rules with tag names in uppercase,
which would cause problems for Extensible HTML (xhtml). This
prompted me to overhaul Tidy to switch to lower case for that tag
tables and literals. I have adopted Jelks' suggestion for adding
support for a doctype property in config files. This supports
<em>omit, auto, strict, loose</em> or a string specifying the fpi
(formal public identifier).</p>

<p><NAME> notes that Tidy doesn't fix up the doctype
correctly when bursting to slides. He says that if a document
contains the HTML 4.0 strict DT declaration, then the slides also
include the same strict DT declaration, but also contain the
center tag which does not appear in the strict DTD. I have
applied a simple work around, which is to remove the original
doctype when bursting to slides.</p>

<p>I have extended the support for the ASP preprocessing syntax
to cope with the use of ASP within tags for attributes. I have
also added a new option <tt>wrap-asp</tt> to the config file
support to allow you to turn off wrapping within ASP code. Thanks
to <NAME> for this idea.</p>

<p><NAME> asked for a compile-time option for setting the
config file, he says "The reason it would be useful is to be able
to define a set of commonly used additional tags. For instance,
our site is starting to use a lot of ColdFusion. I would love to
be able to put the CF tags into a site wide file so that users of
tidy automatically get them defined". You can now do this by
defining CONFIG_FILE in platform.h</p>

<p>Lo&#239;c Tr&#233;gan asks: Is there a way to generate a
"light" xml, with no "&lt;!DOCTYPE...&gt;" and "xlmns=..."? I
have tweaked the code to allow the doctype property to apply when
outputting XML, and added a new property "add-xml-pi" to control
whether an &lt;?xml?&gt; processing instruction is added or not.
To generate a minimal XML document, you can set the xml-out
property to yes, the doctype and add-xml-pi property to no.</p>

<p><NAME> has been using Windows Application to generate Web
pages and found that some of them generate very "non-portable"
HTML. One of the problems that is often introduced is the use of
"\" in URLs instead of "/" which confuses Unix Web servers. To
deal with this I have introduced the "fix-backslash" property.
This has been set by default to yes, but can be set to no if that
causes problems.</p>

<p>The new property <tt>indent-attributes</tt> when set to yes
places each attribute on a new line. Note that the attributes are
only indented one space. <NAME> asked for something
slightly different, where the second and subsequent attributes
start on a new line and are indented to line up under the first
attribute. That proved to involve rather more work to implement
than I have time for right now. I plan to work some more on this
for a future release.</p>

<p>P<NAME> reported that when an error file is specified to
tidy (-f file), the error file is opened for every HTML file
specified on the command line, but not closed until all HTML
files have been processed. If a large number of files are
specified on the command line (e.g. processing the FreeBSD
handbook), this can overflow the process or system file
descriptor table. I have now fixed this so that the error file is
only opened once.</p>

<p>Rafi Stern notes: I have entered output-xml: yes in my config
file, not output-xhtml. Tidy second guesses me and adds the xmlns
attribute for XHTML at the head of my file, which I then have to
remove as this interferes with my XSLT parser. Fixed along with
the other bugs reported by Rafi.</p>

<p><NAME> and <NAME> both spotted a problem with
attribute values consisting of an empty string, e.g.
<tt>alt=""</tt>. This was caused by bugs in tidy.c and in
lexer.c, both now fixed. <NAME> noted Tidy had problems
with hr elements within headings. This appears to be an old bug
that came back to life! Now fixed. Jussi also asked for a config
file option for fixing URLs where non-conforming tools have used
backslash instead of forward slash.</p>

<p>An example from <NAME> allowed me to the idea of
inserting the appropriate container elements for naked list items
when these appear in block level elements. At the same time I
have fixed a bug in the table code to infer implicit table rows
for text occurring within row group elements such as thead and
tbody. An example sent in by Steve Lee allowed me to pin point an
endless loop when a head or body element is unexpectedly found in
a table cell.</p>

<h2>15th April 1999</h2>

<p>Another minor release. <NAME> reports a bug
with &amp;quot; in attribute values. Now fixed. Francisco
Guardiola reports problems when a body element follows the
frameset end tag. I have fixed this with a patch to ParseHTML,
ParseNoFrames and ParseFrameset in parser.c <NAME> wrote in
with the suggestion for a config file option for enabling
wrapping script attributes within embedded string literals. You
can now do this using "wrap-script-strings:&#160;yes".</p>

<h2>14th April 1999</h2>

<p>Added check for Asp tags on line 2674 in parser.c so that Asp
tags are not forcibly moved inside an HTML element. My thanks to
<NAME> for this. Fixed problem with &amp; entities.
Bede McCall spotted that &amp;amp; was being written out as
&amp;amp;amp;. The fix alters ParseEntity() in lexer.c</p>

<h2>12th April 1999</h2>

<p>Added a missing "else" on line 241 in config.c (thanks for
<NAME> for spotting this). Added config.c and .o
to the Makefile (an oversight in the release on the 8th
April).</p>

<h2>8th April 1999</h2>

<h4>Localization:</h4>

<p>All the message text is now defined in localize.c which should
make it a tad easier to localize Tidy for different
languages.</p>

<h4>Config file support:</h4>

<p>I have added support for configuring tidy via a configuration
file. The new code is in config.h which provides a table driven
parser for RFC822 style headers. The new command line option
-config &lt;filename&gt; can be used to identify the config file.
The environment variable "HTML_TIDY" may be used to name the
config file. If defined, it is parsed before scanning the command
line. You are advised to use an absolute path for the variable to
avoid problems when running tidy in different directories.</p>

<h4><NAME>:</h4>

<p>Reports that the XML DOM parser by <NAME> screws up on
&#160;, naked &amp; and % in URLs as well as having problems with
newlines after the '=' before attribute values.</p>

<p>I have tweaked PrintChar when generating XML to output &#160;
in place of &amp;nbsp; and &amp;amp; in place of &amp;. In
general XHTML when parsed as well-formed XML shouldn't use named
entities other than those defined in XML 1.0. Note that this
isn't a problem if the parser uses the XHTML DTDs which import
the entity definitions.</p>

<h4><NAME>:</h4>

<p>When tidy encounter entities without a terminating semi-colon
(e.g. "&#169;") then it correctly outputs "&#169;", but it
doesn't report an error.</p>

<p>I have added a ReportEntityError procedure to localize.c and
updated ParseEntity to call this for missing semicolons and
unknown entities.</p>

<h4><NAME>:</h4>

<p>Tidy warns if table element is missing. This is incorrect for
HTML 3.2 which doesn't define this attribute.</p>

<p>The summary attribute was introduced in HTML 4.0 as an aid for
accessibility. I have modified CheckTABLE to suppress the warning
when the document type explicitly designates the document as
being HTML 2.0 or HTML 3.2.</p>

<h4><NAME>:</h4>

<p>I have renamed the field from class to tag_class as "class" is
a reserved word in C++ with the goal of allowing tidy to be
compiled as C++ e.g. when part of a larger program.</p>

<p>I have switched to Bool and the values yes and no to avoid
problems with detecting which compilers define bool and those
that don't.</p>

<p>Andy would prefer a return code or C++ exception rather than
an exit. I have removed the calls to exit from pprint.c and used
a long jump from FatalError() back to main() followed by
returning 2. It should be easy to adapt this to generate a C++
exception.</p>

<p>Sometimes the prev links are inconsistent with next links. I
have fixed some tree operations which might have caused this. Let
me know if any inconsistencies remain.</p>

<h4><NAME>:</h4>

<p>Would like to be able to use:</p>

<pre>
   tidy file.html | more
</pre>

<p>to pause the screen output, and/or full output passing to file
as with</p>

<pre>
   tidy file.html &gt; output.txt
</pre>

<p>Tidy writes markup to stdout and errors to stderr. 'More' only
works for stdout so that the errors fly by. My compromise is to
write errors to stdout when the markup is suppressed using the
command line option -e or "markup: no" in the config file.</p>

<h4><EMAIL></h4>

<p>Writes asking for a single output routine for Tidy. Acting on
his suggestion, I have added a new routine tidy_out() which
should make it easier to embed HTML Tidy in a GUI application
such as HTML-Kit. The new routine is in localize.c. All input
takes place via ReadCharFromStream() in tidy.c, excepting command
line arguments and the new config file mechanism.</p>

<p>Chami also asks for single routines for initializing and
de-initializing Tidy, something that happens often from the GUI
environment of HTML-Kit. I have added InitTidy() and DeInitTidy()
in tidy.c to try to satisfy this need. Chami now supports an
online interface for Tidy at the URL:</p>

<pre>
   <a
href="http://www.chamisplace.com/asp/hk.asp">http://www.chamisplace.com/asp/hk.asp</a>
</pre>

<p>He further asks for Tidy to optionally output a length
parameter whenever possible. This could represent the length of
the element, attribute or code block related to the error. An
online validator could then highlight the starting and ending
columns which may be easier for beginners to understand, rather
than pointing to a single character column. I will investigate
this for a future release.</p>

<h4><NAME>:</h4>

<p>Reports a problem when generating XML using -iso2022. Tidy
inserts ?/p&lt; rather than &lt;/p&gt;. I tried Chang's test file
but it worked fine with in all the right places. Please let me
know if this problem persists.</p>

<h4><NAME>:</h4>

<p>When using -indent option Tidy emits a newline before which
alters the layout of some tables.</p>

<p>I note that browsers aren't conforming to the SGML spec on
generally ignoring a newline immediately after start tags and
immediately before end tags. Netscape does this for pre elements
but not for other tags! My work around is to avoid additional
newlines for the content of th and td elements, except where
their content starts with a block level element. This kind of
thing is getting really hairy!</p>

<h4><NAME>:</h4>

<p>Would like the servlet tag added to tidy. This looks very
similar to applet and used for preprocessing document content
before delivery. Servlet acts as a container for param elements
and fallback content to be shown if the server doesn't support
servlet. I have added it as a proprietary tag and parse it in the
same way as applet.</p>

<p>Christian also reports that &lt;td&gt;&lt;hr/&gt;&lt;/td&gt;
caused Tidy to discard the &lt;hr/&gt; element. I have fixed the
associated bug in ParseBlock.</p>

<h4><NAME>:</h4>

<p>Points out that an isolated &amp; is converted to &amp; in
element content and in attribute values. This is in fact correct
and in agreement with the recommendations for HTML 2.0
onwards.</p>

<h4><NAME>:</h4>

<p>Reports that Tidy loops indefinitely if a naked LI is found in
a table cell. I have patched ParseBlock to fix this, and now
successfully deal with naked list items appearing in table cells,
clothing them in a ul.</p>

<h4><NAME>:</h4>

<p>Reports that Tidy gets confused by &lt;/comment&gt; before the
doctype. This is apparently inserted by some authoring tool or
other. I have patched Tidy to safely recover from the
unrecognized and unexpected end tag without moving the parse
state into the head or body.</p>

<h4><NAME>:</h4>

<p>Asks for Tidy to recognize obsolete elements such as LISTING
and to replace them by more modern equivalents, in this case pre.
I have added code to issue a warning and replace such elements as
xmp, listing, plaintext by pre, and dir and menu by ul. Daniel
also asks for a means to suppressing warnings, i.e. to only
report errors. I have added the boolean "show-warnings" to the
config file support to deal with this and split off warnings to
ReportWarnings().</p>

<h4><NAME>:</h4>

<p>Would love a version of Tidy written in Java. This is a big
job. I am working on a completely new implementation of Tidy,
this time using an object-oriented approach but I don't expect to
have this done until later this year. <b>DEFERRED</b></p>

<h4><NAME>:</h4>

<p>Reports that when tidying an XMLfile with characters above 127
Tidy is outputting the numeric entity followed by the character.
I have fixed this by a patch to PPrintChar() for XmlTags.</p>

<h4><NAME>:</h4>

<p>Reports that Tidy thinks an ol list is HTML 4.0 when you use
the type attribute. I have fixed an error in attrs.c to correct
this feature to first appearing in HTML 3.2.</p>

<h4><NAME>:</h4>

<p>Reported problems when using comments to hide the contents of
script elements from ancient browsers. I wasn't able to reproduce
the problem, and guess I fixed it earlier.</p>

<p>Drew also reported a problem which on further investigation is
caused by the very weird syntax for comments in SGML and XML. The
syntax for comments is really error prone:</p>

<pre>
 &lt;!--[text excluding --]--[[whitespace]*--[text excluding --]--]*&gt;
</pre>

<p>This means that &lt;!----&gt; is a complete comment but
&lt;!------&gt; is not since the parser is expecting a matching
terminating -- and as it doesn't find the -- it ploughs on and on
treating the rest of the markup as a comment unless it finds
another end comment. I have added a rule of thumb (a heuristic)
for detecting this situation. Basically I count the number of
comment groups without other characters and if the count is &gt;
2 and a '&gt;' is seen, a warning is generated.</p>

<p>Drew goes on to comment on the -clean option. This made me
take another look at the relative font sizes I am using for the
absolute font sizes for 0 through 6. I have tweaked them to get a
reasonable match before/after applying -clean as viewed on NS4
and IE4. Font size=3 is taken as the normal body font size and as
such the font element is silently dropped unless it also defines
a color.</p>

<p>I have also added InlineStyle to deal with the cases where an
inline element has as its only child a font element. A further
possibility would be to promote style properties common to all
children of an element to the element. I will have to leave this
for future work.</p>

<p>Drew asks why &lt;/ is not allowed in script content. The
answer is that SGML treats &lt;/ as delimiting the end of CDATA
element content, so that it ends prematurely before the
&lt;/script&gt; end tag. Browsers tend not to follow the SGML
standard in this respect, but Tidy is designed to help you do
so.</p>

<h4>Guus Goos:</h4>

<p>Notes that tidy *.html doesn't work under DOS. This is because
DOS unlike Unix doesn't expand names with wildcards to the list
of matching file names. This is a right nuisance and one more
reason why Linux is gaining popularity. I plan to provide a work
around in a future release of Tidy. Are there any free drop-in
replacements for the DOS shell that fix this problem?</p>

<h4><NAME>:</h4>

<p>Like a number of others would like list items and table cells
to be output compactly where possible. I have added a flag to
avoid indentation of content to tags.c that avoids further
indentation when the content is inline, e.g.</p>

<pre>
 &lt;ul&gt;
   &lt;li&gt;some text&lt;/li&gt;
   &lt;li&gt;
     &lt;p&gt;
        a new paragraph
     &lt;/p&gt;
   &lt;/li&gt;
 &lt;/ul&gt;
</pre>

<p>This behavior is enabled via "smart-indent: yes" and overrides
"indent: no". Use "indent-spaces: 5" to set the number of spaces
used for each level of indentation.</p>

<h4><NAME>:</h4>

<p>Has a few suggestions that will make Tidy work with XSL.
Thanks, I have incorporated all of them into the new release.</p>

<h4><NAME>:</h4>

<p>Reports that the Tidy thinks the end tag is missing if the
script element has no content. I have patched ParseScript to fix
this. Jelks also asks for a way to ask Tidy to hide the contents
of script and style elements; a way to avoid promoting inline
styles with -clean to style rules as a work around for a bug in
IE for URLs with relative URLs; finally, a way to avoid empty
elements being discarded, especially if they define an ID for
scripting. Very reasonable, but I would prefer leave these to a
future release. (This release is big enough right now!).</p>

<p>One thing I can satisfy right away is a mailing list for Tidy.
<EMAIL> has been created for discussing Tidy and I have
placed the details for subscribing and accessing the Web archive
on the Tidy overview page.</p>

<h4><NAME>:</h4>

<p>Reports that Tidy isn't quite right about when it reports the
doctype as inconsistent or not. I have tweaked HTMLVersion() to
fix this. Let me know if any further problems arise.</p>

<h4><NAME>:</h4>

<p>Wants to know how to get Tidy to preserve his explicit
entities e.g. " and &#160;. Currently Tidy interprets all
entities as character values and as such has no way to
distinguish whether these were derived from entities or not. To
help John with this release you can use "quote-marks: yes" in the
config file if you want all " marks to appear as " and
"quote-nbsp: yes" if you want non-breaking spaces to be shown as
entities. Note that for XML in general &#160; is not-predeclared,
so you should also use "numeric-entities: yes". This doesn't
apply to XHTML though.</p>

<p>John also reports that the weirdly complex URLs using the
javascript: scheme as used by www.bookmarklets.com can cause Tidy
indigestion. I have made Tidy aware of which attributes are using
Javascript and disabled the missing quote mark heuristic for
these. I have also tweaked the way unknown entities are reported
to say that the markup have contain unescaped ampersands.</p>

<h4><NAME>:</h4>

<p>Notes that dir and menu are deprecated and not allowed in
HTML4 strict. I have updated the entry in the tags table for
these two. I also now coerce them automatically to ul when -clean
is set.</p>

<h4><NAME>:</h4>

<p>Reports that some implementations of gcc don't work with the
current compiler directive Tidy uses to avoid duplicate typedefs
for uint and ulong. I don't have a truly platform independent
solution for this, so you may need to edit platform.h if the code
doesn't compile out of the box on your platform.</p>

<h4><NAME>:</h4>

<p>Found that Tidy is confused by map elements in the head. Tidy
knows that map is only allowed in the body and thinks the author
has left out the</p>

<p>start tag. Thereafter elements which it knows only belong in
the head are moved to the head, so things should work out ok.
Osma also reports having difficulties with non-breaking spaces,
but I was unable to reproduce these with the new release of Tidy,
so perhaps the problems have been fixed.</p>

<h4><NAME>:</h4>

<p>Reports that Tidy caused JavaScript errors when it introduced
linebreaks in JavaScript attributes. Tidy goes to some efforts to
avoid this and I am interested in any reports of further problems
with the new release.</p>

<h4><NAME>:</h4>

<p>Would like Tidy to warn when a tag has an extra quote mark, as
in &lt;a href="xxxxxx""&gt;. I have patched ParseAttribute to do
this.</p>

<h4><NAME>:</h4>

<p>Reported a space being inserted at the end of lines when a the
text is wrapped at the start of hypertext links. This isn't
occurring with this release, so I guess the problem was solved a
while back. Rene also suggests that Tidy could be used to add and
remove metadata and attributes etc. for a group of files, e.g. to
add a link to a style sheet or to assert attribution. This sounds
like a good idea for work in the future.</p>

<h4><NAME>:</h4>

<p>Reports that Tidy sometimes wraps text within markup that
occurs in the context of a pre element. I am only able to repeat
this when the markup wraps within start tags, e.g. between
attribute values. This is perfectly legitimate and doesn't effect
rendering.</p>

<h4><NAME>:</h4>

<p>Notes that Tidy doesn't remove entities such as &amp;nbsp; or
&amp;copy; which aren't defined by XML 1.0. That is true - these
entities <b>are</b> fine if you are using XHTML. If you want to
generate generic XML then you need to use the -n option or to set
"numeric-entities: yes" in the config file. This will then output
all such entities in their numeric form or as direct character
values according to the character encoding flags.</p>

<h4><NAME>:</h4>

<p>Comments that he would like Tidy to replace naked &amp; in
URLs by &amp;. You can now use "quote-ampersands: yes" in the
config file to ensure this. Note that this is always done when
outputting to XML where naked '&amp;' characters are illegal.</p>

<p>Steven also asks for a way to allow Tidy to proceed after
finding unknown elements. The issue is how to parse them, e.g. to
treat them as inline or block level elements? The latter would
terminate the current paragraph whereas the former would not.</p>

<p>If treated as inline, presumably, unknown tags should be
treated specially, for instance, normal inline end tags close the
currently open inline element, but this doesn't feel right for
unknown tags. What should the content model for unknown tags be -
flow? Again its far from obvious. One way to avoid these
difficulties would be to provide a means for authors to declare
unknown tags in the config file.</p>

<p>You can now declare new inline and block-level tags in the
config file, e.g.:</p>

<pre>
define-inline-tags: foo, bar
define-blocklevel-tags: blob
</pre>

<p>The content model for new tags allows for block or inline
content. Steven further comments that some authors use ul without
an li to indent content. Tidy currently coerces these to wrap the
content within an li which alters the rendering. He suggests
using blockquote instead. I have done this, and if you use the
-clean option at the same time, it gets replaced by a div element
with a class and style rule for indenting the content.</p>

<h4><NAME>:</h4>

<p>Would like to be able to coerce attributes to uppercase. I
have added support for "uppercase-attributes: yes" for this.
Stuart also asks for Tidy to support Microsoft's ASP tags. These
are part of Microsoft's server-side scripting model (similar to
CGI). I have treated ASP tags in the same way as processing
instructions, and they don't effect the version of HTML as they
are assumed to have been interpreted before delivery to the
client.</p>

<p>Stuart is also interested in having Tidy reading from and
writing back to the Windows clipboard. This sounds interesting
but I have to leave this to a future release.</p>

<h4><NAME>:</h4>

<p>Points out that Tidy doesn't like "top" or "bottom" for the
align attribute on the caption element. I have added a new
routine to check the align attribute for the caption element and
cleaned up the code for checking the document type.</p>

<h4><NAME>:</h4>

<p>Suggests that I should ensure that the options are self
consistent, e.g. if -asxml is set, then this should imply lower
case and override any instruction to omit optional end tags.
Accordingly, I have introduced a new routine AdjustConfig() that
is applied after reading the command line and config files and
before tidying any files.</p>

<p>Xavier wonders whether name attributes should be replaced or
supplemented by id attributes when translating HTML anchors to
XHTML. This is something I am thinking about for a future release
along with supplementing lang attributes by xml:lang
attributes.</p>

<h4><NAME>:</h4>

<p>Asks for headings and paragraphs to be treated specially when
other tags are indented. I have dealt with this via the new
smart-indent mechanism.</p>

<h2>22nd February 1999</h2>

<p>Tidy can now fix up XML empty tags for which the attribute
values are unquoted, e.g. &lt;br clear=all/&gt;. Care is taken to
avoid this being applied to tags with URLs, e.g. &lt;a
href=http://acme.com/&gt; where the / is part of the attribute
value and doesn't signify an empty tag. Authors are advised to
always quote attribute values to avoid such problems!</p>

<h2>22nd January 1999</h2>

<p>Tidy no longer complains about a missing &lt;/tr&gt; before a
&lt;tbody&gt;. Added link to a free <a
href="http://www.chami.com/free/html-kit/">win32 GUI for
tidy</a>.</p>

<h2>11th January 1999</h2>

<p>Added a link to the OS/2 distribution of Tidy made available
by Kaz SHiMZ. No changes to Tidy's source code.</p>

<h2>7th January 1999</h2>

<p>Fixed bug in ParseBlock that resulted in nested table
cells.</p>

<p>Fixed clean.c to add the style property "text-align:" rather
than "align:".</p>

<p>Disabled line wrapping within HTML alt, content and value
attribute values. Wrapping will still occur when output as
XML.</p>

<h2>16th December 1998</h2>

<p>This release fixes a problem with missing quotemarks in
attribute values introduced in the December 14th release. It also
fixes problems with parsing tables when the table cells include
naked list items and when unexpected end tags are encountered for
td and tr cells. Warnings are now generated for unknown entities
(those not defined by HTML 4.0). It may be worth thinking about a
new option to determine how to handle these, especially for
XML.</p>

<h2>14th December 1998</h2>

<p>Rewrote parser for elements with CDATA content to fix problems
with tags in script content.</p>

<p>New pretty printer for XML mode. I have also modified the XML
parser to recognize xml:space attributes appropriately. I have
yet to add support for CDATA marked sections though.</p>

<p>script and noscript are now allowed in inline content.</p>

<p>To make it easier to drive tidy from scripts, it now returns 2
if any errors are found, 1 if any warnings are found, otherwise
it returns 0. Note tidy doesn't generate the cleaned up markup if
it finds errors other than warnings.</p>

<p>Fixed bug causing the column to be reported incorrectly when
there are inline tags early on the same line.</p>

<p>Added -numeric option to force character entities to be
written as numeric rather than as named character entities.
Hexadecimal character entities are never generated since Netscape
4 doesn't support them.</p>

<p>Entities which aren't part of HTML 4.0 are now passed through
unchanged, e.g. &amp;precompiler-entity; This means that an
isolated &amp; will be pass through unchanged since there is no
way to distinguish this from an unknown entity.</p>

<p>Tidy now detects malformed comments, where something other
than whitespace or '--' is found when '&gt;' is expected at the
end of a comment.</p>

<p>The &lt;br&gt; tags are now positioned at the start of a blank
line to make their presence easier to spot.</p>

<p>The -asxml mode now inserts the appropriate Voyager html
namespace on the html element and strips the doctype. The html
namespace will be usable for rigorous validation as soon as W3C
finishes work on formalizing the definition of document profiles,
see: <a
href="http://www.w3.org/TR/WD-html-in-xml/">WD-html-in-xml</a>.</p>

<h2>13th November 1998 and earlier releases</h2>

<p>Fixed bug wherein &lt;style&#160;type=text/css&gt; was written
out as &lt;style&#160;type="text/ss"&gt;.</p>

<p>Tidy now handles wrapping of attributes containing JavaScript
text strings, inserting the line continuation marker as needed,
for instance:</p>

<pre>
onmouseover="window.status='Mission Statement, \
Our goals and why they matter.'; return true"
</pre>

<p>You can now set the wrap margin with the -wrap option.</p>

<p>When the output is XML, tidy now ensures the content starts
with &lt;?xml version="1.0"?&gt;.</p>

<p>The Document type for HTML 2.0 is now "-//IETF//DTD HTML
2.0//". In previous versions of tidy, it was incorrectly set to
"-//W3C//DTD HTML 2.0//".</p>

<p>When using the -clean option isolated FONT elements are now
mapped to SPAN elements. Previously these FONT elements were
simply dropped.</p>

<p>NOFRAMES now works fine with BODY element in frameset
documents.</p>
</body>
</html>



<|start_filename|>Support/Externals/tidy/test/accessTest/5-6-1-2.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/5.6.1</title>
</head>
<body>

<table summary="These table headers have invalid abbreviations">
	<caption>These table headers have invalid abbreviations (NULL)</caption>

	<tr><th abbr="">Age Of All Recent Residents Of The GTA</th><th abbr="">Income Level Specified In English Pounds</th></tr>
	<tr><td>19</td><td>7000</td></tr>
	<tr><td>29</td><td>19000</td></tr>

</table>

</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_678268.html<|end_filename|>
<HTML xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="Primus"> 
<HEAD>
<!-- [ 678268 ] --output-xhtml produces bad xml -->
<TITLE>Error: File Copy Error! File=C:\WinNT\ 
System32\PERFLIB_PERFDATA_<#>.DAT (copying to a 
'.fil'). </TITLE> 
</HEAD> 
<BODY> 
Error: File Copy Error! File=C:\WinNT\ 
System32\PERFLIB_PERFDATA_ 
<#>.DAT (copying to a '.fil'). 
<TABLE><TR><TD class="CellLabel">id</TD></TABLE> 
</BODY> 
</HTML>


<|start_filename|>Support/Externals/tidy/test/onetesta.cmd<|end_filename|>
@echo off

REM execute a single test case of the accessibility test suite
REM
REM (c) 2006 (W3C) MIT, ERCIM, Keio University
REM See tidy.c for the copyright notice.
REM
REM <URL:http://tidy.sourceforge.net/>
REM
REM CVS Info:
REM
REM    $Author: arnaud02 $
REM    $Date: 2006/10/20 16:44:40 $
REM    $Revision: 1.2 $

echo Testing %1 %2 %3
set TESTNO=%1
set TESTEXPECTED=%2
set ACCESSLEVEL=%3

set INFILES=%TIDYINPUT%\%1.*ml
set CFGFILE=%TIDYINPUT%\cfg_%1.txt

set TIDYFILE=%TIDYOUT%\out_%1.html
set MSGFILE=%TIDYout%\msg_%1.txt

set HTML_TIDY=

REM If no test specific config file, use default.
if NOT exist %CFGFILE% set CFGFILE=%TIDYINPUT%\cfg_default.txt

REM Get specific input file name
for %%F in ( %INFILES% ) do set INFILE=%%F

if EXIST %INFILE% goto DOIT
@echo ERROR: Can NOT locate [%INFILE%] ... aborting test ...
@echo ======================================= >> ACCERR.TXT
@echo Testing %1 %2 %3 >> ACCERR.TXT
@echo ERROR: Can NOT locate [%INFILE%] ... aborting test ... >> ACCERR.TXT
@goto done

:DOIT
REM Remove any pre-existing test outputs
if exist %MSGFILE%  del %MSGFILE%
if exist %TIDYFILE% del %TIDYFILE%

REM this has to all one line ...
%TIDY% -f %MSGFILE% --accessibility-check %ACCESSLEVEL% -config %CFGFILE% --gnu-emacs yes --tidy-mark no -o %TIDYFILE% %INFILE%

@REM output the FIND count to the a result file
find /c "%TESTEXPECTED%" %MSGFILE% > tempres.txt
@REM load the find count, token 3, into variable RESULT
for /F "tokens=3" %%i in (tempres.txt) do set RESULT=%%i
@REM test the RESULT variable ...
if "%RESULT%." == "0." goto Err
if "%RESULT%." == "1." goto done
@REM echo note - test '%TESTEXPECTED%' found %RESULT% times in file '%INFILE%'
goto done

:Err
echo FAILED --- test '%TESTEXPECTED%' not detected in file '%INFILE%'
type %MSGFILE%
echo FAILED --- test '%TESTEXPECTED%' not detected in above
set FAILEDACC=%FAILEDACC% %1
REM append results to the ACCERR.TXT file
echo ======================================= >> ACCERR.TXT
echo %TIDY% -f %MSGFILE% --accessibility-check %ACCESSLEVEL% -config %CFGFILE% --gnu-emacs yes --tidy-mark no -o %TIDYFILE% %INFILE% >> ACCERR.TXT
echo FAILED --- test '%TESTEXPECTED%' not detected in file '%MSGFILE%', as follows - >> ACCERR.TXT
type %MSGFILE% >> ACCERR.TXT
echo FAILED --- test '%TESTEXPECTED%' not detected in above >> ACCERR.TXT
goto done

:done


<|start_filename|>Support/Externals/tidy/test/accessTest/5-6-1-1.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/5.6.1</title>
</head>
<body>

<table summary="These table headers require abbreviations">
	<caption>These table headers require abbreviations</caption>

	<tr><th>Age Of All Recent Residents Of The GTA</th><th>Income Level Specified In English Pounds</th></tr>
	<tr><td>19</td><td>7000</td></tr>
	<tr><td>29</td><td>19000</td></tr>

</table>

</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_1316307.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><TITLE>1316307</TITLE></HEAD>
<BODY>
<P>
	This is text that should appear BEFORE the table.
</P>
<CENTER>
<TABLE CELLSPACING=0 BORDER=1 CELLPADDING=2 WIDTH=662 SUMMARY="">
	<TR>
		<TD>Row 1 - Col 1</TD>
		<TD>Row 1 - Col 2</TD>
<CENTER>
		<TD>Row 1 - Col 3</TD>
		<TD>Row 1 - Col 4</TD>
		<TD>Row 1 - Col 5</TD>
	</TR>
	<TR>
		<TD>Row 2 - Col 1</TD>
		<TD>Row 2 - Col 2</TD>
		<TD>Row 2 - Col 3</TD>
		<TD>Row 2 - Col 4</TD>
		<TD>Row 2 - Col 5</TD>
	</TR>
</TABLE>
</CENTER>
<P>
	This is text that should appear AFTER the table.  HTML Tidy output however shows it BEFORE the table.
</P>
</BODY>
</HTML>


<|start_filename|>Support/Externals/tidy/test/input/in_1331849.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>1331849</TITLE>
</HEAD>
<BODY>
Text BEFORE [implied] table

<TR>
<TD>
Implied table cell.
</TD>
<TD>
Implied because there is no opening table tag - just an opening table row tag.
</TD>
</TR>
<TR>
<TD WIDTH="2%" VALIGN="TOP">
2nd Row of implied table
</TD>
<TD>
More text
</TD>
</TR>
</table>

Text AFTER [implied] table but BEFORE the correctly specified table

<TABLE BORDER="1">
<TR>
<TD>
	Row 1 - Cell 1
</TD>
<TD>
	Row 1 - Cell 2
</TD>
</TR>
<TR>
<TD>
	Row 2 - Cell 1
</TD>
<TD>
	Row 2 - Cell 2
</TD>
</TR>
</TABLE>

Text that appears AFTER table the end!

</BODY>
</HTML>


<|start_filename|>Support/Externals/tidy/test/input/in_1183751.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>char attribute in table</title>
</head>
<body>

<table summary="">
<colgroup>
<col align="char" char=".">
<col align="char" char=".">
</colgroup>
<tr>
<td>55.00</td>
<td>55555.00</td>
</tr>
<tr>
<td>1234.56</td>
<td>123.45</td>
</tr>
</table>

<table summary="">
<tbody align="char" char=".">
<tr>
<td>55.00</td>
<td>55555.00</td>
</tr>
<tr>
<td>1234.56</td>
<td>123.45</td>
</tr>
</tbody>
</table>

<table summary="">
<tr>
<td align="char" char=".">55.00</td>
<td align="char" char=".">55555.00</td>
</tr>
<tr>
<td align="char" char=".">1234.56</td>
<td align="char" char=".">123.45</td>
</tr>
</table>

<table summary="">
<thead>
<tr>
<td>THEAD</td>
<td>THEAD</td>
<td>THEAD</td>
</tr>
<tr>
<td>THEAD</td>
<td>THEAD</td>
<td>THEAD</td>
</tr>
</thead>
<tfoot align="char" char=".">
<tr>
<td>TFOOT 55.00</td>
<td>TFOOT 55555.00</td>
<td>TFOOT 555.00</td>
</tr>
<tr>
<td>TFOOT 1234.56</td>
<td>TFOOT 123.45</td>
<td>TFOOT 12345.67</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>TBODY</td>
<td>TBODY</td>
<td>TBODY</td>
</tr>
<tr>
<td>TBODY</td>
<td>TBODY</td>
<td>TBODY</td>
</tr>
</tbody>
</table>

<table summary="">
<tr>
<th align="char" char=".">55.00</th>
<th align="char" char=".">55555.00</th>
<th align="char" char=".">555.00</th>
</tr>
<tr>
<th align="char" char=".">1234.56</th>
<th align="char" char=".">123.45</th>
<th align="char" char=".">12345.67</th>
</tr>
</table>


</body>
</html>





<|start_filename|>Support/Externals/tidy/test/input/in_640473.html<|end_filename|>
<title>[ 640473 ] new-empty-tags doesn't work, breaks doc</title> 
<body> 
<foo>Foo <bar>bar</bar> foo foo<zippo /> foo</foo> 
<p>This is a test</p> 
<zippo> 
<baz> 
This is a pre-formatted Baz! 
</baz> 
</body> 


<|start_filename|>Support/Externals/tidy/test/accessTest/4-1-1-1.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/4.1.1</title>
</head>
<body>

<p>In Luis Bunuel's 1967 film, "Belle de Jour", the stunning Catherine Deneuve 
portrays a woman leading a double life.</p>

</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_1207443.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<form action="post">
<p>A test input box</p>
<p><input type="TEXT" align="left"></p>
<p>&nbsp;</p>
<p>Radio buttons <input type="RADIO"></p>
<p>A check box <input type="CHECKBOX"></p>
<p><br clear="all"></p>
</form>

<ul type="DISC">
<li>item 1
<li>item 2
</ul>

<ol type="I">
<li>item 1
<li>item 2
</ol>

<ul>
<li type="a">item 1
<li type="A">item 2
</ul>

</body>
</html>


<|start_filename|>Support/Externals/tidy/test/accessTest/5-2-1-1.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/5.2.1</title>
</head>
<body>

<table summary="This data table should use markup to associate multiple levels of row and column headers">
	<caption>This data table should use markup to associate multiple levels of row and column headers</caption>

	<tr>
		<th>ID</th><th colspan="2">System<br>Color or Name</th><th>Required</th>
	</tr>
	<tr>
		<td>a-1</td><td>blue</td><td></td><td>yes</td>
	</tr>
	<tr>
		<td>a-2</td><td></td><td>Susan</td><td>yes</td>
	</tr>
	<tr>
		<td>a-3</td><td>green</td><td></td><td>no</td>
	</tr>
	<tr>
		<td>a-4</td><td>orange</td><td></td><td>no</td>
	</tr>
	<tr>
		<td>a-5</td><td></td><td>Frank</td><td>yes</td>
	</tr>
	<tr>
		<td>a-6</td><td></td><td>Harold</td><td>no</td>
	</tr>
</table>

</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_427839.html<|end_filename|>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Test Input For Bug #427839</TITLE>
</HEAD>
<BODY>
This is a test. Use "-asxhtml --doctype omit" on the command line.
</BODY>
</HTML>


<|start_filename|>Support/Externals/tidy/test/input/in_433021.html<|end_filename|>
<html>
<head>
<title>[ #433021 ] Identify attribute whose value is bad</title>
</head>
<body>
<p align="fizzle">text</p>
<table summary="none"> 
<tr> 
<td align="center" valign="center"><p>"valign" attr value can't be "center"</p>
</td>
<td align="center" valign="fuzzle"><p>"valign" attr value can't be "fuzzle"</p>
</td>
<td align="fuzzle" valign="fuzzle"><p>"align"/"valign" attr values can't be "fuzzle"</p>
</td>
</tr>
</table>
</body> 
</html>

<|start_filename|>Support/Externals/tidy/test/input/in_508936.html<|end_filename|>
<html>
<head>
  <title>[ #508936 ] Parse CSS Selector prefix in config file</title>
</head>
<body>
<p><font size="-2">Allow user to specify </font>
<font face="arial,helvetica, geneva" size="-2"><b>prefix</b> for 
class names Tidy generates with --clean yes option.</font>
</p>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_1590220-2.html<|end_filename|>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">

<HTML>
<HEAD>
<TITLE>1590220 - Example 2</TITLE>
</HEAD>
<BODY>
<TABLE border="2" summary="table with errant content">
<PRE>
Text of first PRE block
<TR><TD> This is a test cell </td></tr>
More errant table content - this should not be PRE'd
</PRE>
</TABLE>
</BODY>
</HTML>


<|start_filename|>Support/Externals/tidy/test/xmltest.cmd<|end_filename|>
@echo off

REM xmltest.cmd - execute all XML test cases
REM
REM (c) 1998-2003 (W3C) MIT, ERCIM, Keio University
REM See tidy.c for the copyright notice.
REM
REM <URL:http://tidy.sourceforge.net/>
REM
REM CVS Info:
REM
REM    $Author: creitzel $
REM    $Date: 2003/03/19 18:33:12 $
REM    $Revision: 1.1 $

for /F "tokens=1*" %%i in (xmlcases.txt) do call onetest.cmd %%i %%j


<|start_filename|>Support/Externals/tidy/test/input/in_647900.html<|end_filename|>
<html>
<head>
  <title>[ 647900 ] tables are incorrectly merged</title>
</head>
<body>
  <table summary="Paragraph should follow table, not precede.">
  <tr>
    <td>Table data</td>
  </table>

  <p>A paragraph</p>

  <table summary="Same again.">
  <tr>
    <th>Foo
  <tr>
    <td>
    <table summary="Nested">
    <td>Foo
    </table>
  </table>

  <p>Another paragraph</p>

  <form action="foo.cgi">
    <table summary="Bad form">
    <tr>
      <td>Input: <input type="text" name="foo"></td>
      <td></form></td>
    </tr>
    </table>

  <p>Yet another paragraph</p>
</body>
</html>


<|start_filename|>Support/Externals/tidy/test/input/in_504206.html<|end_filename|>
<HTML>
<HEAD>
<TITLE>[ #504206] Tidy errors in processing forms.</TITLE>
</HEAD><BODY>
<H1>COMM 428: Feedback Survey</H1>

<P>Please fill out the following form based on YOUR
experience in COMM 428 to date.</P>
<P>Use the <STRONG>Send</STRONG> button at the bottom
of the page to send your feedback to me via e-mail.
<HR>
<FORM METHOD="POST"
ACTION="http://hobbes.itc.virginia.edu/cgi-
uva/cgiwrap/rrn2n/cgi-bin/formmail.cgi">

<INPUT TYPE=hidden name="recipient"
value="<EMAIL>">
<INPUT TYPE=hidden name="subject" value="Feedback
Survey">
<INPUT TYPE=hidden name="sort"
value="order:realname,email,Future,MIS,Finance,Marketin
g,Management,Accounting,Other,questions,practical,prese
nts,prepared,enthusiasm,available,stimulates,STRENGTHS,
WEAKNESSES,SUGGESTIONS">
<INPUT TYPE=hidden name="required" value="SUGGESTIONS">
<INPUT TYPE=hidden name="env_report"
value="REMOTE_HOST,HTTP_USER_AGENT">

<P><STRONG>Name (optional): </STRONG><INPUT TYPE=text
name="realname"></P>
<P><STRONG>E-Mail Address (optional): </STRONG><INPUT
TYPE=text name="email"></P>
<P><STRONG>Where will you be this time next year?
</STRONG>
<SELECT NAME="Future">
<OPTION>Consulting
<OPTION>Corporate MIS
<OPTION>Other Employment
<OPTION>Graduate School
<OPTION>Don't Know Yet
</SELECT>
<P>
<P><STRONG>Area(s) of concentation? (Select all that
Apply): </STRONG><BR>
<INPUT TYPE="checkbox" NAME="MIS">MIS<BR>
<INPUT TYPE="checkbox" NAME="Finance">Finance<BR>
<INPUT TYPE="checkbox" NAME="Marketing">Marketing<BR>
<INPUT TYPE="checkbox" NAME="Management">Management<BR>
<INPUT TYPE="checkbox" NAME="Accounting">Accounting<BR>
<INPUT TYPE="checkbox" NAME="Other">Other<BR>
</P>
<P><STRONG>Q1: The instructor gives appropriate
consideration to the comments and questions of
students.</STRONG><BR>
<INPUT TYPE="radio" NAME="questions"
VALUE="SA">Strongly Agree
<INPUT TYPE="radio" NAME="questions" VALUE="A">Agree
<INPUT TYPE="radio" NAME="questions" VALUE="N">Neither
Agree Nor Disagree
<INPUT TYPE="radio" NAME="questions" VALUE="D">Disagree
<INPUT TYPE="radio" NAME="questions"
VALUE="SD">Strongly Disagree
</P>
<P><STRONG>Q2: The instructor relates theoretical
concepts covered in the course to practical
applications.</STRONG><BR>
<INPUT TYPE="radio" NAME="practical"
VALUE="SA">Strongly Agree
<INPUT TYPE="radio" NAME="practical" VALUE="A">Agree
<INPUT TYPE="radio" NAME="practical" VALUE="N">Neither
Agree Nor Disagree
<INPUT TYPE="radio" NAME="practical" VALUE="D">Disagree
<INPUT TYPE="radio" NAME="practical"
VALUE="SD">Strongly Disagree
</P>
<P><STRONG>Q3: The instructor presents class material
in a clear and organized manner.</STRONG><BR>
<INPUT TYPE="radio" NAME="presents"
VALUE="SA">Strongly Agree
<INPUT TYPE="radio" NAME="presents" VALUE="A">Agree
<INPUT TYPE="radio" NAME="presents" VALUE="N">Neither
Agree Nor Disagree
<INPUT TYPE="radio" NAME="presents" VALUE="D">Disagree
<INPUT TYPE="radio" NAME="presents"
VALUE="SD">Strongly Disagree
</P>
<P><STRONG>Q4: The instructor is prepared for
class.</STRONG><BR>
<INPUT TYPE="radio" NAME="prepared"
VALUE="SA">Strongly Agree
<INPUT TYPE="radio" NAME="prepared" VALUE="A">Agree
<INPUT TYPE="radio" NAME="prepared" VALUE="N">Neither
Agree Nor Disagree
<INPUT TYPE="radio" NAME="prepared" VALUE="D">Disagree
<INPUT TYPE="radio" NAME="prepared"
VALUE="SD">Strongly Disagree
</P>
<P><STRONG>Q5: The instructor demonstrates enthusiasm
and interest in the subject matter.</STRONG><BR>
<INPUT TYPE="radio" NAME="enthusiasm"
VALUE="SA">Strongly Agree
<INPUT TYPE="radio" NAME="enthusiasm" VALUE="A">Agree
<INPUT TYPE="radio" NAME="enthusiasm"
VALUE="N">Neither Agree Nor Disagree
<INPUT TYPE="radio" NAME="enthusiasm"
VALUE="D">Disagree
<INPUT TYPE="radio" NAME="enthusiasm"
VALUE="SD">Strongly Disagree
</P>
<P><STRONG>Q6: The instructor posts reasonable office
hours and is available whenever I try to see him
during those hours.</STRONG><BR>
<INPUT TYPE="radio" NAME="available"
VALUE="SA">Strongly Agree
<INPUT TYPE="radio" NAME="available" VALUE="A">Agree
<INPUT TYPE="radio" NAME="available" VALUE="N">Neither
Agree Nor Disagree
<INPUT TYPE="radio" NAME="available" VALUE="D">Disagree
<INPUT TYPE="radio" NAME="available"
VALUE="SD">Strongly Disagree
</P>
<P><STRONG>Q7: The instructor stimulates me to think
about the course.</STRONG><BR>
<INPUT TYPE="radio" NAME="stimulates"
VALUE="SA">Strongly Agree
<INPUT TYPE="radio" NAME="stimulates" VALUE="A">Agree
<INPUT TYPE="radio" NAME="stimulates"
VALUE="N">Neither Agree Nor Disagree
<INPUT TYPE="radio" NAME="stimulates"
VALUE="D">Disagree
<INPUT TYPE="radio" NAME="stimulates"
VALUE="SD">Strongly Disagree
</P>
<P><STRONG>Stengths (class/instructor):</STRONG>
<BR>
<TEXTAREA ROWS=5 COLS=60 NAME="STRENGTHS"></TEXTAREA>
<BR>
<P>
<P><STRONG>Weaknesses (class/instructor):</STRONG>
<BR>
<TEXTAREA ROWS=5 COLS=60 NAME="WEAKNESSES"></TEXTAREA>
<BR>
<P>
<P><STRONG>Suggestions for improvement
(class/instructor; NOTE: This field is
REQUIRED):</STRONG>
<BR>
<TEXTAREA ROWS=5 COLS=60 NAME="SUGGESTIONS"></TEXTAREA>
<BR>
<P><INPUT TYPE="SUBMIT" VALUE="Send">
<INPUT TYPE="RESET" VALUE="Clear Form"></P>
<FORM>
<HR>
</BODY></HTML>
