Merge branch 'tidy_doc_cleanup'

This commit is contained in:
Jim Derry 2015-11-03 11:36:34 +08:00
commit 9148f7e710
43 changed files with 935 additions and 8131 deletions

View file

@ -277,7 +277,7 @@ if (UNIX)
COMMAND xsltproc ARGS quickref.include.xsl ${TIDYCONFIG} > ${EXP_DIR}/quickref_include.html # delete later
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME} -h > ${EXP_DIR}/tidy5.help.txt # delete later
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME} -help-config > ${EXP_DIR}/tidy5.config.txt # delete later
COMMAND cp ARGS ../LICENSE.md ${EXP_DIR} # delete later
COMMAND cp ARGS ../README/LICENSE.md ${EXP_DIR} # delete later
)
#=========================================
# Run Doxygen.
@ -344,11 +344,11 @@ set(CPACK_PACKAGE_VERSION ${LIBTIDY_VERSION})
set(CPACK_PACKAGE_VERSION_MAJOR "${TIDY_MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${TIDY_MINOR_VERSION}")
set(CPACK_PACKAGE_VERSION_PATCH "${TIDY_POINT_VERSION}")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.html")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README/README.html")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.html")
set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/README.html")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/README/LICENSE.txt")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README/README.html")
set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/README/README.html")
## debian config
set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})

View file

@ -1,96 +1,5 @@
# HTML Tidy with HTML5 support
## Prerequisites
All READMEs and related materials have been relocated into README/.
1. git - http://git-scm.com/book/en/v2/Getting-Started-Installing-Git
2. cmake - http://www.cmake.org/download/
3. appropriate build tools for the platform
CMake comes in two forms - command line and gui. Some installations only install one or the other, but sometimes both. The build commands below are only for the command line use.
Also the actual build tools vary for each platform. But that is one of the great features of cmake, it can generate variuous 'native' build files. Running cmake without any parameters will list the generators available on that platform. For sure one of the common ones is "Unix Makefiles", which needs autotools make installed, but many other generators are supported.
In windows cmake offers various versions of MSVC. Again below only the command line use of MSVC is shown, but the tidy solution (*.sln) file can be loaded into the MSVC IDE, and the building done in there.
## Build the tidy library and command line tool
1. `cd build/cmake`
2. `cmake ../.. [-DCMAKE_INSTALL_PREFIX=/path/for/install]`
3. Windows: `cmake --build . --config Release`
Unix/OS X: `make`
4. Install, if desired:
Windows: `cmake --build . --config Release --target INSTALL`
Unix/OS X: `[sudo] make install`
By default cmake sets the install path to /usr/local in unix. If you wanted the binary in say /usr/bin instead, then in 2. above use -DCMAKE_INSTALL_PREFIX=/usr
Also, in unix if you want to build the release library without any debug `assert` in the code then add `-DCMAKE_BUILD_TYPE=Release` in step 2. This adds a `-DNDEBUG` macro to the compile switches. This is normally added in windows build for the `Release` config.
In windows the default install is to C:\Program Files\tidy5, or C:/Program Files (x86)/tidy5, which is not very useful. After the build the tidy[n].exe is in the Release directory, and can be copied to any directory in your PATH environment variable, for global use.
If you do **not** need the tidy library built as a 'shared' (DLL) library, then in 2. add the command -DBUILD_SHARED_LIB:BOOL=OFF. This option is ON by default. The static library is always built and linked with the command line tool for convenience in windows, and so the binary can be run as part of the man page build without the shared library being installed in unix.
## Build PHP with the tidy-html5 library
Due to API changes in the PHP source, "buffio.h" needs to be changed to "tidybuffio.h" in the file ext/tidy/tidy.c.
That is - prior to configuring php run this in the php source directory:
```
sed -i 's/buffio.h/tidybuffio.h/' ext/tidy/*.c
```
And then continue with (just an example here, use your own php config options):
```
./configure --with-tidy=/usr/local
make
make test
make install
```
## Important Links
- site: http://www.html-tidy.org/
- source: https://github.com/htacg/tidy-html5
- binaries: http://www.htacg.org/binaries/
- bugs: https://github.com/htacg/tidy-html5/issues
- list: https://lists.w3.org/Archives/Public/html-tidy/
- api: http://www.htacg.org/tidy-html5/tidylib_api/
- quickref: http://www.htacg.org/tidy-html5/quickref.html
## Development
The default branch of this repository is `master`. This is the development branch, hopefully always `stable` source.
It will identify as library version X.odd.X. Use it to help us on the forever `bug` quest, addition of new features, options, ..., etc.
However, if you seek **release** code, then do `git branch -r`, and choose one of the `release/X.even.0` branches for your build and install...
This will always be the latest release branch. Important `bug` fixes thought relevant to this release, pushed back, may bump the library version to X.even.1, ..., etc, but will be remain known as `X.even`...
Some more details of the `Tidy Version` can be found in [VERSION.md](VERSION.md).
Concerning the `Tidy Code Style`, some notes can be found in [CODESTYLE.md](CODESTYLE.md).
If you want to contribute to Tidy, then read [CONTRIBUTING.md](CONTRIBUTING.md).
## History
This repository should be considered canonical for HTML Tidy as of 2015-January-15.
- This repository originally transferred from [w3c.github.com/tidy-html5][1].
- First moved to Github from [tidy.sourceforge.net][2].
[1]: http://w3c.github.com/tidy-html5/
[2]: http://tidy.sourceforge.net
; eof
For build instructions please see README/README.md.

96
README/README.md Normal file
View file

@ -0,0 +1,96 @@
# HTML Tidy with HTML5 support
## Prerequisites
1. git - http://git-scm.com/book/en/v2/Getting-Started-Installing-Git
2. cmake - http://www.cmake.org/download/
3. appropriate build tools for the platform
CMake comes in two forms - command line and gui. Some installations only install one or the other, but sometimes both. The build commands below are only for the command line use.
Also the actual build tools vary for each platform. But that is one of the great features of cmake, it can generate variuous 'native' build files. Running cmake without any parameters will list the generators available on that platform. For sure one of the common ones is "Unix Makefiles", which needs autotools make installed, but many other generators are supported.
In windows cmake offers various versions of MSVC. Again below only the command line use of MSVC is shown, but the tidy solution (*.sln) file can be loaded into the MSVC IDE, and the building done in there.
## Build the tidy library and command line tool
1. `cd build/cmake`
2. `cmake ../.. [-DCMAKE_INSTALL_PREFIX=/path/for/install]`
3. Windows: `cmake --build . --config Release`
Unix/OS X: `make`
4. Install, if desired:
Windows: `cmake --build . --config Release --target INSTALL`
Unix/OS X: `[sudo] make install`
By default cmake sets the install path to /usr/local in unix. If you wanted the binary in say /usr/bin instead, then in 2. above use -DCMAKE_INSTALL_PREFIX=/usr
Also, in unix if you want to build the release library without any debug `assert` in the code then add `-DCMAKE_BUILD_TYPE=Release` in step 2. This adds a `-DNDEBUG` macro to the compile switches. This is normally added in windows build for the `Release` config.
In windows the default install is to C:\Program Files\tidy5, or C:/Program Files (x86)/tidy5, which is not very useful. After the build the tidy[n].exe is in the Release directory, and can be copied to any directory in your PATH environment variable, for global use.
If you do **not** need the tidy library built as a 'shared' (DLL) library, then in 2. add the command -DBUILD_SHARED_LIB:BOOL=OFF. This option is ON by default. The static library is always built and linked with the command line tool for convenience in windows, and so the binary can be run as part of the man page build without the shared library being installed in unix.
## Build PHP with the tidy-html5 library
Due to API changes in the PHP source, "buffio.h" needs to be changed to "tidybuffio.h" in the file ext/tidy/tidy.c.
That is - prior to configuring php run this in the php source directory:
```
sed -i 's/buffio.h/tidybuffio.h/' ext/tidy/*.c
```
And then continue with (just an example here, use your own php config options):
```
./configure --with-tidy=/usr/local
make
make test
make install
```
## Important Links
- site: http://www.html-tidy.org/
- source: https://github.com/htacg/tidy-html5
- binaries: http://www.htacg.org/binaries/
- bugs: https://github.com/htacg/tidy-html5/issues
- list: https://lists.w3.org/Archives/Public/html-tidy/
- api: http://www.htacg.org/tidy-html5/tidylib_api/
- quickref: http://www.htacg.org/tidy-html5/quickref.html
## Development
The default branch of this repository is `master`. This is the development branch, hopefully always `stable` source.
It will identify as library version X.odd.X. Use it to help us on the forever `bug` quest, addition of new features, options, ..., etc.
However, if you seek **release** code, then do `git branch -r`, and choose one of the `release/X.even.0` branches for your build and install...
This will always be the latest release branch. Important `bug` fixes thought relevant to this release, pushed back, may bump the library version to X.even.1, ..., etc, but will be remain known as `X.even`...
Some more details of the `Tidy Version` can be found in [VERSION.md](VERSION.md).
Concerning the `Tidy Code Style`, some notes can be found in [CODESTYLE.md](CODESTYLE.md).
If you want to contribute to Tidy, then read [CONTRIBUTING.md](CONTRIBUTING.md).
## History
This repository should be considered canonical for HTML Tidy as of 2015-January-15.
- This repository originally transferred from [w3c.github.com/tidy-html5][1].
- First moved to Github from [tidy.sourceforge.net][2].
[1]: http://w3c.github.com/tidy-html5/
[2]: http://tidy.sourceforge.net
; eof

View file

@ -1,12 +0,0 @@
# file created during build_docs
# = tidy5 -h > tidy5.cmd.txt
examples/tidy5.*.txt
# The license file needs to copies to examples for \include
examples/LICENSE.md
# file generates from xsl
examples/quickref_include.html

View file

@ -1,198 +0,0 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.9.1 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title="Tidy Home"/>
<tab type="pages" visible="yes" title="Pages" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
<tab type="user" url="https://github.com/htacg/tidy-html5/issues" title="Bugs &amp; Issues"/>
<tab type="user" url="https://github.com/htacg/tidy-html5" title="github"/>
<tab type="user" url="http://www.htacg.org/" title="htacg.org"/>
<tab type="user" url="http://www.html-tidy.org/" title="html-tidy.org"/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

View file

@ -1,105 +0,0 @@
Documentation HOWTO {#docs_howto}
========================
Instructions for generating documentation
\note For linking to these docs, the doxygen tag file is `tidy.tags`
**HTML Tidy** provides several types of documentation to suit different purposes. This
document describes how to generate the following:
- `tidylib_api/` (directory)
- This collection of documents describes the **TidyLib** API and is generated from the
comments and code in the **Tidy** source code.
- `quickref.html`
- This document provides a nice, readable HTML document describing all of the options and
settings that you can use with **Tidy** and internally in **TidyLib**.
- `tidy.1`
- This document is a Mac/Linux/Unix standard `man` page.
## The easy way
In this directory you can find the shell script `build_docs.sh`, and that will build all
of the documentation into the `temp/` directory (i.e., `{tidy}/build/documentation/temp`).
Please note these prerequisites:
- It's a Mac/Linux/Unix shell script.
- Doxygen is required to generate the API documentation.
- xsltproc is required to generate the man page and the `quickref.html` file.
If you prefer to understand how to do this manually (for example, for integration into
other scripts, build systems, or IDEs), read on.
## Manually
### `tidylib_api/` (directory)
If you want to build the API documentation you must have [doxygen][1] installed.
You can clone the [repository from github][2] if it is not currently installed.
Building as simple as:
~~~
cd {tidy}/build/documentation/
doxygen doxygen.cfg
~~~
This will result in a document set in `{tidy}/build/documentation/temp/tidylib_api`,
where you can find the main `index.html` file.
### `quickref.html`
Note that these instructions require the standard `xsltproc` utility to build the file,
but any XSLT processor of your choice should work, too.
- `tidy -xml-config > "tidy-config.xml"`
- This uses your up-to-date version of **Tidy** to generate an XML file containing all
of **Tidy**s built-in settings and their descriptions. This file is only temporary,
as it will be transformed in the next step.
- `xsltproc "quickref.xsl" "tidy-config.xml" > "quickref.html"`
- This examples uses the `xsltproc` command to transform `tidy-config.xml` using the
rules in the `quickref.xsl` stylesheet, and output it to `quickref.html`.
### `tidy.1`
Note that these instructions require the standard `xsltproc` utility to build the file,
but any XSLT processor of your choice should work, too.
- `tidy -xml-config > "tidy-config.xml"`
- This uses your up-to-date version of **Tidy** to generate an XML file containing all
of **Tidy**s built-in settings and their descriptions. This file is only temporary,
as it will be transformed in the third step.
- `tidy -xml-help > "tidy-help.xml"`
- This uses your up-to-date version of **Tidy** to generate an XML file containing all
of **Tidy**s built-in help information. This file is only temporary,
as it will be transformed in the next step.
- `xsltproc "tidy1.xsl" "tidy-help.xml" > "tidy.1"`
- This examples uses the `xsltproc` command to transform `tidy-help.xml` using the
rules in the `tidy1.xsl` stylesheet, and output it to `tidy.1`.
\note Note that `tidy1.xls` includes the file `tidy-config.xml` as part of the stylesheet,
and so although it does not appear in the command invocation, it is indeed required.
[1]: http://www.stack.nl/~dimitri/doxygen/
[2]: https://github.com/doxygen/doxygen

File diff suppressed because it is too large Load diff

View file

@ -1,49 +0,0 @@
#include <tidy.h>
#include <tidybuffio.h>
#include <stdio.h>
#include <errno.h>
int main(int argc, char **argv )
{
const char* input = "<title>Hello</title><p>World!";
TidyBuffer output = {0};
TidyBuffer errbuf = {0};
int rc = -1;
Bool ok;
// Initialize "document"
TidyDoc tdoc = tidyCreate();
printf( "Tidying:\t%s\n", input );
// Convert to XHTML
ok = tidyOptSetBool( tdoc, TidyXhtmlOut, yes );
if ( ok )
rc = tidySetErrorBuffer( tdoc, &errbuf ); // Capture diagnostics
if ( rc >= 0 )
rc = tidyParseString( tdoc, input ); // Parse the input
if ( rc >= 0 )
rc = tidyCleanAndRepair( tdoc ); // Tidy it up!
if ( rc >= 0 )
rc = tidyRunDiagnostics( tdoc ); // Kvetch
if ( rc > 1 ) // If error, force output.
rc = ( tidyOptSetBool(tdoc, TidyForceOutput, yes) ? rc : -1 );
if ( rc >= 0 )
rc = tidySaveBuffer( tdoc, &output ); // Pretty Print
if ( rc >= 0 )
{
if ( rc > 0 )
printf( "\nDiagnostics:\n\n%s", errbuf.bp );
printf( "\nAnd here is the result:\n\n%s", output.bp );
}
else
printf( "A severe error (%d) occurred.\n", rc );
tidyBufFree( &output );
tidyBufFree( &errbuf );
tidyRelease( tdoc );
return rc;
}

View file

@ -1,22 +0,0 @@
// 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

View file

@ -1,52 +0,0 @@
/*!
\mainpage Tidy home
\note The repository <a href="https://github.com/htacg/tidy-html5">github.com/htacg/tidy-html5</a> and this documentation should be considered canonical for HTML Tidy as of 2015-January-15. See \ref history
\b Tidy corrects and cleans up HTML content by fixing markup errors such as mismatched, misnested and missing tags, missing end "/" tags, missing quotations et all, eg:
\code{.html}
<h1><hr>heading</h1>
<h2>sub<hr>heading</h2>
<a href="#refs">References<a>
\endcode
is converted to
\code{.html}
<hr>
<h1>heading</h1>
<h2>sub</h2>
<hr>
<h2>heading</h2>
<a href="#refs">References</a>
\endcode
<h4>This project has two parts:</h4>
- \ref tidylib
- a C static or dynamic library that developers can integrate into their applications
in order to bring all of Tidys power to your favorite tools.
- \ref tidy_cmd
- a console application built on \ref tidylib for Mac OS X, Linux, Windows, UNIX, and more.
\section content Contents
- \ref quick_ref
- \ref tidy_cmd
- \ref tidy_quickstart
- \ref tidy_config
- \ref featured_options
- \ref tidy_scripting
- \ref tidylib
- <a href="modules.html">Modules</a>
- \ref building_tidy
-\ref docs_howto
- \subpage history
- \subpage license
- \ref todo
*/

View file

@ -1,98 +0,0 @@
/*!
\page building_tidy Building Tidy
How to compile and install Tidy from source code.
\tableofcontents
\section Prerequisites
- \b git - <a href="http://git-scm.com/book/en/v2/Getting-Started-Installing-Git">git-scm.com/book/en/v2/Getting-Started-Installing-Git</a>
- \b cmake - <a href="http://www.cmake.org/download/">cmake.org/download/</a>
- Appropriate build tools for the platform
CMake comes in two forms - command line and gui. Some installations only install one or the other, but sometimes both. The build
commands below are only for the command line use.
Also the actual build tools vary for each platform. But that is one of the great features of cmake, it can generate
variuous 'native' build files. Running cmake without any parameters will list the generators
available on that platform. For sure one of the common ones is "Unix Makefiles", which needs autotools
make installed, but many other generators are supported.
In windows cmake offers various versions of MSVC. Again below only the command line use of MSVC is shown, but the
tidy solution (*.sln) file can be loaded into the MSVC IDE, and the building done in there.
\section get_source Get the source code
Tidys sourcecode can be found at <a href="https://github.com/htacg/tidy-html5">github.com/htacg/tidy-html5</a>. There are sometimes
several branches, but in general `master` is the most recently updated version.
\note Note that as “cutting edge,” it may have bugs or other
unstable behavior. If you prefer a stable, officially released version, be sure to have a look
at Releases on the github page.
In general you can use the <b>Download ZIP</b> button on the github page to download the most recent version of a branch. If you prefer
Git then you can clone the repository to a working machine with:
\code{.sh}
git clone git@github.com:htacg/tidy-html5.git
\endcode
\section compile Compile
<h4>Enter the `build/cmake` directory</h4>
\code{.sh}
# *nix
cd {your-tidy-html5-directory}/build/cmake
# windows
cd {your-tidy-html5-directory}\build\cmake
\endcode
<h4>Configure the build</h4>
\code{.sh}
# *nix
cmake ../../ [-DCMAKE_INSTALL_PREFIX=/path/for/install]
# windows
cmake ..\..\
\endcode
By default cmake sets the install path to `/usr/local` in unix.
If you wanted the binary in say `/usr/bin` instead, then use `-DCMAKE_INSTALL_PREFIX=/usr`
On windows the default install is to `C:\Program Files\tidy5`, or `C:/Program Files (x86)/tidy5`, which is not very useful. After
the build the `tidy[n].exe` is in the `Release\` directory, and can be copied to any directory in your `PATH` environment variable, for global use.
If you need the tidy library built as a 'shared' (DLL) library, then in add the command `-DBUILD_SHARED_LIB:BOOL=ON`.
This option is `OFF` by default, so the static library is built and linked with the command line tool for convenience.
<h4>Compile</h4>
\code{.sh}
# *nix
make
# windows
cmake --build . --config Release
\endcode
\section compileOnstall Install
Install the applicatio and library with
\code{.sh}
# *nix
[sudo] make install
# windows
cmake --build . --config Release --target INSTALL
\endcode
*/

View file

@ -1,146 +0,0 @@
/*!
\page featured_options Featured Options
Overview of popular features and problems
\tableofcontents
\section indenting Indenting output for readability
Indenting the source markup of an HTML document makes the markup easier to read. Tidy can indent the
markup for an HTML document while recognizing elements whose contents should not be indented. In the
example below, Tidy indents the output while preserving the formatting of the `<pre>` element:
Input:
\code{.html}
<html>
<head>
<title>Test document</title>
</head>
<body>
<p>This example shows how Tidy can indent output while preserving
formatting of particular elements.</p>
<pre>This is
<em>genuine
preformatted</em>
text
</pre>
</body>
</html>
\endcode
Output:
\code{.html}
<html>
<head>
<title>Test document</title>
</head>
<body>
<p>This example shows how Tidy can indent output while preserving
formatting of particular elements.</p>
<pre>
This is
<em>genuine
preformatted</em>
text
</pre>
</body>
</html>
\endcode
Tidys indenting behavior is not perfect and can sometimes cause your output to be rendered by browsers in a different way than the input. You can
avoid unexpected indenting-related rendering problems by setting `indent:no` or `indent:auto` in a config file.
\note
<b>Preserving original indenting not possible</b><br><br>
Tidy is not capable of preserving the original indenting of the markup from the input it receives. Thats because Tidy starts by
building a clean parse tree from the input, and that parse tree doesnt contain any information about the original indenting. Tidy then
pretty-prints the parse tree using the current config settings. Trying to preserve the original
indenting from the input would interact badly with the repair operations needed to build a clean parse tree, and would considerably complicate the code.
\section encodings Encodings and character references
Tidy defaults to assuming you want output to be encoded in `UTF-8`. But Tidy offers you a choice of other
character encodings: `US ASCII`, `ISO Latin-1`, and the `ISO 2022` family of 7 bit encodings.
Tidy doesnt yet recognize the use of the HTML `<meta>` element for specifying the character encoding.
The full set of HTML character references are defined. Cleaned-up output uses named character references for characters when appropriate. Otherwise,
characters outside the normal range are output as numeric character references.
\section accessibility Accessibility
Tidy offers advice on potential accessibility problems for people using non-graphical browsers.
\section cleaning_presentational Cleaning up presentational markup
Some tools generate HTML with presentational elements such as `<font>`, `<nobr>`, and `<center>`. Tidys -clean option will replace those elements with `<style>` elements and CSS.
Some HTML documents rely on the presentational effects of `<p>` start tags that are not followed by any content. Tidy deletes
such `<p>` tags (as well as any headings that dont have content). So do not use `<p>` tags simply for
adding vertical whitespace; instead use CSS, or the `<br>` element. However, note that
Tidy wont discard `<p>` tags that are followed by any non-breaking space (that is, the \code&nbsp;\endcode named character reference).
\section new_tags Teaching Tidy about new tags
You can teach Tidy about new tags by declaring them in the configuration file, the syntax is:
\code
new-inline-tags: tag1, tag2, tag3
new-empty-tags: tag1, tag2, tag3
new-blocklevel-tags: tag1, tag2, tag3
new-pre-tags: tag1, tag2, tag3
\endcode
The same tag can be defined as \b empty and as \b inline, or as \b empty and as \b block.
These declarations can be combined to define a new empty inline or empty block element, but you are not advised to
declare tags as being both \b inline and \b block.
Note that the new tags can only appear where Tidy expects inline or block-level tags respectively. That means you cant place new
tags within the document head or other contexts with restricted content models.
\section ignoring_scripting Ignoring PHP, ASP, and JSTE instructions
Tidy will gracefully ignore many cases of PHP, ASP, and JSTE instructions within element content and as replacements for attributes,
and preserve them as-is in output; for example:
\code{.php}
<option <% if rsSchool.Fields("ID").Value
= session("sessSchoolID")
then Response.Write("selected") %>
value='<%=rsSchool.Fields("ID").Value%>'>
<%=rsSchool.Fields("Name").Value%>
(<%=rsSchool.Fields("ID").Value%>)
</option>
\endcode
But note that Tidy may report missing attributes when those are “hidden” within the PHP, ASP, or JSTE code. If you use
PHP, ASP, or JSTE code to create a start tag, but place the end tag explicitly in the HTML markup, Tidy
wont be able to match them up, and will delete the end tag. In that case you are advised to make the
start tag explicit and to use PHP, ASP, or JSTE code for just the attributes; for example:
\code{.php}
<a href="<%=random.site()%>">do you feel lucky?</a>
\endcode
Tidy can also get things wrong if the PHP, ASP, or JSTE code includes quotation marks; for example:
\code{.php}
value="<%=rsSchool.Fields("ID").Value%>"
\endcode
Tidy will see the quotation mark preceding ID as ending the attribute value, and proceed to complain about what follows.
Tidy allows you to control whether line wrapping on spaces within PHP, ASP, and JSTE instructions is
enabled; see the `wrap-php`, `wrap-asp`, and `wrap-jste` config options.
\section correcting_xml Correcting well-formedness errors in XML markup
Tidy can help you to correct well-formedness errors in XML markup. Tidy doesnt yet recognize all XML features,
though; for example, it doesnt understand CDATA sections or DTD subsets.
*/

View file

@ -1,54 +0,0 @@
/*!
\page history History
Once upon a time....
<p><strong>HTML Tidy</strong> was created by the <a href="http://www.w3.org/">W3Cs</a> own <a href="http://www.w3.org/People/Raggett/">Dave Raggett</a> back in the
dawn of the Internet age. His original Internet page is still available and
gives a sense of the early history: <a href="http://www.w3.org/People/Raggett/tidy/">Clean up your Web pages with HTML TIDY</a>.</p>
<p>Satisfied with his work Dave passed the torch to a dedicated group of
maintainers at <a href="http://tidy.sourceforge.net/">tidy.sourceforge.net</a> where the important tasks of turning
<strong>Tidy</strong> into a C library and keeping up with developing standards was
performed.</p>
<p>W3C members took a renewed interest in <strong>Tidy</strong> in 2011 and forked the
project to <a href="https://github.com/w3c/tidy-html5">github</a> (now redirects to this project), where it featured
compatibility with HTML5 via a <a href="https://lists.w3.org/Archives/Public/www-archive/2011Nov/0007.html">key contribution</a> from one of the SourceForge
key members.</p>
<p>In 2015 a group of concerned developers, users, and software integrators formed
<a href="http://www.htacg.org">HTACG</a> with the goal of revitalizing <strong>Tidy</strong>, which had fallen into a
non-maintained state. As a W3C Community Group, HTACG was deemed worthy by the
W3C, and W3C passed ownership of their project to HTACG, where it is currently
being developed and prepped for a new, stable, and modern release.</p>
<p>HTACG is also working diligently with the SourceForge maintainers in an effort
to harmonize <strong>HTML Tidy</strong> into a single, stable, solid release once again.</p>
\code
+-----------------------------+
|w3.org/People/Raggett/tidy/|
++-------------+--------------+
||
||+----------------------+
|+-->|tidy.sourceforge.net|
|+------------------+---+
||
|+--------------------+------+|Soon
+-->|github.com/w3c/tidy|html5||
+-+------------------+------+|
||
||+-------------------------------+
|+->|Youarehere:|
||github.com/htacg/tidy-html5|
+----------------------------->+----------------------+--------+
\endcode
*/

View file

@ -1,14 +0,0 @@
/*!
\page license License
License and Legal
<pre>
\htmlinclude LICENSE.md
</pre>
*/

View file

@ -1,12 +0,0 @@
/*!
\page quick_ref Quick Ref
Quick reference generated from the tidy command
\htmlinclude quickref_include.html
*/

View file

@ -1,18 +0,0 @@
/*!
Running the tidy command
\page tidy_cmd tidy command
- \subpage tidy_quickstart
- \subpage tidy_config
- \subpage featured_options
- \subpage tidy_scripting
<pre>
\htmlinclude tidy5.help.txt
</pre>
*/

View file

@ -1,46 +0,0 @@
/*!
\page tidy_config Configuration
Configuration settings and files
\tableofcontents
To get a list of all configuration settings, see \ref config_options below or use:
\code{.sh}
tidy -help-config
\endcode
\section using_config Using a configuration file
The most convenient way to configure Tidy is by using separate configuration file.
Assuming you have created a Tidy configuration file named `myconfig.txt` (the name and extension dont matter), you can instruct Tidy to use it via the
command line option `-config myconfig.txt` for example:
\code {.sh}
tidy -config myconfig.txt file1.html file2.html
\endcode
Alternatively, you can name the default config file via the environment
variable named `HTML_TIDY`, the value of which is the absolute path for the config file.
You can also set config options on the command line by preceding the name of the option
immediately (no intervening space) with the string “--”; for example:
\code {.sh}
tidy --break-before-br true --show-warnings false
\endcode
You can find documentation for full set of configuration options on the \ref quick_ref page.
\section example_config Example Configuration File
\include example_config.txt
\section config_options Config Options
<pre>
\htmlinclude tidy5.config.txt
</pre>
*/

View file

@ -1,71 +0,0 @@
/*!
\page tidy_quickstart tidy command quickstart
\tableofcontents
This is the syntax for invoking Tidy from the command line:
\code{.sh}
tidy [[options] filename]
\endcode
Tidy defaults to reading from standard input, so if you run Tidy without specifying the filename argument, it will just sit there waiting for input to read.
Tidy defaults to writing to standard output. So you can pipe output from Tidy to other programs, as well as pipe output from other programs to Tidy. You can page through the output from Tidy by piping it to a pager, e.g.:
\code{.sh}
tidy file.html | less
\endcode
\section out_file Output to file
To have Tidy write its output to a file instead, either use the
\code{.sh}
-o filename
or
-output filename
\endcode
option, or redirect standard output to the file. For example:
\code{.sh}
tidy -o output.html index.html
tidy -output output.html index.html
tidy index.html > output.html
\endcode
All the above run Tidy on the file `index.html` and write the output to the file `output.html`, while writing any error messages to standard error.
\section out_error Error output
Tidy defaults to writing its error messages to standard error (that is, to the console where youre running Tidy). To page through the error messages along with the
output, redirect standard error to standard output, and pipe it to your pager:
\code{.sh}
tidy index.html 2>&1 | less
\endcode
To have Tidy write the errors to a file instead, either use
\code{.sh}
-f filename
or
-file filename
\endcode
option, or redirect standard error to a file:
\code{.sh}
tidy -o output.html -f errs.txt index.html
tidy index.html > output.html 2> errs.txt
\endcode
Both the above run Tidy on the file `index.html` and writes the output to the file `output.html`, while writing any error messages to the `file errs.txt`.
Writing the error messages to a file is especially useful if the file you are checking has many errors; reading them from a file instead of the console
or pager can make it easier to review them.
\section out_modify Modify / Overwrite
You can use the or `-m` or `-modify` option to modify (in-place) the contents of the input file you are checking; that is, to overwrite those contents with the output from Tidy. For example:
\code{.sh}
tidy -f errs.txt -m index.html
\endcode
That runs Tidy on the file `index.html`, modifying it in place and writing the error messages to the file `errs.txt`.
\warning If you use the `-m` option, you should first ensure that you have a backup copy of your file.
*/

View file

@ -1,31 +0,0 @@
/*!
\page tidy_scripting Running tidy in scripts
If you want to run Tidy from a Perl, bash, or other scripting language you may find it of value to inspect the result returned
by Tidy when it exits:
- \b 0 = if everything is fine
- \b 1 = if there were warnings and
- \b 2 = if there were errors.
\section perl_example_script Example Perl script
\code{.pl}
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";
}
\endcode
*/

View file

@ -1,53 +0,0 @@
/*!
\page tidylib tidylib
About the tidylib C library and code
\tableofcontents
\section about_tidylib TidyLib features
- easy to integrate. Because of the near universal adoption of C linkage, a C interface may be called from a great number of programming languages.
- designed to use opaque types in the public interface. This allows the application to just pass an integer around and the need to transform data types in different languages is minimized. As a results its straight-forward to write very thin library wrappers for C++, Pascal, and COM/ATL.
- eats its own dogfood. HTML Tidy links directly to TidyLib.
- is Thread Safe and Re-entrant. Because there are many uses for HTML Tidy - from content validation, content scraping, conversion to XHTML - it was important to make TidyLib run reasonably well within server applications as well as client side.
- uses adaptable I/O. As part of the larger integration strategy it was decided to fully abstract all I/O. This means a (relatively) clean separation between character encoding processing and shovelling bytes back and forth. Internally, the library reads from sources and writes to sinks. This abstraction is used for both markup and configuration “files”. Concrete implementations are provided for file and memory I/O, and new sources and sinks may be provided via the public interface.
\section return_code Return codes
Its important to understand that API functions that return an integer almost universally adhere to the following convention:
- \b 0 == \b Success
- Good to go.
- \b 1 == \b Warnings, but no errors
- Check the error buffer or track error messages for details.
- \b 2 == \b Errors (and maybe warnings)
- By default, Tidy will not produce output. You can force output with the TidyForceOutput option. As with warnings, check error buffer or track error messages for details.
- <b>< 0</b> == <b>Severe error</b>
- Usually value equals `-errno`. See errno.h.
Also, by default, warning and error messages are sent to stderr. You can redirect diagnostic
output using either tidySetErrorFile() or tidySetErrorBuffer(). See tidy.h for details.
\section app_notes Application Notes
Of course, there are functions to parse and save both markup and configuration files. For the adventurous, it is possible to create new input sources and output sinks. For example, a URL source could pull the markup from a given URL.
It is also worth remembering that an application may instantiate any number of document and buffer objects. They are fairly cheap to initialize and destroy (just memory allocation and zeroing, really), so they may be created and destroyed locally, as needed. There is no problem keeping them around a while for keeping state. For example, a server app might keep a global document as a master configuration. As documents are parsed, they can copy their configuration data from the master instance. See tidyOptCopyConfig(). If the master copy is initialized at startup, no synchronization is necessary.
\section example_hello tidylib example
\include example.1.c
*/

View file

@ -1,14 +0,0 @@
/*!
\page todo Todo List
The todo list.
\note If this page is empty, then there are no todo items flagged in source.
\xrefitem todo "Todo" "Todo List"
*/

View file

@ -1,244 +0,0 @@
<?xml version="1.0"?>
<!--
For generating the `quickref.html` web page from output of
`tidy -xml-config`
(c) 2005 (W3C) MIT, ERCIM, Keio University
See tidy.h for the copyright notice.
Written by Charles Reitzel and Jelks Cabaniss
-->
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"
encoding="us-ascii"
omit-xml-declaration="yes"
/>
<xsl:template match="/">
<a name="qtop"></a>
<h2 id="top">Option Groups</h2>
<ul>
<li><a class="h3" href="#MarkupHeader">HTML, XHTML, XML</a></li>
<li><a class="h3" href="#DiagnosticsHeader">Diagnostics</a></li>
<li><a class="h3" href="#PrettyPrintHeader">Pretty Print</a></li>
<li><a class="h3" href="#EncodingHeader">Character Encoding</a></li>
<li><a class="h3" href="#MiscellaneousHeader">Miscellaneous</a></li>
</ul>
<xsl:call-template name="link-section" />
<xsl:call-template name="detail-section" />
</xsl:template>
<!-- Named Templates: -->
<xsl:template name="link-section">
<table summary="Tidy Options Quick Reference Header Section" border="0"
cellpadding="3" cellspacing="0" class="quickref">
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<xsl:call-template name="links">
<xsl:with-param name="class">markup</xsl:with-param>
<xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
<xsl:with-param name="headerID">MarkupHeader</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="links">
<xsl:with-param name="class">diagnostics</xsl:with-param>
<xsl:with-param name="header">Diagnostics</xsl:with-param>
<xsl:with-param name="headerID">DiagnosticsHeader</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="links">
<xsl:with-param name="class">print</xsl:with-param>
<xsl:with-param name="header">Pretty Print</xsl:with-param>
<xsl:with-param name="headerID">PrettyPrintHeader</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="links">
<xsl:with-param name="class">encoding</xsl:with-param>
<xsl:with-param name="header">Character Encoding</xsl:with-param>
<xsl:with-param name="headerID">EncodingHeader</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="links">
<xsl:with-param name="class">misc</xsl:with-param>
<xsl:with-param name="header">Miscellaneous</xsl:with-param>
<xsl:with-param name="headerID">MiscellaneousHeader</xsl:with-param>
</xsl:call-template>
</table>
</xsl:template>
<xsl:template name="detail-section">
<table summary="Tidy Options Quick Reference Detail Section" border="0"
cellpadding="3" cellspacing="0">
<xsl:call-template name="reference">
<xsl:with-param name="class">markup</xsl:with-param>
<xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
<xsl:with-param name="headerID">MarkupReference</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="reference">
<xsl:with-param name="class">diagnostics</xsl:with-param>
<xsl:with-param name="header">Diagnostics</xsl:with-param>
<xsl:with-param name="headerID">DiagnosticsReference</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="reference">
<xsl:with-param name="class">print</xsl:with-param>
<xsl:with-param name="header">Pretty Print</xsl:with-param>
<xsl:with-param name="headerID">PrettyPrintReference</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="reference">
<xsl:with-param name="class">encoding</xsl:with-param>
<xsl:with-param name="header">Character Encoding</xsl:with-param>
<xsl:with-param name="headerID">EncodingReference</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="reference">
<xsl:with-param name="class">misc</xsl:with-param>
<xsl:with-param name="header">Miscellaneous</xsl:with-param>
<xsl:with-param name="headerID">MiscellaneousReference</xsl:with-param>
</xsl:call-template>
</table>
</xsl:template>
<xsl:template name="links">
<xsl:param name="class"/>
<xsl:param name="header"/>
<xsl:param name="headerID"/>
<tr valign="bottom">
<td class="h3" colspan="2" id="{$headerID}">
<xsl:value-of select="$header"/> Options</td>
<td valign="top" class="h3top"><a href="#qtop" class="h3topa">Top</a></td>
</tr>
<xsl:call-template name="ClassHeaders" />
<xsl:for-each select="/config/option[@class=$class]">
<xsl:sort select="name" order="ascending" />
<tr>
<td class="qrow"><a href="#{name}"><xsl:value-of select="name"/></a></td>
<td class="qrow"><xsl:apply-templates select="type"/></td>
<td class="qrow"><xsl:choose>
<xsl:when test="string-length(default) &gt; 0 ">
<xsl:apply-templates select="default" />
</xsl:when>
<xsl:otherwise>
<strong>-</strong>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
<tr valign="bottom">
<td colspan="3">&#160;</td>
</tr>
</xsl:template>
<xsl:template name="reference">
<xsl:param name="class"/>
<xsl:param name="header"/>
<xsl:param name="headerID"/>
<tr>
<td colspan="3">&#160;</td>
</tr>
<tr valign="bottom">
<td valign="top" colspan="3" class="h2" id="{$headerID}">
<h2 class="qh2"><xsl:value-of select="$header"/></h2>
</td>
</tr>
<xsl:for-each select="/config/option[@class=$class]">
<xsl:sort select="name" order="ascending" />
<tr>
<td valign="top" id="{name}" colspan="2" class="qoptiontitletd">
<h4 class="qoptiontitle"><xsl:value-of select="name"/></h4>
</td>
<td class="tabletitlelink" valign="top" align="right">
<a href="#qtop">Top</a>
</td>
</tr>
<tr>
<td valign="top" class="qlabel">Type:</td>
<td class="qvalu"><xsl:value-of select="type"/></td>
</tr>
<tr>
<td valign="top" class="qlabel">Default:</td>
<td class="qvalu">
<xsl:choose>
<xsl:when test="string-length(default) &gt; 0">
<xsl:apply-templates select="default" />
</xsl:when>
<xsl:otherwise>-</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<tr>
<td valign="top" class="qlabel">Example:</td>
<td class="qvalu">
<xsl:choose>
<xsl:when test="string-length(example) &gt; 0">
<xsl:apply-templates select="example"/>
</xsl:when>
<xsl:otherwise>-</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<xsl:choose>
<xsl:when test="seealso">
<tr>
<td valign="top" class="qlabel">See Also:</td>
<td valign="top" class="qvalu">
<xsl:for-each select="seealso">
<a href="#{.}"><xsl:apply-templates select="." /></a>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
</td>
</tr>
</xsl:when>
</xsl:choose>
<tr>
<td></td>
<td colspan="1" class="qdescription"><xsl:apply-templates select="description"/></td>
</tr>
<tr>
<td>&#160;</td>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template name="ClassHeaders">
<tr>
<td class="tabletitle">Option</td>
<td class="tabletitle">Type</td>
<td class="tabletitle">Default</td>
</tr>
</xsl:template>
<xsl:template name="Stylesheet">
<style type="text/css">
/* no style */
</style>
</xsl:template>
<!-- Regular Templates: -->
<xsl:template match="a | code | em | strong | br">
<xsl:element name="{local-name(.)}">
<xsl:copy-of select="@* | node()" />
</xsl:element>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,574 +0,0 @@
<?xml version="1.0"?>
<!--
For generating the `quickref.html` web page from output of
`tidy -xml-config`
(c) 2005 (W3C) MIT, ERCIM, Keio University
See tidy.h for the copyright notice.
Written by Charles Reitzel and Jelks Cabaniss
-->
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"
encoding="us-ascii"
omit-xml-declaration="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
<xsl:template match="/">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTML Tidy Configuration Options Quick Reference</title>
<xsl:call-template name="Stylesheet" />
</head>
<body>
<h1 id="top">Quick Reference</h1>
<h2>HTML Tidy Configuration Options</h2>
<p>Version: <xsl:value-of select="config/@version" /></p>
<p><a class="h3" href="#MarkupHeader">HTML, XHTML, XML</a><br />
<a class="h3" href="#DiagnosticsHeader">Diagnostics</a><br />
<a class="h3" href="#PrettyPrintHeader">Pretty Print</a><br />
<a class="h3" href="#EncodingHeader">Character Encoding</a><br />
<a class="h3" href="#MiscellaneousHeader">Miscellaneous</a></p>
<xsl:call-template name="link-section" />
<xsl:call-template name="detail-section" />
</body>
</html>
</xsl:template>
<!-- Named Templates: -->
<xsl:template name="link-section">
<table summary="Tidy Options Quick Reference Header Section" border="0"
cellpadding="3" cellspacing="0">
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<xsl:call-template name="links">
<xsl:with-param name="class">markup</xsl:with-param>
<xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
<xsl:with-param name="headerID">MarkupHeader</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="links">
<xsl:with-param name="class">diagnostics</xsl:with-param>
<xsl:with-param name="header">Diagnostics</xsl:with-param>
<xsl:with-param name="headerID">DiagnosticsHeader</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="links">
<xsl:with-param name="class">print</xsl:with-param>
<xsl:with-param name="header">Pretty Print</xsl:with-param>
<xsl:with-param name="headerID">PrettyPrintHeader</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="links">
<xsl:with-param name="class">encoding</xsl:with-param>
<xsl:with-param name="header">Character Encoding</xsl:with-param>
<xsl:with-param name="headerID">EncodingHeader</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="links">
<xsl:with-param name="class">misc</xsl:with-param>
<xsl:with-param name="header">Miscellaneous</xsl:with-param>
<xsl:with-param name="headerID">MiscellaneousHeader</xsl:with-param>
</xsl:call-template>
</table>
</xsl:template>
<xsl:template name="detail-section">
<table summary="Tidy Options Quick Reference Detail Section" border="0"
cellpadding="3" cellspacing="0">
<xsl:call-template name="reference">
<xsl:with-param name="class">markup</xsl:with-param>
<xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
<xsl:with-param name="headerID">MarkupReference</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="reference">
<xsl:with-param name="class">diagnostics</xsl:with-param>
<xsl:with-param name="header">Diagnostics</xsl:with-param>
<xsl:with-param name="headerID">DiagnosticsReference</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="reference">
<xsl:with-param name="class">print</xsl:with-param>
<xsl:with-param name="header">Pretty Print</xsl:with-param>
<xsl:with-param name="headerID">PrettyPrintReference</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="reference">
<xsl:with-param name="class">encoding</xsl:with-param>
<xsl:with-param name="header">Character Encoding</xsl:with-param>
<xsl:with-param name="headerID">EncodingReference</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="reference">
<xsl:with-param name="class">misc</xsl:with-param>
<xsl:with-param name="header">Miscellaneous</xsl:with-param>
<xsl:with-param name="headerID">MiscellaneousReference</xsl:with-param>
</xsl:call-template>
</table>
</xsl:template>
<xsl:template name="links">
<xsl:param name="class"/>
<xsl:param name="header"/>
<xsl:param name="headerID"/>
<tr valign="bottom">
<td class="h3" colspan="2" id="{$headerID}">
<xsl:value-of select="$header"/> Options</td>
<td valign="top"><a href="#top">Top</a></td>
</tr>
<xsl:call-template name="ClassHeaders" />
<xsl:for-each select="/config/option[@class=$class]">
<xsl:sort select="name" order="ascending" />
<tr>
<td><a href="#{name}"><xsl:value-of select="name"/></a></td>
<td><xsl:apply-templates select="type"/></td>
<td><xsl:choose>
<xsl:when test="string-length(default) &gt; 0 ">
<xsl:apply-templates select="default" />
</xsl:when>
<xsl:otherwise>
<strong>-</strong>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
<tr valign="bottom">
<td colspan="3">&#160;</td>
</tr>
</xsl:template>
<xsl:template name="reference">
<xsl:param name="class"/>
<xsl:param name="header"/>
<xsl:param name="headerID"/>
<tr>
<td>&#160;</td>
</tr>
<tr valign="bottom">
<td valign="top" colspan="2" class="h2" id="{$headerID}">
<xsl:value-of select="$header"/> Options Reference
</td>
</tr>
<tr>
<td>&#160;</td>
</tr>
<xsl:for-each select="/config/option[@class=$class]">
<xsl:sort select="name" order="ascending" />
<tr>
<td class="tabletitle" valign="top" id="{name}">
<xsl:value-of select="name"/>
</td>
<td class="tabletitlelink" valign="top" align="right">
<a href="#top">Top</a></td>
</tr>
<tr>
<td valign="top">Type: <strong><xsl:value-of
select="type"/></strong><br />
<xsl:choose>
<xsl:when test="string-length(default) &gt; 0">
Default: <strong><xsl:apply-templates select="default" /></strong>
</xsl:when>
<xsl:otherwise>
Default: <strong>-</strong>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(example) &gt; 0">
<br />Example: <strong><xsl:apply-templates
select="example"/></strong>
</xsl:when>
<xsl:otherwise>
<br />Example: <strong>-</strong>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="right" valign="top">
<xsl:for-each select="seealso">
<a href="#{.}"><xsl:apply-templates select="." /></a>
<xsl:if test="position() != last()">
<br />
</xsl:if>
</xsl:for-each>
</td>
</tr>
<tr>
<td colspan="2"><xsl:apply-templates select="description"/></td>
</tr>
<tr>
<td>&#160;</td>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template name="ClassHeaders">
<tr>
<td class="tabletitle">Option</td>
<td class="tabletitle">Type</td>
<td class="tabletitle">Default</td>
</tr>
</xsl:template>
<xsl:template name="Stylesheet">
<style type="text/css">
/* 1st Style ignored by Netscape */
td.dummy, font.dummy, .dummy, a:link.dummy, a:visited.dummy, a:active.dummy
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 16pt;
color: #336699;
text-decoration: none;
font-weight: normal
}
body
{
margin-left: 10%;
margin-right: 10%;
font-family: sans-serif;
background-color: #FFFFFF
}
/* Blue TITLE */
td.title, font.title, .title, a:link.title, a:visited.title, a:active.title
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 16pt;
color: #336699;
text-decoration: none;
font-weight: normal
}
/* BODY TEXT */
td.text, font.text, .text, a:link.text, a:visited.text, a:active.text
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 9pt;
color: #000000;
text-decoration: none;
font-weight: normal
}
/* BOLD BODY TEXT */
td.textbold, font.textbold, .textbold, a:link.textbold, a:visited.textbold, a:active.textbold
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 9pt;
color: #000000;
text-decoration: none;
font-weight: bold
}
/* BOLD BODY TEXT LINK WITH UNDERLINE*/
td.textboldlink, font.textboldlink, .textboldlink, a:link.textboldlink, a:visited.textboldlink, a:active.textboldlink
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 9pt;
color: #000000;
font-weight: bold
}
/* SMALL BODY TEXT */
td.smtext, font.smtext, .smtext, a:link.smtext, a:visited.smtext, a:active.smtext
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 8pt;
color: #000000;
text-decoration: none;
font-weight: normal
}
/* SMALL BOLD BODY TEXT */
td.smtextbold, font.smtextbold, .smtextbold, a:link.smtextbold, a:visited.smtextbold, a:active.smtextbold
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 8pt;
color: #000000;
text-decoration: none;
font-weight: bold
}
/* TITLES
td.title, font.title, .title, a:link.title, a:visited.title, a:active.title
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #CC3300;
text-decoration: none;
font-weight: bold
}
*/
/* SUBTITLES */
td.subtitle, font.subtitle, .subtitle, a:link.subtitle, a:visited.subtitle, a:active.subtitle
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 11pt;
color: #000000;
text-decoration: none;
font-weight: bold
}
/* LEGAL TEXT */
td.legal, font.legal, .legal, a:link.legal, a:visited.legal, a:active.legal
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 8pt;
color: #000000;
text-decoration: none;
font-weight: normal
}
td.legallink, font.legallink, .legallink, a:link.legallink, a:visited.legallink, a:active.legallink
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 8pt;
color: #CC3300;
font-weight: normal
}
/* RED TEXT */
td.textred, font.textred, .textred, a:link.textred, a:visited.textred, a:active.textred
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #CC3300;
text-decoration: none;
font-weight: normal
}
/* RED TEXT BOLD*/
td.textredbold, font.textredbold, .textredbold, a:link.textredbold, a:visited.textredbold, a:active.textredbold
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #CC3300;
text-decoration: none;
font-weight: bold
}
/* LINKS */
td.link, font.link, .link, a:link.link, a:visited.link, a:active.link
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #3366CC;
font-weight: normal
}
td.tabletitlelink, font.tabletitlelink, .tabletitlelink, a:link.tabletitlelink, a:visited.tabletitlelink, a:active.tabletitlelink
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
background-color: #e9e9d3;
color: #000000;
}
/* TABLE TITLES */
td.tabletitle, font.tabletitle, .tabletitle, a:link.tabletitle, a:visited.tabletitle, a:active.tabletitle
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #336699;
background-color: #e9e9d3;
/* text-decoration: none; */
font-weight: bold
}
/* TABLE CELL */
td.cell, tr.cell, font.cell, .cell, a:link.cell, a:visited.cell, a:active.cell
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #000000;
font-weight: normal;
/* background-color: #e9e9d3 */
background-color: #f5f5f5
}
/* SHADED TABLE CELL */
td.shaded, tr.shaded, font.shaded, .shaded, a:link.shaded, a:visited.shaded, a:active.shaded
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #000000;
font-weight: normal;
background-color: #f5f5f5
}
/* GLOSSARY TERM */
td.term, font.term, .term, a:link.term, a:visited.term, a:active.term
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
font-style: normal;
color: #000000;
text-decoration: none;
font-weight: normal
}
/* ELEMENT TAGS */
ul
{
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
font-style: normal;
font-weight: normal
}
li
{
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
font-style: normal;
font-weight: normal
}
a:link.h1, a:visited.h1, .h1
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #0066CC
}
a:active.h1
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
font-weight: bold;
color: #0066CC
}
h1
{
margin-left: -8%;
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #0066CC
}
.h2
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 11pt;
/* font-weight: bold; */
color: #000000
}
h2
{
margin-left: -4%;
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 11pt;
/* font-weight: bold; */
color: #000000
}
A:link.h3, A:visited.h3, .h3
{ font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #000000;
font-weight: bold
}
A:active.h3
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #000000;
font-weight: bold
}
h3
{
margin-left: -4%;
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
font-weight: bold;
color: #000000
}
h4
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 9pt;
font-weight: bold;
color: #000000
}
.code, A:active.code, A:link.code, A:visited.code
{
font-family: "Courier New", Courier, monospace;
}
.abstract
{
font-style : italic;
}
p
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
font-style: normal
}
td
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
font-style: normal
}
/* LINKS */
a:link, a:active
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #3366CC;
font-weight: normal
}
a:visited
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #333366;
font-weight: normal
}
code {
/* use browser/user default for `font-family` */
font-weight: bold;
color: brown;
background: transparent;
}
</style>
</xsl:template>
<!-- Regular Templates: -->
<xsl:template match="a | code | em | strong | br">
<xsl:element name="{local-name(.)}">
<xsl:copy-of select="@* | node()" />
</xsl:element>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,304 +0,0 @@
body {
background-color: #efefef;
}
#titlearea {
background-image: url(http://www.html-tidy.org/assets/images/green-abstract-background.jpg);
background-size: cover;
}
#projectname {
font-family: sans-serif;
font-size: 22pt;
margin: 0 0 0 0;
margin-left: 150px;
padding: 2px 0px;
color: white;
}
#projectnumber {
font-size: 12pt;
}
#projectbrief {
font-family: sans-serif;
font-size: 10pt;
color: #dddddd;
margin-left: 150px;
}
.contents h1 {
font-size: 15pt;
font-family: monospace;
color: #4D4D74;
font-weight: bold;
border-left: none;
border-top: none;
border-bottom: 2px solid #cccccc;
margin: 30px 0px 10px 0px;
padding: 5px 0 5px 10px;
}
.contents h2 {
font-size: 12pt;
font-family: monospace;
color: #4D4D74;
font-weight: bold;
border-top: none;
border-bottom: 1px solid #dddddd;
margin: 20px 20% 20px 0px;
padding: 2px 0 2px 10px;
}
.contents p {
line-height: 130%;
font-size: 11pt;
font-family: sans-serif;
margin: 10px 20% 15px 10px;
padding: 0px;
}
.contents ul{
list-style-type: disc;
font-size: 11pt;
margin: 5px 20% 5px 40px;
padding: 0px;
line-height: 140%;
}
.contents ul ul{
list-style-type: circle;
margin-left: 30px;
}
.contents li{
padding: 2px 0 2px 0;
margin: 0;
ssbackground-color: pink;
}
.contents .textblock{
font-size: 10pt;
margin: 10px 50px 10px 50px;
line-height: 140%;
}
.contents .textblock code{
font-family: monospace;
font-size: 9pt;
}
.contents .todo{
font-size: 11pt;
margin: 10px 10% 20px 30px;
}
.contents .bug{
font-size: 11pt;
margin: 10px 10% 20px 30px;
}
dl
{
padding: 0 0 0 10px;
}
/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
dl.section
{
margin-left: 0px;
padding-left: 0px;
}
dl.note
{
margin: 5px 10% 5px 30px;
padding: 10px;
border-left: 4px solid;
border-color: #D0C000;
background-color: #FFFAC5;
border-radius: 10px;
}
ul dl.note{
margin-right: 0;
}
dl.warning, dl.attention
{
margin: 5px 10% 5px 30px;
padding: 10px;
border-left: 4px solid;
border-color: #FF909F;
background-color: #FFE1E5;
border-radius: 10px;
}
dl.pre, dl.post, dl.invariant
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #00D000;
}
dl.deprecated
{
margin: 5px 10% 5px 30px;
padding: 10px;
border-left:4px solid #B10BBF;
background-color: #FBC9FF;
border-radius: 10px;
}
dl.todo
{
margin: 5px 10% 5px 30px;
padding: 10px;
border-left:4px solid #00C0E0;
background-color: #DCFAFF ;
border-radius: 10px;
}
dl.bug
{
margin: 5px 10% 5px 30px;
padding: 10px;
border-left:4px solid red;
background-color: #FFC3B9 ;
border-radius: 10px;
}
dl.test
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #3030E0;
}
dl.bug
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #C08050;
}
dl.section dd {
margin-bottom: 6px;
}
table.directory tr {
border-bottom: 1px solid #cccccc !important;
}
table.directory tr:hover {
background-color: #F6FF88 !important;
}
table.directory td {
padding: 5px;
font-family: sans-serif;
}
/*****************************************************/
/* Quickref */
table.quickref {
font-size: 9pt;
font-family: monospace;
}
table.quickref tr:hover{
background-color: #F6FF88;
}
table.quickref td.qrow {
border-bottom: 1px solid #cccccc !important;
}
table td.h2 {
padding: 0;
margin: 0;
}
.qh2 {
background-color: #333333;
color: #eeeeee !important;
padding: 10px;
border-radius: 5px;
border: none;
margin: 0;
padding: 8px;
font-size: 15pt;
width: 100%;
}
table td.h3 {
background-color: #333333;
color: #eeeeee;
padding: 8px;
border-top-left-radius: 8px;
}
table td.h3top {
background-color: #333333;
padding: 8px;
border-top-right-radius: 8px;
text-align: right;
font-size: 8pt;
}
table td.h3top a{
color: #dddddd !important;
}
.h3topssssa {
color: #333333;
}
table td.tabletitle {
background-color: #cccccc;
font-size: 8pt;
}
td.tabletitlelink {
font-size: 8pt;
}
td.qoptiontitletd {
padding: 0;
margin: 0;
}
h4.qoptiontitle {
background-color: #bbbbbb;
font-size: 11pt;
font-weight: bold;
font-family: monospace;
padding: 5px 5px 5px 10px;
margin: 0;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.qlabel {
text-align: right;
font-size: 9pt;
width: 80px;
border-bottom: 1px solid #bbbbbb;
background-color: #dddddd;
font-family: sans-serif;
}
.qvalu {
font-size: 9pt;
font-weight: bold;
border-bottom: 1px solid #bbbbbb;
font-family: monospace;
border-left: 1px solid #bbbbbb;
}
.qdescription {
font-size: 11pt;
color: #333333;
margin: 0;
padding: 5px;
line-height: 140%;
border-left: 1px solid #bbbbbb;
border-bottom: 1px solid #bbbbbb;
}

View file

@ -1,448 +0,0 @@
<?xml version="1.0"?>
<!--
For generating the `tidy.1` man page from the
output of `tidy -xml-help` and `tidy -xml-config`
(c) 2005-2007 (W3C) MIT, ERCIM, Keio University
See tidy.h for the copyright notice.
Written by Jelks Cabaniss and Arnaud Desitter
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:strip-space elements="description" />
<xsl:output method="text" />
<!--
The default template match is to the document passed on the
command line to the XSLT processor, currently "tidy-help.xml".
For the detailed config options section however, the template
match is to the file "tidy-config.xml". This is captured in
the $CONFIG variable, declared here:
-->
<xsl:variable name="CONFIG" select="document('../cmake/tidy-config.xml')"/>
<!-- Main Template: -->
<xsl:template match="/">
<xsl:call-template name="header-section" />
<xsl:call-template name="cmdline-section" />
<xsl:call-template name="config-section" />
<xsl:call-template name="manpage-see-also-section" />
</xsl:template>
<!-- Named Templates: -->
<xsl:template name="header-section">
<xsl:text/>.\" tidy man page for the HTML Tidy
.TH TIDY 1 "<xsl:value-of select="cmdline/@version" />" "HTML Tidy" "<xsl:value-of select="cmdline/@version" />"
</xsl:template>
<xsl:template name="cmdline-section">
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH NAME
\fBtidy\fR - check, correct, and pretty-print HTML(5) files
.SH SYNOPSIS
\fBtidy\fR [option ...] [file ...] [option ...] [file ...]
.SH DESCRIPTION
Tidy reads HTML, XHTML, and XML files and writes cleaned-up markup. For HTML variants, it detects, reports, and corrects many common coding errors and strives to produce visually equivalent markup that is both conformant to the HTML specifications and that works in most browsers.
.LP
A common use of Tidy is to convert plain HTML to XHTML. For generic XML files, Tidy is limited to correcting basic well-formedness errors and pretty printing.
.LP
If no input file is specified, Tidy reads the standard input. If no output file is specified, Tidy writes the tidied markup to the standard output. If no error file is specified, Tidy writes messages to the standard error.
For command line options that expect a numerical argument, a default is assumed if no meaningful value can be found.
.SH OPTIONS
<xsl:call-template name="show-cmdline-options" />
.SH USAGE
.LP
Use \fB--\fR\fIoptionX valueX\fR for the detailed configuration option "optionX" with argument "valueX". See also below under \fBDetailed Configuration Options\fR as to how to conveniently group all such options in a single config file.
.LP
Input/Output default to stdin/stdout respectively. Single letter options apart from \fB-f\fR and \fB-o\fR may be combined as in:
.LP
.in 1i
\fBtidy -f errs.txt -imu foo.html\fR
.SH ENVIRONMENT
.TP
.B HTML_TIDY
Name of the default configuration file. This should be an absolute path, since you will probably invoke \fBtidy\fR from different directories. The value of HTML_TIDY will be parsed after the compiled-in default (defined with -DTIDY_CONFIG_FILE), but before any of the files specified using \fB-config\fR.
.SH "EXIT STATUS"
.IP 0
All input files were processed successfully.
.IP 1
There were warnings.
.IP 2
There were errors.
</xsl:template>
<xsl:template name="config-section">
.SH ______________________________
.SH " "
.SH "DETAILED CONFIGURATION OPTIONS"
This section describes the Detailed (i.e., "expanded") Options, which may be specified by preceding each option with \fB--\fR at the command line, followed by its desired value, OR by placing the options and values in a configuration file, and telling tidy to read that file with the \fB-config\fR standard option.
.SH SYNOPSIS
\fBtidy --\fR\fIoption1 \fRvalue1 \fB--\fIoption2 \fRvalue2 [standard options ...]
.br
\fBtidy -config \fIconfig-file \fR[standard options ...]
.SH WARNING
The options detailed here do not include the "standard" command-line options (i.e., those preceded by a single '\fB-\fR') described above in the first section of this man page.
.SH DESCRIPTION
A list of options for configuring the behavior of Tidy, which can be passed either on the command line, or specified in a configuration file.
.LP
A Tidy configuration file is simply a text file, where each option
is listed on a separate line in the form
.LP
.in 1i
\fBoption1\fR: \fIvalue1\fR
.br
\fBoption2\fR: \fIvalue2\fR
.br
etc.
.LP
The permissible values for a given option depend on the option's \fBType\fR. There are five types: \fIBoolean\fR, \fIAutoBool\fR, \fIDocType\fR, \fIEnum\fR, and \fIString\fR. Boolean types allow any of \fIyes/no, y/n, true/false, t/f, 1/0\fR. AutoBools allow \fIauto\fR in addition to the values allowed by Booleans. Integer types take non-negative integers. String types generally have no defaults, and you should provide them in non-quoted form (unless you wish the output to contain the literal quotes).
.LP
Enum, Encoding, and DocType "types" have a fixed repertoire of items; consult the \fIExample\fR[s] provided below for the option[s] in question.
.LP
You only need to provide options and values for those whose defaults you wish to override, although you may wish to include some already-defaulted options and values for the sake of documentation and explicitness.
.LP
Here is a sample config file, with at least one example of each of the five Types:
.LP
\fI
// sample Tidy configuration options
output-xhtml: yes
add-xml-decl: no
doctype: strict
char-encoding: ascii
indent: auto
wrap: 76
repeated-attributes: keep-last
error-file: errs.txt
\fR
.LP
Below is a summary and brief description of each of the options. They are listed alphabetically within each category. There are five categories: \fIHTML, XHTML, XML\fR options, \fIDiagnostics\fR options, \fIPretty Print\fR options, \fICharacter Encoding\fR options, and \fIMiscellaneous\fR options.
.LP
.SH OPTIONS
<xsl:call-template name="show-config-options" />
</xsl:template>
<xsl:template name="show-cmdline-options">
.SS File manipulation
<xsl:call-template name="cmdline-detail">
<xsl:with-param name="category">file-manip</xsl:with-param>
</xsl:call-template>
.SS Processing directives
<xsl:call-template name="cmdline-detail">
<xsl:with-param name="category">process-directives</xsl:with-param>
</xsl:call-template>
.SS Character encodings
<xsl:call-template name="cmdline-detail">
<xsl:with-param name="category">char-encoding</xsl:with-param>
</xsl:call-template>
.SS Miscellaneous
<xsl:call-template name="cmdline-detail">
<xsl:with-param name="category">misc</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="cmdline-detail">
<!--
For each option in one of the 3 categories/classes, provide its
1. names
2. description
3. equivalent configuration option
-->
<xsl:param name="category" />
<xsl:for-each select='/cmdline/option[@class=$category]'>
<xsl:text>
.TP
</xsl:text>
<xsl:call-template name="process-names" />
<xsl:text>
</xsl:text>
<xsl:apply-templates select="description" />
<xsl:text>
</xsl:text>
<xsl:call-template name="process-eqconfig" />
</xsl:for-each>
</xsl:template>
<xsl:template name="process-names">
<!-- Used only in the cmdline section -->
<xsl:for-each select="name">
<xsl:text />\fB<xsl:value-of select="." />\fR<xsl:text />
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="process-eqconfig">
<!-- Used only in the cmdline section -->
<xsl:if test="string-length(eqconfig) &gt; 0">
<xsl:for-each select="eqconfig">
<xsl:text>(\fI</xsl:text>
<xsl:value-of select="." />
<xsl:text>\fR)</xsl:text>
</xsl:for-each>
</xsl:if>
</xsl:template>
<xsl:template name="show-config-options">
<!-- Used only in the cmdline section -->
.SS HTML, XHTML, XML options:
<xsl:call-template name="config-detail">
<xsl:with-param name="category">markup</xsl:with-param>
</xsl:call-template>
.SS Diagnostics options:
<xsl:call-template name="config-detail">
<xsl:with-param name="category">diagnostics</xsl:with-param>
</xsl:call-template>
.SS Pretty Print options:
<xsl:call-template name="config-detail">
<xsl:with-param name="category">print</xsl:with-param>
</xsl:call-template>
.SS Character Encoding options:
<xsl:call-template name="config-detail">
<xsl:with-param name="category">encoding</xsl:with-param>
</xsl:call-template>
.SS Miscellaneous options:
<xsl:call-template name="config-detail">
<xsl:with-param name="category">misc</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!--
Note that any templates called implicitly or explicitly
from the "config-detail" template below will match on
the document referred to by the $CONFIG variable, i.e.,
the file "tidy-config.xml", created by running
tidy -xml-config > tidy-config.xml
The $CONFIG variable is set at the top level of this
stylesheet.
-->
<xsl:template name="config-detail">
<!--
For each option in one of the 5 categories/classes, provide its
1. name
2. type
3. default (if any)
4. example (if any)
5. seealso (if any)
6. description
-->
<xsl:param name="category" />
<xsl:for-each select='$CONFIG/config/option[@class=$category]'>
<xsl:sort select="name" order="ascending" />
.TP
\fB<xsl:apply-templates select="name" />\fR
Type: \fI<xsl:apply-templates select="type" />\fR
.br
<xsl:call-template name="provide-default" />
.br
<xsl:call-template name="provide-example" />
<xsl:text>
</xsl:text>
<xsl:apply-templates select="description" />
<xsl:call-template name="seealso" />
</xsl:for-each>
</xsl:template>
<!-- Used only in the config options section: -->
<xsl:template name="seealso">
<xsl:if test="seealso">
<xsl:text>
</xsl:text>
.rj 1
\fBSee also\fR: <xsl:text />
<xsl:for-each select="seealso">
<xsl:text />\fI<xsl:value-of select="." />\fR<xsl:text />
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:if>
</xsl:template>
<!-- Used only in the config options section: -->
<xsl:template name="provide-default">
<!--
Picks up the default from the XML. If the `default` element
doesn't exist, or it's empty, a single '-' is provided.
-->
<xsl:choose>
<xsl:when test="string-length(default) &gt; 0 ">
<xsl:text />Default: \fI<xsl:apply-templates
select="default" />\fR<xsl:text />
</xsl:when>
<xsl:otherwise>
<xsl:text />Default: \fI-\fR<xsl:text />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Used only in the config options section: -->
<xsl:template name="provide-example">
<!--
By default, doesn't output examples for String types (mirroring the
quickref page). But for *any* options in the XML instance that
have an `example` child, that example will be used in lieu of a
stylesheet-provided one. (Useful e.g. for `repeated-attributes`).
-->
<xsl:choose>
<xsl:when test="string-length(example) &gt; 0">
<xsl:text />Example: \fI<xsl:apply-templates
select="example" />\fR<xsl:text />
</xsl:when>
<xsl:otherwise>
<xsl:text />Default: \fI-\fR<xsl:text />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Called from the templates below matching `code`, `em`, `strong`: -->
<xsl:template name="escape-backslash">
<!--
Since backslashes are "special" to the *roff processors used
to generate man pages, we need to escape backslash characters
appearing in content with another backslash.
-->
<xsl:choose>
<xsl:when test="contains(.,'\')">
<xsl:value-of select=
"concat( substring-before(.,'\'), '\\', substring-after(.,'\') )" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Appears at the bottom of the man page: -->
<xsl:template name="manpage-see-also-section">
.SH SEE ALSO
For more information about HTML Tidy:
.RS 4
.LP
http://www.html-tidy.org/
.RE
.LP
For more information on HTML:
.RS 4
.LP
\fBHTML: Edition for Web Authors\fR (the latest HTML specification)
.br
http://dev.w3.org/html5/spec-author-view
.LP
\fBHTML: The Markup Language\fR (an HTML language reference)
.br
http://dev.w3.org/html5/markup/
.RE
.LP
For bug reports and comments:
.RS 4
.LP
https://github.com/htacg/tidy-html5/issues/
.RE
.LP
Or send questions and comments to \fBpublic-htacg@w3.org\fR.
.LP
Validate your HTML documents using the \fBW3C Nu Markup Validator\fR:
.RS 4
.LP
http://validator.w3.org/nu/
.RE
.SH AUTHOR
\fBTidy\fR was written by \fBDave Raggett\fR &lt;dsr@w3.org&gt;, and subsequently maintained by a team at http://tidy.sourceforge.net/,
and now maintained by \fBHTACG\fR (http://www.htacg.org).
.LP
The sources for \fBHTML Tidy\fR are available at https://github.com/htacg/tidy-html5/ under the MIT Licence.
</xsl:template>
<!-- Regular Templates: -->
<xsl:template match="description">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="a">
<xsl:apply-templates />
<xsl:text /> at \fI<xsl:value-of select="@href" />\fR<xsl:text />
</xsl:template>
<xsl:template match="code | em">
<xsl:text />\fI<xsl:call-template name="escape-backslash" />\fR<xsl:text />
</xsl:template>
<xsl:template match="br">
<xsl:text>
.br
</xsl:text>
</xsl:template>
<xsl:template match="strong">
<xsl:text />\fB<xsl:call-template name="escape-backslash" />\fR<xsl:text />
</xsl:template>
<!--
The following templates
a) normalize whitespace, primarily necessary for `description`
b) do so without stripping possible whitespace surrounding `code`
d) strip leading and trailing whitespace in 'description` and `code`
(courtesy of Ken Holman on the XSL-list):
-->
<xsl:template match="text()[preceding-sibling::node() and
following-sibling::node()]">
<xsl:variable name="ns" select="normalize-space(concat('x',.,'x'))"/>
<xsl:value-of select="substring( $ns, 2, string-length($ns) - 2 )" />
</xsl:template>
<xsl:template match="text()[preceding-sibling::node() and
not( following-sibling::node() )]">
<xsl:variable name="ns" select="normalize-space(concat('x',.))"/>
<xsl:value-of select="substring( $ns, 2, string-length($ns) - 1 )" />
</xsl:template>
<xsl:template match="text()[not( preceding-sibling::node() ) and
following-sibling::node()]">
<xsl:variable name="ns" select="normalize-space(concat(.,'x'))"/>
<xsl:value-of select="substring( $ns, 1, string-length($ns) - 1 )" />
</xsl:template>
<xsl:template match="text()[not( preceding-sibling::node() ) and
not( following-sibling::node() )]">
<xsl:value-of select="normalize-space(.)"/>
</xsl:template>
</xsl:stylesheet>

View file

@ -878,6 +878,26 @@ static void optionhelp( TidyDoc tdoc )
ForEachSortedOption( tdoc, printOption );
}
static void optiondescribe( TidyDoc tdoc, char *tag )
{
printf( "\nNote this help function is UNDOCUMENTED, and still needs work.\n" );
printf( "\n`%s`\n\n", tag );
TidyOptionId topt = tidyOptGetIdForName( tag );
char *result = NULL;
if (topt < N_TIDY_OPTIONS)
{
result = (char*)tidyOptGetDoc( tdoc, tidyGetOption( tdoc, topt ) );
} else
{
result = "Unknown option.";
}
printf( "%s\n\n", result );
}
static
void printOptionValues( TidyDoc ARG_UNUSED(tdoc), TidyOption topt,
OptionDesc *d )
@ -1096,6 +1116,19 @@ int main( int argc, char** argv )
tidyRelease( tdoc );
return 0; /* success */
}
else if ( strcasecmp(arg, "help-option") == 0 )
{
if ( argc >= 3)
{
optiondescribe( tdoc, argv[2] );
}
else
{
printf( "%s", "Tidy option name must be specified.\n");
}
tidyRelease( tdoc );
return 0; /* success */
}
else if ( strcasecmp(arg, "xml-config") == 0 )
{
XMLoptionhelp( tdoc );

View file

@ -1,6 +1,7 @@
Documentation
=============
This directory does _not_ contain documentation for HTML Tidy. It consists of files used for generating documentation for HTML Tidy.
This directory does _not_ contain documentation for HTML Tidy. It consists of
files used for generating documentation for HTML Tidy.
Please consult the main README file for more information.

View file

@ -7,9 +7,9 @@
# documentation. Relative path is okay. You shouldn't have to change this
# too often if your compiler always puts tidy in the same place.
TIDY_PATH="../cmake/tidy" # Current directory.
TIDY_PATH="../build/cmake/tidy" # Build directory.
TIDY_VERSION=`cat ../../version.txt`
TIDY_VERSION=`head -n 1 ../version.txt` # In project root directory.
cat << HEREDOC
@ -31,8 +31,8 @@ HEREDOC
# Output and flags' declarations.
DOXY_CFG="doxygen.cfg"
OUTP_DIR="temp"
DOXY_CFG="./doxygen.cfg"
OUTP_DIR="./temp"
BUILD_XSLT=1
BUILD_API=1
@ -66,20 +66,24 @@ hash xsltproc 2>/dev/null || { echo "- xsltproc not found. You require an XSLT p
if [ "$BUILD_XSLT" -eq 1 ]; then
# Use the designated tidy to get its config and help.
# These temporary files will be cleaned up later.
$TIDY_PATH -xml-config > "tidy-config.xml"
$TIDY_PATH -xml-help > "tidy-help.xml"
$TIDY_PATH -xml-config > "$OUTP_DIR/tidy-config.xml"
$TIDY_PATH -xml-help > "$OUTP_DIR/tidy-help.xml"
# 'quickref.html'
xsltproc "quickref.xsl" "tidy-config.xml" > "$OUTP_DIR/quickref.html"
xsltproc "quickref.include.xsl" "tidy-config.xml" > ./examples/quickref_include.html
# 'quickref.html' and 'quickref_include.html' for the Doxygen build.
xsltproc "./quickref.xsl" "$OUTP_DIR/tidy-config.xml" > "$OUTP_DIR/quickref.html"
xsltproc "./quickref.include.xsl" "$OUTP_DIR/tidy-config.xml" > ./examples/quickref_include.html
# 'tidy.1'
xsltproc "tidy1.xsl" "tidy-help.xml" > "$OUTP_DIR/tidy.1"
# Well, duh, we should tidy quickref.html
$TIDY_PATH -config "./tidy.cfg" -modify "$OUTP_DIR/quickref.html"
# Cleanup - Note: to avoid issues with the tidy1.xsl finding the tidy-config.xml
# document, they are created and read from the source directory instead of temp.
rm "tidy-config.xml"
rm "tidy-help.xml"
# 'tidy.1'; create a valid tidy1.xsl first by subbing CMAKE's variable.
sed "s|@TIDYCONFIG@|./tidy-config.xml|g" < ./tidy1.xsl.in > "$OUTP_DIR/tidy1.xsl"
xsltproc "$OUTP_DIR/tidy1.xsl" "$OUTP_DIR/tidy-help.xml" > "$OUTP_DIR/tidy.1"
# Cleanup
rm "$OUTP_DIR/tidy-config.xml"
rm "$OUTP_DIR/tidy-help.xml"
rm "$OUTP_DIR/tidy1.xsl"
echo "'quickref.html' and 'tidy.1' have been built.\n"
else
@ -114,11 +118,11 @@ if [ "$BUILD_API" -eq 1 ]; then
## copy license file to examples for includsing
cp ../../LICENSE.md ./examples/
cp ../README/LICENSE.md ./examples/
## this lot
# - echos and catches outputs the doxygen config
# - overwrites some vars but appending some to config an end
# - echoes and catches output of the doxygen config
# - overwrites some vars but appending some to config at end
# - which are then passed to doxygen as stdin (instead of the path to a config.file)
( cat "$DOXY_CFG"; \
echo "PROJECT_NUMBER=$TIDY_VERSION"; \
@ -131,13 +135,6 @@ if [ "$BUILD_API" -eq 1 ]; then
rm "./examples/tidy5.config.txt"
rm "./examples/LICENSE.md"
## create zip file of docs
cd $OUTP_DIR;
#zip -r "tidy-docs-$TIDY_VERSION.zip" ./tidylib_api
echo "\nTidyLib API documentation has been built."
else
echo "* $OUTP_DIR/tidylib_api/ was skipped because not all dependencies were satisfied."

View file

@ -1,8 +1,8 @@
/*!
\page quick_ref Quick Ref
\page quick_ref Quick Reference
Quick reference generated from the tidy command
HTML Tidy Configuration Options

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,8 @@
<?xml version="1.0"?>
<!--
For generating the `quickref.html` web page from output of
`tidy -xml-config`
For generating the `quickref_include.html` web page from output of
`tidy -xml-config`, which is used in our Doxygen documentation
project.
(c) 2005 (W3C) MIT, ERCIM, Keio University
See tidy.h for the copyright notice.
@ -15,7 +16,7 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"
encoding="us-ascii"
encoding="UTF-8"
omit-xml-declaration="yes"
/>
@ -40,7 +41,7 @@
<!-- Named Templates: -->
<xsl:template name="link-section">
<table summary="Tidy Options Quick Reference Header Section" border="0"
<table summary="Options Quick Reference Index Section" border="0"
cellpadding="3" cellspacing="0" class="quickref">
<colgroup>
<col width="33%" />
@ -208,7 +209,7 @@
<tr>
<td></td>
<td colspan="1" class="qdescription"><xsl:apply-templates select="description"/></td>
<td colspan="1" class="qdescription"><xsl:copy-of select="description/node()"/></td>
</tr>

View file

@ -1,7 +1,8 @@
<?xml version="1.0"?>
<!--
For generating the `quickref.html` web page from output of
`tidy -xml-config`
`tidy -xml-config`, which is used on our websites and can
be generated by end users.
(c) 2005 (W3C) MIT, ERCIM, Keio University
See tidy.h for the copyright notice.
@ -15,7 +16,7 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"
encoding="us-ascii"
encoding="UTF-8"
omit-xml-declaration="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
@ -23,25 +24,26 @@
<xsl:template match="/">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTML Tidy Configuration Options Quick Reference</title>
<title>HTML Tidy <xsl:value-of select="config/@version" /> Options Quick Reference</title>
<xsl:call-template name="Stylesheet" />
</head>
<body>
<h1 id="top">Quick Reference</h1>
<h1 id="top">HTML Tidy <xsl:value-of select="config/@version" /> Options Quick Reference</h1>
<h2>HTML Tidy Configuration Options</h2>
<p>Version: <xsl:value-of select="config/@version" /></p>
<p><a class="h3" href="#MarkupHeader">HTML, XHTML, XML</a><br />
<a class="h3" href="#DiagnosticsHeader">Diagnostics</a><br />
<a class="h3" href="#PrettyPrintHeader">Pretty Print</a><br />
<a class="h3" href="#EncodingHeader">Character Encoding</a><br />
<a class="h3" href="#MiscellaneousHeader">Miscellaneous</a></p>
<h2>Option Groups</h2>
<ul class="option_groups">
<li><a href="#MarkupHeader">HTML, XHTML, XML</a></li>
<li><a href="#DiagnosticsHeader">Diagnostics</a></li>
<li><a href="#PrettyPrintHeader">Pretty Print</a></li>
<li><a href="#EncodingHeader">Character Encoding</a></li>
<li><a href="#MiscellaneousHeader">Miscellaneous</a></li>
</ul>
<h2>Option Index</h2>
<xsl:call-template name="link-section" />
<h2>Option Details</h2>
<xsl:call-template name="detail-section" />
</body>
@ -52,13 +54,7 @@
<!-- Named Templates: -->
<xsl:template name="link-section">
<table summary="Tidy Options Quick Reference Header Section" border="0"
cellpadding="3" cellspacing="0">
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<table summary="Options Quick Reference Index Section" class="index_table">
<xsl:call-template name="links">
<xsl:with-param name="class">markup</xsl:with-param>
<xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
@ -89,8 +85,7 @@
<xsl:template name="detail-section">
<table summary="Tidy Options Quick Reference Detail Section" border="0"
cellpadding="3" cellspacing="0">
<table summary="Options Quick Reference Detail Section" class="detail_table">
<xsl:call-template name="reference">
<xsl:with-param name="class">markup</xsl:with-param>
<xsl:with-param name="header">HTML, XHTML, XML</xsl:with-param>
@ -124,12 +119,15 @@
<xsl:param name="class"/>
<xsl:param name="header"/>
<xsl:param name="headerID"/>
<tr valign="bottom">
<td class="h3" colspan="2" id="{$headerID}">
<xsl:value-of select="$header"/> Options</td>
<td valign="top"><a href="#top">Top</a></td>
<thead>
<tr class="header_category">
<td colspan="3" id="{$headerID}">
<xsl:value-of select="$header"/> Options
</td>
</tr>
<xsl:call-template name="ClassHeaders" />
</thead>
<tbody>
<xsl:for-each select="/config/option[@class=$class]">
<xsl:sort select="name" order="ascending" />
<tr>
@ -146,9 +144,7 @@
</td>
</tr>
</xsl:for-each>
<tr valign="bottom">
<td colspan="3">&#160;</td>
</tr>
</tbody>
</xsl:template>
@ -157,415 +153,219 @@
<xsl:param name="header"/>
<xsl:param name="headerID"/>
<tr>
<td>&#160;</td>
</tr>
<tr valign="bottom">
<td valign="top" colspan="2" class="h2" id="{$headerID}">
<thead>
<tr class="header_category">
<td colspan="2" id="{$headerID}">
<xsl:value-of select="$header"/> Options Reference
</td>
</tr>
<tr>
<td>&#160;</td>
</tr>
</thead>
<xsl:for-each select="/config/option[@class=$class]">
<xsl:sort select="name" order="ascending" />
<tr>
<td class="tabletitle" valign="top" id="{name}">
<thead>
<tr class="header_option_name">
<td colspan="2" id="{name}">
<xsl:value-of select="name"/>
</td>
<td class="tabletitlelink" valign="top" align="right">
<a href="#top">Top</a></td>
</tr>
</thead>
<tbody>
<tr>
<td>Type:</td>
<td><xsl:value-of select="type"/></td>
</tr>
<tr>
<td valign="top">Type: <strong><xsl:value-of
select="type"/></strong><br />
<td>Default:</td>
<td>
<xsl:choose>
<xsl:when test="string-length(default) &gt; 0">
Default: <strong><xsl:apply-templates select="default" /></strong>
<xsl:apply-templates select="default" />
</xsl:when>
<xsl:otherwise>
Default: <strong>-</strong>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(example) &gt; 0">
<br />Example: <strong><xsl:apply-templates
select="example"/></strong>
</xsl:when>
<xsl:otherwise>
<br />Example: <strong>-</strong>
-
</xsl:otherwise>
</xsl:choose>
</td>
<td align="right" valign="top">
</tr>
<tr>
<td>Example</td>
<td>
<xsl:choose>
<xsl:when test="string-length(example) &gt; 0">
<xsl:apply-templates select="example"/>
</xsl:when>
<xsl:otherwise>
-
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<tr>
<td>See also:</td>
<td>
<xsl:for-each select="seealso">
<a href="#{.}"><xsl:apply-templates select="." /></a>
<xsl:if test="position() != last()">
<br />
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
</td>
</tr>
<tr>
<td colspan="2"><xsl:apply-templates select="description"/></td>
</tr>
<tr>
<td>&#160;</td>
<td></td>
<td class="qdescription"><xsl:apply-templates select="description"/></td>
</tr>
</tbody>
</xsl:for-each>
</xsl:template>
<xsl:template name="ClassHeaders">
<tr>
<td class="tabletitle">Option</td>
<td class="tabletitle">Type</td>
<td class="tabletitle">Default</td>
<tr class="header_column_labels" >
<td>Option</td>
<td>Type</td>
<td>Default</td>
</tr>
</xsl:template>
<xsl:template name="Stylesheet">
<style type="text/css">
/* 1st Style ignored by Netscape */
td.dummy, font.dummy, .dummy, a:link.dummy, a:visited.dummy, a:active.dummy
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 16pt;
color: #336699;
text-decoration: none;
font-weight: normal
}
/**************************************
BASIC STYLES
**************************************/
body
{
margin-left: 10%;
margin-right: 10%;
font-family: sans-serif;
background-color: #FFFFFF
margin: 3em;
padding: 0;
font-family: Helvetica, sans-serif;
font-size: 100%;
color: black;
background-color: cornsilk
}
/* Blue TITLE */
td.title, font.title, .title, a:link.title, a:visited.title, a:active.title
a
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 16pt;
color: #336699;
text-decoration: none;
font-weight: normal
}
/* BODY TEXT */
td.text, font.text, .text, a:link.text, a:visited.text, a:active.text
a:hover
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 9pt;
color: #000000;
text-decoration: none;
font-weight: normal
text-decoration: underline;
}
/* BOLD BODY TEXT */
td.textbold, font.textbold, .textbold, a:link.textbold, a:visited.textbold, a:active.textbold
a,
a:visited
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 9pt;
color: #000000;
text-decoration: none;
font-weight: bold
color: blue;
}
/* BOLD BODY TEXT LINK WITH UNDERLINE*/
td.textboldlink, font.textboldlink, .textboldlink, a:link.textboldlink, a:visited.textboldlink, a:active.textboldlink
/**************************************
MAKE BR FORMAT LIKE P
**************************************/
td.qdescription br
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 9pt;
color: #000000;
font-weight: bold
content: " ";
display: block;
margin: 10px 0;
}
/* SMALL BODY TEXT */
td.smtext, font.smtext, .smtext, a:link.smtext, a:visited.smtext, a:active.smtext
/**************************************
OPTION GROUP INDEX
**************************************/
ul.option_groups
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 8pt;
color: #000000;
text-decoration: none;
font-weight: normal
list-style-type: square;
}
/* SMALL BOLD BODY TEXT */
td.smtextbold, font.smtextbold, .smtextbold, a:link.smtextbold, a:visited.smtextbold, a:active.smtextbold
ul.option_groups li
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 8pt;
color: #000000;
text-decoration: none;
font-weight: bold
line-height: 150%;
}
/* TITLES
td.title, font.title, .title, a:link.title, a:visited.title, a:active.title
/**************************************
TABLES
**************************************/
table
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #CC3300;
text-decoration: none;
font-weight: bold
}
*/
/* SUBTITLES */
td.subtitle, font.subtitle, .subtitle, a:link.subtitle, a:visited.subtitle, a:active.subtitle
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 11pt;
color: #000000;
text-decoration: none;
font-weight: bold
}
/* LEGAL TEXT */
td.legal, font.legal, .legal, a:link.legal, a:visited.legal, a:active.legal
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 8pt;
color: #000000;
text-decoration: none;
font-weight: normal
}
td.legallink, font.legallink, .legallink, a:link.legallink, a:visited.legallink, a:active.legallink
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 8pt;
color: #CC3300;
font-weight: normal
}
/* RED TEXT */
td.textred, font.textred, .textred, a:link.textred, a:visited.textred, a:active.textred
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #CC3300;
text-decoration: none;
font-weight: normal
}
/* RED TEXT BOLD*/
td.textredbold, font.textredbold, .textredbold, a:link.textredbold, a:visited.textredbold, a:active.textredbold
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #CC3300;
text-decoration: none;
font-weight: bold
}
/* LINKS */
td.link, font.link, .link, a:link.link, a:visited.link, a:active.link
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #3366CC;
font-weight: normal
}
td.tabletitlelink, font.tabletitlelink, .tabletitlelink, a:link.tabletitlelink, a:visited.tabletitlelink, a:active.tabletitlelink
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
background-color: #e9e9d3;
color: #000000;
}
/* TABLE TITLES */
td.tabletitle, font.tabletitle, .tabletitle, a:link.tabletitle, a:visited.tabletitle, a:active.tabletitle
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #336699;
background-color: #e9e9d3;
/* text-decoration: none; */
font-weight: bold
}
/* TABLE CELL */
td.cell, tr.cell, font.cell, .cell, a:link.cell, a:visited.cell, a:active.cell
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #000000;
font-weight: normal;
/* background-color: #e9e9d3 */
background-color: #f5f5f5
}
/* SHADED TABLE CELL */
td.shaded, tr.shaded, font.shaded, .shaded, a:link.shaded, a:visited.shaded, a:active.shaded
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #000000;
font-weight: normal;
background-color: #f5f5f5
}
/* GLOSSARY TERM */
td.term, font.term, .term, a:link.term, a:visited.term, a:active.term
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
font-style: normal;
color: #000000;
text-decoration: none;
font-weight: normal
}
/* ELEMENT TAGS */
ul
{
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
font-style: normal;
font-weight: normal
}
li
{
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
font-style: normal;
font-weight: normal
}
a:link.h1, a:visited.h1, .h1
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #0066CC
}
a:active.h1
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
font-weight: bold;
color: #0066CC
}
h1
{
margin-left: -8%;
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 12pt;
color: #0066CC
}
.h2
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 11pt;
/* font-weight: bold; */
color: #000000
}
h2
{
margin-left: -4%;
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 11pt;
/* font-weight: bold; */
color: #000000
}
A:link.h3, A:visited.h3, .h3
{ font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #000000;
font-weight: bold
}
A:active.h3
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #000000;
font-weight: bold
}
h3
{
margin-left: -4%;
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
font-weight: bold;
color: #000000
}
h4
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 9pt;
font-weight: bold;
color: #000000
}
.code, A:active.code, A:link.code, A:visited.code
{
font-family: "Courier New", Courier, monospace;
}
.abstract
{
font-style : italic;
}
p
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
font-style: normal
border-collapse: collapse;
}
td
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
font-style: normal
padding: 5px;
}
/* LINKS */
a:link, a:active
/* CATEGORY ROWS */
tr.header_category
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #3366CC;
font-weight: normal
}
a:visited
{
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
font-size: 10pt;
color: #333366;
font-weight: normal
}
code {
/* use browser/user default for `font-family` */
background-color: burlywood;
line-height: 3.0em;
font-size: 1.2em;
font-weight: bold;
color: brown;
background: transparent;
}
tr.header_category td,
table.detail_table .section_thead tr td
{
padding-left: 1em;
}
/* INDEX HEADER ROW and DETAIL OPTION NAME */
tr.header_column_labels,
tr.header_option_name
{
background-color: antiquewhite;
}
tr.header_column_labels td
{
font-weight: bold;
padding-left: 1.0em;
}
tr.header_option_name td
{
font-size: 1.1em;
font-weight: bold;
padding-left: 1.0em;
line-height: 1.2em;
}
/* INDEX TABLE APPEARANCE */
table.index_table tbody tr
{
line-height: 2em;
border-bottom: 1px solid burlywood;
}
table.index_table tbody tr td:first-child
{
padding-left: 1em;
}
/* DETAILS TABLE DETAILS */
table.detail_table tbody td:first-child
{
text-align: right;
font-weight: bold;
min-width: 6.0em;
}
code
{
color: darkgreen;
font-size: 1.3em;
}
</style>
</xsl:template>
<!-- Regular Templates: -->
<xsl:template match="a | code | em | strong | br">
<xsl:template match="a | code | em | strong | br | p">
<xsl:element name="{local-name(.)}">
<xsl:copy-of select="@* | node()" />
</xsl:element>

View file

@ -302,3 +302,9 @@ h4.qoptiontitle {
border-left: 1px solid #bbbbbb;
border-bottom: 1px solid #bbbbbb;
}
td.qdescription br {
content: " ";
display: block;
margin: 10px 0;
}

82
documentation/tidy.cfg Normal file
View file

@ -0,0 +1,82 @@
# Tidy Options generated and exported by Balthisar Tidy for Mac OS X.
# Please visit http://www.balthisar.com for more information about Balthisar Tidy.
# - Double-check encoding values; Balthisar Tidy set them all to "utf8".
# - If "accessibility-check" has a string after the number, its okay; it will work fine.
# To use this configuration file with the native command line version of Tidy, use Tidy like this:
# tidy -config tidy.cfg some_file.html
#
accessibility-check: 0 (Tidy Classic)
add-xml-decl: no
add-xml-space: no
alt-text:
anchor-as-name: yes
ascii-chars: no
assume-xml-procins: no
bare: no
break-before-br: no
clean: yes
coerce-endtags: yes
css-prefix:
decorate-inferred-ul: no
doctype: html5
drop-empty-elements: yes
drop-empty-paras: yes
drop-proprietary-attributes: no
enclose-block-text: no
enclose-text: no
escape-cdata: no
fix-backslash: yes
fix-bad-comments: yes
fix-uri: yes
force-output: no
gdoc: no
hide-comments: no
indent: yes
indent-attributes: no
indent-cdata: no
indent-spaces: 4
input-encoding: utf8
input-xml: no
join-classes: no
join-styles: no
literal-attributes: no
logical-emphasis: no
lower-literals: yes
markup: yes
merge-divs: auto
merge-emphasis: yes
merge-spans: auto
ncr: yes
new-blocklevel-tags:
new-empty-tags:
new-inline-tags:
new-pre-tags:
newline: LF
numeric-entities: no
omit-optional-tags: no
output-encoding: utf8
output-html: no
output-xhtml: no
output-xml: no
preserve-entities: yes
punctuation-wrap: no
quote-ampersand: yes
quote-marks: no
quote-nbsp: yes
repeated-attributes: keep-last
replace-color: yes
show-body-only: no
sort-attributes: none
tab-size: 8
tidy-mark: yes
uppercase-attributes: no
uppercase-tags: no
vertical-space: no
word-2000: no
wrap: 0
wrap-asp: yes
wrap-attributes: no
wrap-jste: yes
wrap-php: yes
wrap-script-literals: no
wrap-sections: yes

View file

@ -21,7 +21,9 @@
command line to the XSLT processor, currently "tidy-help.xml".
For the detailed config options section however, the template
match is to the file "tidy-config.xml". This is captured in
the $CONFIG variable, declared here:
the $CONFIG variable, declared here. CMAKE configure will
substitute TIDYCONFIG during the build. Shell scripts will
have to do the same.
-->
<xsl:variable name="CONFIG" select="document('@TIDYCONFIG@')"/>
@ -251,12 +253,14 @@ For each option in one of the 5 categories/classes, provide its
6. description
-->
<xsl:param name="category" />
.rs
.sp 1
<xsl:for-each select='$CONFIG/config/option[@class=$category]'>
<xsl:sort select="name" order="ascending" />
.TP
\fB<xsl:apply-templates select="name" />\fR
Type: \fI<xsl:apply-templates select="type" />\fR
Type: <xsl:apply-templates select="type" />
.br
<xsl:call-template name="provide-default" />
.br
@ -296,11 +300,11 @@ doesn't exist, or it's empty, a single '-' is provided.
-->
<xsl:choose>
<xsl:when test="string-length(default) &gt; 0 ">
<xsl:text />Default: \fI<xsl:apply-templates
select="default" />\fR<xsl:text />
<xsl:text />Default: <xsl:apply-templates
select="default" /><xsl:text />
</xsl:when>
<xsl:otherwise>
<xsl:text />Default: \fI-\fR<xsl:text />
<xsl:text />Default: -<xsl:text />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@ -316,11 +320,11 @@ stylesheet-provided one. (Useful e.g. for `repeated-attributes`).
-->
<xsl:choose>
<xsl:when test="string-length(example) &gt; 0">
<xsl:text />Example: \fI<xsl:apply-templates
select="example" />\fR<xsl:text />
<xsl:text />Example: <xsl:apply-templates
select="example" /><xsl:text />
</xsl:when>
<xsl:otherwise>
<xsl:text />Default: \fI-\fR<xsl:text />
<xsl:text />Default: -<xsl:text />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@ -403,9 +407,26 @@ The sources for \fBHTML Tidy\fR are available at https://github.com/htacg/tidy-h
<xsl:text />\fI<xsl:call-template name="escape-backslash" />\fR<xsl:text />
</xsl:template>
<xsl:template match="p[1]">
<xsl:text>
.sp 1
</xsl:text>
<xsl:text /><xsl:call-template name="escape-backslash" />
</xsl:template>
<xsl:template match="p[position() != 1]">
<xsl:text>
.sp 1
</xsl:text>
<xsl:text /><xsl:call-template name="escape-backslash" />
<xsl:text>
.sp 1
</xsl:text>
</xsl:template>
<xsl:template match="br">
<xsl:text>
.br
.sp 1
</xsl:text>
</xsl:template>

View file

@ -22,10 +22,11 @@
/* used to point to Web Accessibility Guidelines */
#define ACCESS_URL "http://www.w3.org/WAI/GL"
/* points to the Adaptive Technology Resource Centre at the
/* points to Tidy's accessibility page, previously available
** at the Adaptive Technology Resource Centre at the
** University of Toronto
*/
#define ATRC_ACCESS_URL "http://www.aprompt.ca/Tidy/accessibilitychecks.html"
#define ATRC_ACCESS_URL "http://www.html-tidy.org/accessibility/"
#include "version.h"
@ -365,39 +366,50 @@ static const TidyOptionId TidyNumEntitiesLinks[] =
{ TidyDoctype, TidyPreserveEntities, TidyUnknownOption };
static const TidyOptionId TidyDropFontTagsLinks[] =
{ TidyMakeClean, TidyUnknownOption };
static const TidyOptionId TidyMakeCleanTagsLinks[] =
{ TidyDropFontTags, TidyUnknownOption };
static const TidyOptionId TidyGDocCleanLinks[] =
{ TidyMakeClean, TidyUnknownOption };
/* Documentation of options */
/* Documentation of options
** As of 2015-October these descriptions are used uniquely by
** printXMLDescription from which quickref.html and the Unix
** man pages are generated, and the xslt for building all
** documentation now supports the following tags in descriptions:
** <code>, <em>, <strong>, <br />, <p>
** Note that the xslt processor requires <br /> to be self closing!
*/
static const TidyOptionDoc option_docs[] =
{
{TidyXmlDecl,
"This option specifies if Tidy should add the XML declaration when "
"outputting XML or XHTML. Note that if the input already includes an "
"&lt;?xml ... ?&gt; declaration then this option will be ignored. "
"If the encoding for the output is different from \"ascii\", one of the "
"utf encodings or \"raw\", the declaration is always added as required by "
"the XML standard. "
"outputting XML or XHTML. "
"<br/>"
"Note that if the input already includes an <code>&lt;?xml ... ?&gt;</code> "
"declaration then this option will be ignored. "
"<br/>"
"If the encoding for the output is different from <code>ascii</code>, one "
"of the utf encodings or <code>raw</code>, the declaration is always added "
"as required by the XML standard. "
, TidyXmlDeclLinks
},
{TidyXmlSpace,
"This option specifies if Tidy should add xml:space=\"preserve\" to "
"elements such as &lt;PRE&gt;, &lt;STYLE&gt; and &lt;SCRIPT&gt; when "
"generating XML. This is needed if the whitespace in such elements is to "
"This option specifies if Tidy should add "
"<code>xml:space=\"preserve\"</code> to elements such as "
"<code>&lt;pre&gt;</code>, <code>&lt;style&gt;</code> and "
"<code>&lt;script&gt;</code> when generating XML. "
"<br/>"
"This is needed if the whitespace in such elements is to "
"be parsed appropriately without having access to the DTD. "
},
{TidyAltText,
"This option specifies the default \"alt=\" text Tidy uses for "
"&lt;IMG&gt; attributes. This feature is dangerous as it suppresses "
"further accessibility warnings. You are responsible for making your "
"documents accessible to people who can not see the images! "
"This option specifies the default <code>alt=</code> text Tidy uses for "
"<code>&lt;img&gt;</code> attributes. "
"<br/>"
"Use with care, as this feature suppresses further accessibility warnings. "
},
{TidyXmlPIs,
"This option specifies if Tidy should change the parsing of processing "
"instructions to require ?&gt; as the terminator rather than &gt;. This "
"option is automatically set if the input is in XML. "
"instructions to require <code>?&gt;</code> as the terminator rather than "
"<code>&gt;</code>. "
"<br/>"
"This option is automatically set if the input is in XML. "
},
{TidyMakeBare,
"This option specifies if Tidy should strip Microsoft specific HTML "
@ -405,46 +417,57 @@ static const TidyOptionDoc option_docs[] =
"spaces where they exist in the input. "
},
{TidyCSSPrefix,
"This option specifies the prefix that Tidy uses for styles rules. By "
"default, \"c\" will be used. "
"This option specifies the prefix that Tidy uses for styles rules. "
"<br/>"
"By default, <code>c</code> will be used. "
},
{TidyMakeClean,
"This option specifies if Tidy "
"should perform cleaning of some legacy presentational tags (currently "
"&lt;i&gt;, &lt;b&gt;, &lt;center&gt; when enclosed within appropriate "
"inline tags, and &lt;font&gt;). If set then legacy tags will be replaced "
"with CSS &lt;style&gt; tags and structural markup as appropriate. "
"This option specifies if Tidy should perform cleaning of some legacy "
"presentational tags (currently <code>&lt;i&gt;</code>, "
"<code>&lt;b&gt;</code>, <code>&lt;center&gt;</code> when enclosed within "
"appropriate inline tags, and <code>&lt;font&gt;</code>). If set to "
"<code>yes</code> then legacy tags will be replaced with CSS "
"<code>&lt;style&gt;</code> tags and structural markup as appropriate. "
,
},
{TidyGDocClean,
"This option specifies if Tidy "
"should enable specific behavior for cleaning up HTML exported from "
"Google Docs. "
"This option specifies if Tidy should enable specific behavior for "
"cleaning up HTML exported from Google Docs. "
,
},
{TidyDoctype,
"This option specifies the DOCTYPE declaration generated by Tidy.<br />"
"If set to \"omit\" the output won't contain a DOCTYPE declaration.<br />"
"If set to \"html5\" the DOCTYPE is set to \"&lt;!DOCTYPE html>\".<br />"
"If set to \"auto\" (the default) Tidy will use an educated guess based "
"upon the contents of the document.<br />"
"If set to \"strict\", Tidy will set the DOCTYPE to the HTML4 or XHTML1 "
"strict DTD.<br />"
"If set to \"loose\", the DOCTYPE is set to the HTML4 or XHTML1 loose "
"(transitional) DTD. <br />"
"Alternatively, you can supply a string for the formal public identifier "
"(FPI).<br />"
"This option specifies the DOCTYPE declaration generated by Tidy. "
"<br/>"
"For example: <br />"
"doctype: \"-//ACME//DTD HTML 3.14159//EN\"<br />"
"If set to <code>omit</code> the output won't contain a DOCTYPE "
"declaration. Note this this also implies <code>numeric-entities</code> is "
"set to <code>yes</code>"
"<br/>"
"If set to <code>html5</code> the DOCTYPE is set to "
"<code>&lt;!DOCTYPE html&gt;</code>."
"<br/>"
"If set to <code>auto</code> (the default) Tidy will use an educated guess "
"based upon the contents of the document."
"<br/>"
"If set to <code>strict</code>, Tidy will set the DOCTYPE to the HTML4 or "
"XHTML1 strict DTD."
"<br/>"
"If set to <code>loose</code>, the DOCTYPE is set to the HTML4 or XHTML1 "
"loose (transitional) DTD."
"<br/>"
"Alternatively, you can supply a string for the formal public identifier "
"(FPI)."
"<br/>"
"For example: "
"<br/>"
"<code>doctype: \"-//ACME//DTD HTML 3.14159//EN\"</code>"
"<br/>"
"If you specify the FPI for an XHTML document, Tidy will set the "
"system identifier to an empty string. For an HTML document, Tidy adds a "
"system identifier only if one was already present in order to preserve "
"the processing mode of some browsers. Tidy leaves the DOCTYPE for "
"generic XML documents unchanged. <code>--doctype omit</code> implies "
"<code>--numeric-entities yes</code>. This option does not offer a "
"validation of the document conformance. "
"generic XML documents unchanged. "
"<br/>"
"This option does not offer a validation of document conformance. "
},
{TidyDropEmptyElems,
"This option specifies if Tidy should discard empty elements. "
@ -453,39 +476,50 @@ static const TidyOptionDoc option_docs[] =
"This option specifies if Tidy should discard empty paragraphs. "
},
{TidyDropFontTags,
"Deprecated; DO NOT USE. This option is destructive to &lt;font&gt; tags, "
"and it will be removed from future versions of Tidy. Use the clean option "
"instead. If you do set this option despite the warning it will perform "
"as clean except styles will be inline instead of put into a CSS class. "
"&lt;font&gt; tags will be dropped completely and their styles will not be "
"preserved. If both clean and this option are enabled, &lt;font&gt; tags "
"will still be dropped completely, and other styles will be preserved in a "
"CSS class instead of inline. See clean for more information. "
"Deprecated; <em>do not use</em>. This option is destructive to "
"<code>&lt;font&gt;</code> tags, and it will be removed from future "
"versions of Tidy. Use the <code>clean</code> option instead. "
"<br/>"
"If you do set this option despite the warning it will perform "
"as <code>clean</code> except styles will be inline instead of put into "
"a CSS class. <code>&lt;font&gt;</code> tags will be dropped completely "
"and their styles will not be preserved. "
"<br/>"
"If both <code>clean</code> and this option are enabled, "
"<code>&lt;font&gt;</code> tags will still be dropped completely, and "
"other styles will be preserved in a CSS class instead of inline. "
"<br/>"
"See <code>clean</code> for more information. "
, TidyDropFontTagsLinks
},
{TidyDropPropAttrs,
"This option specifies if Tidy should strip out proprietary attributes, "
"such as MS data binding attributes. "
"such as Microsoft data binding attributes. "
},
{TidyEncloseBlockText,
"This option specifies if Tidy should insert a &lt;P&gt; element to "
"enclose any text it finds in any element that allows mixed content for "
"HTML transitional but not HTML strict. "
"This option specifies if Tidy should insert a <code>&lt;p&gt;</code> "
"element to enclose any text it finds in any element that allows mixed "
"content for HTML transitional but not HTML strict. "
},
{TidyEncloseBodyText,
"This option specifies if Tidy should enclose any text it finds in the "
"body element within a &lt;P&gt; element. This is useful when you want to "
"take existing HTML and use it with a style sheet. "
"body element within a <code>&lt;p&gt;</code> element."
"<br/>"
"This is useful when you want to take existing HTML and use it with a "
"style sheet. "
},
{TidyEscapeCdata,
"This option specifies if Tidy should convert &lt;![CDATA[]]&gt; "
"sections to normal text. "
"This option specifies if Tidy should convert "
"<code>&lt;![CDATA[]]&gt;</code> sections to normal text. "
},
{TidyFixComments,
"This option specifies if Tidy should replace unexpected hyphens with "
"\"=\" characters when it comes across adjacent hyphens. The default is "
"yes. This option is provided for users of Cold Fusion which uses the "
"comment syntax: &lt;!--- ---&gt; "
"<code>=</code> characters when it comes across adjacent hyphens. "
"<br/>"
"The default is <code>yes</code>. "
"<br/>"
"This option is provided for users of Cold Fusion which uses the "
"comment syntax: <code>&lt;!--- ---&gt;</code>. "
},
{TidyFixUri,
"This option specifies if Tidy should check attribute values that carry "
@ -498,22 +532,34 @@ static const TidyOptionDoc option_docs[] =
{TidyCoerceEndTags,
"This option specifies if Tidy should coerce a start tag into an end tag "
"in cases where it looks like an end tag was probably intended; "
"for example, given &lt;span&gt;foo &lt;b&gt;bar&lt;b&gt; baz&lt;/span&gt;, "
"Tidy will output &lt;span&gt;foo &lt;b&gt;bar&lt;/b&gt; baz&lt;/span&gt;. "
"for example, given "
"<br/>"
"<code>&lt;span&gt;foo &lt;b&gt;bar&lt;b&gt; baz&lt;/span&gt;</code> "
"<br/>"
"Tidy will output "
"<br/>"
"<code>&lt;span&gt;foo &lt;b&gt;bar&lt;/b&gt; baz&lt;/span&gt;</code> "
},
{TidyOmitOptionalTags,
"This option specifies if Tidy should omit optional start tags and end tags "
"when generating output. Setting this option causes all tags for the "
"html, head, and body elements to be omitted from output, as well as such "
"end tags as &lt;/p&gt;, &lt;/li&gt;, &lt;/dt&gt;, &lt;/dd&gt;, "
"&lt;/option&gt;, &lt;/tr&gt;, &lt;/td&gt;, and &lt;/th&gt;. "
"when generating output. "
"<br/>"
"Setting this option causes all tags for the <code>&lt;html&gt;</code>, "
"<code>&lt;head&gt;</code>, and <code>&lt;body&gt;</code> elements to be "
"omitted from output, as well as such end tags as <code>&lt;/p&gt;</code>, "
"<code>&lt;/li&gt;</code>, <code>&lt;/dt&gt;</code>, "
"<code>&lt;/dd&gt;</code>, <code>&lt;/option&gt;</code>, "
"<code>&lt;/tr&gt;</code>, <code>&lt;/td&gt;</code>, and "
"<code>&lt;/th&gt;</code>. "
"<br/>"
"This option is ignored for XML output. "
},
{TidyHideEndTags,
"This option is an alias for omit-optional-tags. "
"This option is an alias for <code>omit-optional-tags</code>. "
},
{TidyIndentCdata,
"This option specifies if Tidy should indent &lt;![CDATA[]]&gt; sections. "
"This option specifies if Tidy should indent "
"<code>&lt;![CDATA[]]&gt;</code> sections. "
},
{TidyXmlTags,
"This option specifies if Tidy should use the XML parser rather than the "
@ -521,47 +567,62 @@ static const TidyOptionDoc option_docs[] =
},
{TidyJoinClasses,
"This option specifies if Tidy should combine class names to generate "
"a single new class name, if multiple class assignments are detected on "
"a single, new class name if multiple class assignments are detected on "
"an element. "
, TidyJoinClassesLinks
},
{TidyJoinStyles,
"This option specifies if Tidy should combine styles to generate a single "
"new style, if multiple style values are detected on an element. "
"This option specifies if Tidy should combine styles to generate a single, "
"new style if multiple style values are detected on an element. "
, TidyJoinStylesLinks
},
{TidyLogicalEmphasis,
"This option specifies if Tidy should replace any occurrence of &lt;I&gt; "
"by &lt;EM&gt; and any occurrence of &lt;B&gt; by &lt;STRONG&gt;. In both "
"cases, the attributes are preserved unchanged. This option can be set "
"independently of the clean and drop-font-tags options. "
"This option specifies if Tidy should replace any occurrence of "
"<code>&lt;i&gt;</code> with <code>&lt;em&gt;</code> and any occurrence of "
"<code>&lt;b&gt;</code> with <code>&lt;strong&gt;</code>. Any attributes "
"are preserved unchanged. "
"<br/>"
"This option can be set independently of the <code>clean</code> option. "
},
{TidyLowerLiterals,
"This option specifies if Tidy should convert the value of an attribute "
"that takes a list of predefined values to lower case. This is required "
"for XHTML documents. "
"that takes a list of predefined values to lower case. "
"<br/>"
"This is required for XHTML documents. "
},
{TidyMergeEmphasis,
"This option specifies if Tidy should merge nested &lt;b&gt; and &lt;i&gt; "
"elements; for example, for the case "
"&lt;b class=\"rtop-2\"&gt;foo &lt;b class=\"r2-2\"&gt;bar&lt;/b&gt; baz&lt;/b&gt;, "
"Tidy will output &lt;b class=\"rtop-2\"&gt;foo bar baz&lt;/b&gt;. "
"This option specifies if Tidy should merge nested <code>&lt;b&gt;</code> "
"and <code>&lt;i&gt;</code> elements; for example, for the case "
"<br/>"
"<code>&lt;b class=\"rtop-2\"&gt;foo &lt;b class=\"r2-2\"&gt;bar&lt;/b&gt; baz&lt;/b&gt;</code>, "
"<br/>"
"Tidy will output <code>&lt;b class=\"rtop-2\"&gt;foo bar baz&lt;/b&gt;</code>. "
},
{TidyMergeDivs,
"Can be used to modify behavior of -c (--clean yes) option. "
"This option specifies if Tidy should merge nested &lt;div&gt; such as "
"\"&lt;div&gt;&lt;div&gt;...&lt;/div&gt;&lt;/div&gt;\". If set to "
"\"auto\", the attributes of the inner &lt;div&gt; are moved to the "
"outer one. As well, nested &lt;div&gt; with ID attributes are not "
"merged. If set to \"yes\", the attributes of the inner &lt;div&gt; "
"are discarded with the exception of \"class\" and \"style\". "
"This option can be used to modify the behavior of <code>clean</code> when "
"set to <code>yes</code>."
"<br/>"
"This option specifies if Tidy should merge nested <code>&lt;div&gt;</code> "
"such as <code>&lt;div&gt;&lt;div&gt;...&lt;/div&gt;&lt;/div&gt;</code>. "
"<br/>"
"If set to <code>auto</code> the attributes of the inner "
"<code>&lt;div&gt;</code> are moved to the outer one. Nested "
"<code>&lt;div&gt;</code> with <code>id</code> attributes are <em>not</em> "
"merged. "
"<br/>"
"If set to <code>yes</code> the attributes of the inner "
"<code>&lt;div&gt;</code> are discarded with the exception of "
"<code>class</code> and <code>style</code>. "
,TidyMergeDivsLinks
},
{TidyMergeSpans,
"Can be used to modify behavior of -c (--clean yes) option. "
"This option specifies if Tidy should merge nested &lt;span&gt; such as "
"\"&lt;span&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;\". The algorithm "
"is identical to the one used by --merge-divs. "
"This option can be used to modify the behavior of <code>clean</code> when "
"set to <code>yes</code>."
"<br/>"
"This option specifies if Tidy should merge nested <code>&lt;span&gt;</code> "
"such as <code>&lt;span&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;</code>. "
"<br/>"
"The algorithm is identical to the one used by <code>merge-divs</code>. "
,TidyMergeSpansLinks
},
#if SUPPORT_ASIAN_ENCODINGS
@ -571,44 +632,63 @@ static const TidyOptionDoc option_docs[] =
#endif
{TidyBlockTags,
"This option specifies new block-level tags. This 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 "
"&lt;TABLE&gt;, &lt;UL&gt;, &lt;OL&gt; and &lt;DL&gt;. This option is "
"ignored in XML mode. "
"comma separated list of tag names. "
"<br/>"
"Unless you declare new tags, Tidy will refuse to generate a tidied file if "
"the input includes previously unknown tags. "
"<br/>"
"Note you can't change the content model for elements such as "
"<code>&lt;table&gt;</code>, <code>&lt;ul&gt;</code>, "
"<code>&lt;ol&gt;</code> and <code>&lt;dl&gt;</code>. "
"<br/>"
"This option is ignored in XML mode. "
,TidyBlockTagsLinks
},
{TidyEmptyTags,
"This option specifies new empty inline tags. This 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. This option is ignored in XML mode. "
"or comma separated list of tag names. "
"<br/>"
"Unless you declare new tags, Tidy will refuse to generate a tidied file if "
"the input includes previously unknown tags. "
"<br/>"
"Remember to also declare empty tags as either inline or blocklevel. "
"<br/>"
"This option is ignored in XML mode. "
,TidyEmptyTagsLinks
},
{TidyInlineTags,
"This option specifies new non-empty inline tags. This 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. This option is ignored in XML mode. "
"space or comma separated list of tag names. "
"<br/>"
"Unless you declare new tags, Tidy will refuse to generate a tidied file if "
"the input includes previously unknown tags. "
"<br/>"
"This option is ignored in XML mode. "
,TidyInlineTagsLinks
},
{ TidyPreTags,
"This option specifies "
"new tags that are to be processed in exactly the same way as HTML's "
"&lt;PRE&gt; element. This 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 not as yet add new CDATA elements (similar to &lt;SCRIPT&gt;). "
"This option specifies new tags that are to be processed in exactly the "
"same way as HTML's <code>&lt;pre&gt;</code> element. This option takes a "
"space or comma separated list of tag names. "
"<br/>"
"Unless you declare new tags, Tidy will refuse to generate a tidied file if "
"the input includes previously unknown tags. "
"<br/>"
"Note you cannot as yet add new CDATA elements. "
"<br/>"
"This option is ignored in XML mode. "
,TidyPreTagsLinks
},
{TidyNumEntities,
"This option specifies if Tidy should output entities other than the "
"built-in HTML entities (&amp;amp;, &amp;lt;, &amp;gt; and &amp;quot;) in "
"the numeric rather than the named entity form. Only entities compatible "
"with the DOCTYPE declaration generated are used. Entities that can be "
"represented in the output encoding are translated correspondingly. "
"built-in HTML entities (<code>&amp;amp;</code>, <code>&amp;lt;</code>, "
"<code>&amp;gt;</code>, and <code>&amp;quot;</code>) in the numeric rather "
"than the named entity form. "
"<br/>"
"Only entities compatible with the DOCTYPE declaration generated are used. "
"<br/>"
"Entities that can be represented in the output encoding are translated "
"correspondingly. "
,TidyNumEntitiesLinks
},
{TidyHtmlOut,
@ -618,30 +698,38 @@ static const TidyOptionDoc option_docs[] =
{TidyXhtmlOut,
"This option specifies if Tidy should generate pretty printed output, "
"writing it as extensible HTML. "
"<br/>"
"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 setting of the \"numeric-entities\" option. The original case of tags "
"and attributes will be preserved, regardless of other options. "
"appropriate to XHTML, and will use the corrected value in output "
"regardless of other sources. "
"<br/>"
"For XHTML, entities can be written as named or numeric entities according "
"to the setting of <code>numeric-entities</code>. "
"<br/>"
"The original case of tags and attributes will be preserved, regardless of "
"other options. "
},
{TidyXmlOut,
"This option specifies if Tidy should pretty print 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 a XML parser. The original "
"case of tags and attributes will be preserved, regardless of other "
"options. "
"well-formed XML. "
"<br/>"
"Any entities not defined in XML 1.0 will be written as numeric entities to "
"allow them to be parsed by an XML parser. "
"<br/>"
"The original case of tags and attributes will be preserved, regardless of "
"other options. "
},
{TidyQuoteAmpersand,
"This option specifies if Tidy should output unadorned &amp; characters as "
"&amp;amp;. "
"This option specifies if Tidy should output unadorned <code>&amp;</code> "
"characters as <code>&amp;amp;</code>. "
},
{TidyQuoteMarks,
"This option specifies if Tidy should output &quot; characters 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;. "
"This option specifies if Tidy should output <code>&quot;</code> characters "
"as <code>&amp;quot;</code> as is preferred by some editing environments. "
"<br/>"
"The apostrophe character <code>'</code> is written out as "
"<code>&amp;#39;</code> since many web browsers don't yet support "
"<code>&amp;apos;</code>. "
},
{TidyQuoteNbsp,
"This option specifies if Tidy should output non-breaking space characters "
@ -649,53 +737,64 @@ static const TidyOptionDoc option_docs[] =
},
{TidyDuplicateAttrs,
"This option specifies if Tidy should keep the first or last attribute, if "
"an attribute is repeated, e.g. has two align attributes. "
"an attribute is repeated, e.g. has two <code>align</code> attributes. "
, TidyDuplicateAttrsLinks
},
{TidySortAttributes,
"This option specifies that tidy should sort attributes within an element "
"using the specified sort algorithm. If set to \"alpha\", the algorithm is "
"an ascending alphabetic sort. "
"This option specifies that Tidy should sort attributes within an element "
"using the specified sort algorithm. If set to <code>alpha</code>, the "
"algorithm is an ascending alphabetic sort. "
},
{TidyReplaceColor,
"This option specifies if Tidy should replace numeric values in color "
"attributes by HTML/XHTML color names where defined, e.g. replace "
"\"#ffffff\" with \"white\". "
"attributes with HTML/XHTML color names where defined, e.g. replace "
"<code>#ffffff</code> with <code>white</code>. "
},
{TidyBodyOnly,
"This option specifies if Tidy should print only the contents of the "
"body tag as an HTML fragment. If set to \"auto\", this is performed only "
"if the body tag has been inferred. Useful for incorporating "
"existing whole pages as a portion of another page. "
"body tag as an HTML fragment. "
"<br/>"
"If set to <code>auto</code>, this is performed only if the body tag has "
"been inferred. "
"<br/>"
"Useful for incorporating existing whole pages as a portion of another "
"page. "
"<br/>"
"This option has no effect if XML output is requested. "
},
{TidyUpperCaseAttrs,
"This option specifies if Tidy should output attribute names in upper "
"case. The default is no, which results in lower case attribute names, "
"except for XML input, where the original case is preserved. "
"case. "
"<br/>"
"The default is <code>no</code>, which results in lower case attribute "
"names, except for XML input, where the original case is preserved. "
},
{TidyUpperCaseTags,
"This option specifies if Tidy should output tag names in upper case. "
"The default is no, which results in lower case tag names, except for XML "
"input, where the original case is preserved. "
"<br/>"
"The default is <code>no</code> which results in lower case tag names, "
"except for XML input where the original case is preserved. "
},
{TidyWord2000,
"This option specifies if Tidy should go to great pains to strip out all "
"the surplus stuff Microsoft Word 2000 inserts when you save Word "
"documents as \"Web pages\". Doesn't handle embedded images or VML. "
"documents as \"Web pages\". It doesn't handle embedded images or VML. "
"<br/>"
"You should consider using Word's \"Save As: Web Page, Filtered\". "
},
{TidyAccessibilityCheckLevel,
"This option specifies what level of accessibility checking, if any, "
"that Tidy should do. Level 0 is equivalent to Tidy Classic's "
"accessibility checking. "
"For more information on Tidy's accessibility checking, visit the "
"<a href=\"http://www.aprompt.ca/Tidy/accessibilitychecks.html\" "
">Adaptive Technology Resource Centre at the University of Toronto</a>. "
"that Tidy should perform. "
"<br/>"
"Level <code>0 (Tidy Classic)</code> is equivalent to Tidy Classic's accessibility "
"checking. "
"<br/>"
"For more information on Tidy's accessibility checking, visit "
"<a href=\"" ATRC_ACCESS_URL "\"> Tidy's Accessibility Page</a>. "
},
{TidyShowErrors,
"This option specifies the number Tidy uses to determine if further errors "
"should be shown. If set to 0, then no errors are shown. "
"should be shown. If set to <code>0</code>, then no errors are shown. "
},
{TidyShowInfo,
"This option specifies if Tidy should display info-level messages. "
@ -706,39 +805,53 @@ static const TidyOptionDoc option_docs[] =
},
{TidyBreakBeforeBR,
"This option specifies if Tidy should output a line break before each "
"&lt;BR&gt; element. "
"<code>&lt;br&gt;</code> element. "
},
{TidyIndentContent,
"This option specifies if Tidy should indent block-level tags. If set to "
"\"auto\", this option causes Tidy to decide whether or not to indent the "
"content of tags such as TITLE, H1-H6, LI, TD, TD, 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 "
"This option specifies if Tidy should indent block-level tags. "
"<br/>"
"If set to <code>auto</code> Tidy will decide whether or not to indent the "
"content of tags such as <code>&lt;title&gt;</code>, "
"<code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code>, <code>&lt;li&gt;</code>, "
"<code>&lt;td&gt;</code>, or <code>&lt;p&gt;</code> "
"based on the content including a block-level element. "
"<br/>"
"Setting <code>indent</code> to <code>yes</code> can expose layout bugs in "
"some browsers. "
"<br/>"
"Use the option <code>indent-spaces</code> to control the number of spaces "
"or tabs output per level of indent, and <code>indent-with-tabs</code> to "
"specify whether spaces or tabs are used. "
,TidyIndentContentLinks
},
{TidyIndentAttributes,
"This option specifies if Tidy should begin each attribute on a new line. "
},
{TidyIndentSpaces,
"This option specifies the number of spaces Tidy uses to indent content, "
"when indentation is enabled. "
"This option specifies the number of spaces or tabs that Tidy uses to "
"indent content when <code>indent</code> is enabled. "
"<br/>"
"Note that the default value for this option is dependent upon the value of "
"<code>indent-with-tabs</code> (see also). "
,TidyIndentSpacesLinks
},
{TidyLiteralAttribs,
"This option specifies how Tidy deals with whitespace characters within "
"attribute values. If the value is \"no\" (the default), Tidy \"munges\" "
"or \"normalizes\" attribute values by replacing any newline or tab "
"character with a single space character, and further by replacing "
"any sequences of multiple whitespace characters with a single space. "
"To force tidy to preserve the original, literal values of all attributes, "
"and ensure that whitespace characters within attribute values are passed "
"through unchanged, set this option to \"yes\". "
"attribute values. "
"<br/>"
"If the value is <code>no</code> Tidy normalizes attribute values by "
"replacing any newline or tab with a single space, and further by replacing "
"any contiguous whitespace with a single space. "
"<br/>"
"To force Tidy to preserve the original, literal values of all attributes "
"and ensure that whitespace within attribute values is passed "
"through unchanged, set this option to <code>yes</code>. "
},
{TidyShowMarkup,
"This option specifies if Tidy should generate a pretty printed version "
"of the markup. Note that Tidy won't generate a pretty printed version if "
"it finds significant errors (see force-output). "
"it finds significant errors (see <code>force-output</code>). "
},
#if SUPPORT_ASIAN_ENCODINGS
{TidyPunctWrap,
@ -747,7 +860,7 @@ static const TidyOptionDoc option_docs[] =
},
#endif
{TidyBurstSlides,
"Currently not used. Tidy Classic only. "
"This option has no function and is deprecated. "
},
{TidyTabSize,
"This option specifies the number of columns that Tidy uses between "
@ -756,118 +869,154 @@ static const TidyOptionDoc option_docs[] =
},
{TidyVertSpace, /* Issue #228 - changed to tri-state */
"This option specifies if Tidy should add some extra empty lines for "
"readability. Default is 'no'. If set to 'auto', will eliminate nearly "
"all newline chars."
"readability. "
"<br/>"
"The default is <code>no</code>. "
"<br/>"
"If set to <code>auto</code> Tidy will eliminate nearly all newline "
"characters."
},
{TidyWrapLen,
"This option specifies the right margin Tidy uses for line wrapping. Tidy "
"tries to wrap lines so that they do not exceed this length. Set wrap to "
"zero if you want to disable line wrapping. "
"This option specifies the right margin Tidy uses for line wrapping. "
"<br/>"
"Tidy tries to wrap lines so that they do not exceed this length. "
"<br/>"
"Set <code>wrap</code> to <code>0</code>(zero) if you want to disable line "
"wrapping. "
},
{TidyWrapAsp,
"This option specifies if Tidy should line wrap text contained within ASP "
"pseudo elements, which look like: &lt;% ... %&gt;. "
"pseudo elements, which look like: <code>&lt;% ... %&gt;</code>. "
},
{TidyWrapAttVals,
"This option specifies if Tidy should line-wrap attribute values, for "
"easier editing. Line wrapping means that if the value of an attribute "
"causes a line to exceed the width specified by the \"wrap\" option, "
"tidy will add one or more line breaks to the value, causing it to "
"wrapped into multiple lines. Note that this option can be set "
"independently of wrap-script-literals. Also note that by default, Tidy "
"\"munges\" or \"normalizes\" attribute values by replacing any newline "
"or tab character with a single space character, and further by replacing "
"any sequences of multiple whitespace characters with a single space. "
"This option specifies if Tidy should line-wrap attribute values, meaning "
"that if the value of an attribute causes a line to exceed the width "
"specified by <code>wrap</code>, Tidy will add one or more line breaks to "
"the value, causing it to be wrapped into multiple lines. "
"<br/>"
"Note that this option can be set independently of "
"<code>wrap-script-literals</code>. "
"By default Tidy replaces any newline or tab with a single space and "
"replaces any sequences of whitespace with a single space. "
"<br/>"
"To force Tidy to preserve the original, literal values of all attributes, "
"and ensure that whitespace characters within attribute values are passed "
"through unchanged, set the literal-attributes option to \"yes\". "
"through unchanged, set <code>literal-attributes</code> to "
"<code>yes</code>. "
,TidyWrapAttValsLinks
},
{TidyWrapJste,
"This option specifies if Tidy should line wrap text contained within "
"JSTE pseudo elements, which look like: &lt;# ... #&gt;. "
"JSTE pseudo elements, which look like: <code>&lt;# ... #&gt;</code>. "
},
{TidyWrapPhp,
"This option specifies if Tidy should line wrap text contained within PHP "
"pseudo elements, which look like: &lt;?php ... ?&gt;. "
"pseudo elements, which look like: <code>&lt;?php ... ?&gt;</code>. "
},
{TidyWrapScriptlets,
"This option specifies if Tidy should line wrap string literals that "
"appear in script attributes. Tidy wraps long script string literals by "
"inserting a backslash character before the line break. "
"appear in script attributes. "
"<br/>"
"Tidy wraps long script string literals by inserting a backslash character "
"before the line break. "
,TidyWrapScriptletsLinks
},
{TidyWrapSection,
"This option specifies if Tidy should line wrap text contained within "
"&lt;![ ... ]&gt; section tags. "
"<code>&lt;![ ... ]&gt;</code> section tags. "
},
{TidyAsciiChars,
"Can be used to modify behavior of -c (--clean yes) option. If set "
"to \"yes\" when using -c, &amp;emdash;, &amp;rdquo;, and other named "
"character entities are downgraded to their closest ascii equivalents. "
"Can be used to modify behavior of the <code>clean</code> option when set "
"to <code>yes</code>. "
"<br/>"
"If set to <code>yes</code> when <code>clean</code>, "
"<code>&amp;emdash;</code>, <code>&amp;rdquo;</code>, and other named "
"character entities are downgraded to their closest ASCII equivalents. "
,TidyAsciiCharsLinks
},
{TidyCharEncoding,
"This option specifies the character encoding Tidy uses for both the input "
"and output. For ascii, Tidy will accept Latin-1 (ISO-8859-1) character "
"and output. "
"<br/>"
"For <code>ascii</code> Tidy will accept Latin-1 (ISO-8859-1) character "
"values, but will use entities for all characters whose value &gt;127. "
"For raw, Tidy will output values above 127 without translating them into "
"entities. For latin1, characters above 255 will be written as entities. "
"For utf8, Tidy assumes that both input and output is encoded as UTF-8. "
"You can use iso2022 for files encoded using the ISO-2022 family of "
"encodings e.g. ISO-2022-JP. For mac and win1252, Tidy will accept vendor "
"<br/>"
"For <code>raw</code>, Tidy will output values above 127 without "
"translating them into entities. "
"<br/>"
"For <code>latin1</code>, characters above 255 will be written as entities. "
"<br/>"
"For <code>utf8</code>, Tidy assumes that both input and output are encoded "
"as UTF-8. "
"<br/>"
"You can use <code>iso2022</code> for files encoded using the ISO-2022 "
"family of encodings e.g. ISO-2022-JP. "
"<br/>"
"For <code>mac</code> and <code>win1252</code>, Tidy will accept vendor "
"specific character values, but will use entities for all characters whose "
"value &gt;127. "
"<br/>"
"For unsupported encodings, use an external utility to convert to and from "
"UTF-8. "
,TidyCharEncodingLinks
},
{TidyInCharEncoding,
"This option specifies the character encoding Tidy uses for the input. See "
"char-encoding for more info. "
"<code>char-encoding</code> for more info. "
,TidyInCharEncodingLinks
},
#if SUPPORT_ASIAN_ENCODINGS
{TidyLanguage,
"Currently not used, but this option specifies the language Tidy uses "
"(for instance \"en\"). "
"Currently not used, but this option specifies the language Tidy would use "
"if it were properly localized. For example: <code>en</code>. "
},
#endif
#if SUPPORT_UTF16_ENCODINGS
{TidyOutputBOM,
"This option specifies if Tidy should write a Unicode Byte Order Mark "
"character (BOM; also known as Zero Width No-Break Space; has value of "
"U+FEFF) to the beginning of the output; only for UTF-8 and UTF-16 output "
"encodings. If set to \"auto\", this option causes Tidy to write a BOM to "
"the output only if a BOM was present at the beginning of the input. A BOM "
"is always written for XML/XHTML output using UTF-16 output encodings. "
"U+FEFF) to the beginning of the output, and only applies to UTF-8 and "
"UTF-16 output encodings. "
"<br/>"
"If set to <code>auto</code> this option causes Tidy to write a BOM to "
"the output only if a BOM was present at the beginning of the input. "
"<br/>"
"A BOM is always written for XML/XHTML output using UTF-16 output "
"encodings. "
},
#endif
{TidyOutCharEncoding,
"This option specifies the character encoding Tidy uses for the output. "
"See char-encoding for more info. May only be different from "
"input-encoding for Latin encodings (ascii, latin0, latin1, mac, win1252, "
"ibm858). "
"<br/>"
"Note that this may only be different from <code>input-encoding</code> for "
"Latin encodings (<code>ascii</code>, <code>latin0</code>, "
"<code>latin1</code>, <code>mac</code>, <code>win1252</code>, "
"<code>ibm858</code>)."
"<br/>"
"See <code>char-encoding</code> for more information"
,TidyOutCharEncodingLinks
},
{TidyNewline,
"The default is appropriate to the current platform: CRLF on PC-DOS, "
"MS-Windows and OS/2, CR on Classic Mac OS, and LF everywhere else "
"(Unix and Linux). "
"The default is appropriate to the current platform. "
"<br/>"
"Genrally CRLF on PC-DOS, Windows and OS/2; CR on Classic Mac OS; and LF "
"everywhere else (Linux, Mac OS X, and Unix). "
},
{TidyErrFile,
"This option specifies the error file Tidy uses for errors and warnings. "
"Normally errors and warnings are output to \"stderr\". "
"Normally errors and warnings are output to <code>stderr</code>. "
,TidyErrFileLinks
},
{TidyFixBackslash,
"This option specifies if Tidy should replace backslash characters "
"\"<code>\\</code>\" in URLs by forward slashes \"<code>/</code>\". "
"<code>\\</code> in URLs with forward slashes <code>/</code>. "
},
{TidyForceOutput,
"This option specifies if Tidy should produce output even if errors are "
"encountered. Use this option with care - if Tidy reports an error, this "
"means Tidy was not able to, or is not sure how to, fix the error, so the "
"encountered. "
"<br/>"
"Use this option with care; if Tidy reports an error, this "
"means Tidy was not able to (or is not sure how to) fix the error, so the "
"resulting output may not reflect your intention. "
},
{TidyEmacs,
@ -879,14 +1028,18 @@ static const TidyOptionDoc option_docs[] =
},
{TidyKeepFileTimes,
"This option specifies if Tidy should keep the original modification time "
"of files that Tidy modifies in place. The default is no. Setting the "
"option to yes allows you to tidy files without causing these files to be "
"uploaded to a web server when using a tool such as SiteCopy. Note this "
"feature is not supported on some platforms. "
"of files that Tidy modifies in place. "
"<br/>"
"Setting the option to <code>yes</code> allows you to tidy files without "
"changing the file modification date, which may be useful with certain "
"tools that use the modification date for things such as automatic server "
"deployment."
"<br/>"
"Note this feature is not supported on some platforms. "
},
{TidyOutFile,
"This option specifies the output file Tidy uses for markup. Normally "
"markup is written to \"stdout\". "
"markup is written to <code>stdout</code>. "
,TidyOutFileLinks
},
{TidyQuiet,
@ -894,46 +1047,59 @@ static const TidyOptionDoc option_docs[] =
"of errors and warnings, or the welcome or informational messages. "
},
{TidySlideStyle,
"Currently not used. Tidy Classic only. "
"This option has no function and is deprecated. "
},
{TidyMark,
"This option specifies if Tidy should add a meta element to the document "
"head to indicate that the document has been tidied. Tidy won't add a meta "
"element if one is already present. "
"This option specifies if Tidy should add a <code>meta</code> element to "
"the document head to indicate that the document has been tidied. "
"<br/>"
"Tidy won't add a meta element if one is already present. "
},
{TidyWriteBack,
"This option specifies if Tidy should write back the tidied markup to the "
"same file it read from. You are advised to keep copies of important files "
"before tidying them, as on rare occasions the result may not be what you "
"expect. "
"same file it read from. "
"<br/>"
"You are advised to keep copies of important files before tidying them, as "
"on rare occasions the result may not be what you expect. "
},
{TidyDecorateInferredUL,
"This option specifies if Tidy should decorate inferred UL elements with "
"some CSS markup to avoid indentation to the right. "
"This option specifies if Tidy should decorate inferred "
"<code>&lt;ul&gt;</code> elements with some CSS markup to avoid indentation "
"to the right. "
},
{TidyPreserveEntities,
"This option specifies if Tidy should preserve the well-formed entities "
"This option specifies if Tidy should preserve well-formed entities "
"as found in the input. "
},
{TidyAnchorAsName,
"This option controls the deletion or addition of the name attribute "
"in elements where it can serve as anchor. "
"If set to \"yes\", a name attribute, if not already existing, "
"is added along an existing id attribute if the DTD allows it. "
"If set to \"no\", any existing name attribute is removed "
"if an id attribute exists or has been added. "
"This option controls the deletion or addition of the <code>name</code> "
"attribute in elements where it can serve as anchor. "
"<br/>"
"If set to <code>yes</code> a <code>name</code> attribute, if not already "
"existing, is added along an existing <code>id</code> attribute if the DTD "
"allows it. "
"<br/>"
"If set to <code>no</code> any existing name attribute is removed if an"
"<code>id</code> attribute exists or has been added. "
},
{TidyPPrintTabs,
"Set this option \"on\" to indent using tabs instead of the default "
"spaces. The option TidyIndentSpaces controls the number of tabs output "
"per level of indent, which is reset to 1, when this option is set on. "
"And of course, indent must be enabled for this to have any effect. "
"Note TidyTabSize controls converting input tabs to spaces. Set to zero "
"to retain input tabs. "
"This option specifies if Tidy should indent with tabs instead of spaces, "
"assuming <code>indent</code> is <code>yes</code>. "
"<br/>"
"Set it to <code>yes</code> to indent using tabs instead of the default "
"spaces. "
"<br/>"
"Use the option <code>indent-spaces</code> to control the number of tabs "
"output per level of indent. Note that when <code>indent-with-tabs</code> "
"is enabled the default value of <code>indent-spaces</code> is reset to "
"<code>1</code>. "
"<br/>"
"Note <code>tab-size</code> controls converting input tabs to spaces. Set "
"it to zero to retain input tabs. "
},
{TidySkipQuotes,
"This option specifies that Tidy should skip quotes, and comments "
"when parsing script data. "
"This option specifies that Tidy should skip nested tags when parsing "
"script and style data. "
},
{N_TIDY_OPTIONS,
NULL
@ -1734,7 +1900,7 @@ void TY_(ErrorSummary)( TidyDocImpl* doc )
tidy_out(doc, "UTF-8 as a transformation of Unicode characters. ISO/IEC 10646\n");
tidy_out(doc, "does not allow mapping of unpaired surrogates, nor U+FFFE and U+FFFF\n");
tidy_out(doc, "(but it does allow other noncharacters). For more information please refer to\n");
tidy_out(doc, "http://www.unicode.org/unicode and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n\n");
tidy_out(doc, "http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n\n");
}
#if SUPPORT_UTF16_ENCODINGS
@ -1744,7 +1910,7 @@ void TY_(ErrorSummary)( TidyDocImpl* doc )
tidy_out(doc, "Character codes for UTF-16 must be in the range: U+0000 to U+10FFFF.\n");
tidy_out(doc, "The definition of UTF-16 in Annex C of ISO/IEC 10646-1:2000 does not allow the\n");
tidy_out(doc, "mapping of unpaired surrogates. For more information please refer to\n");
tidy_out(doc, "http://www.unicode.org/unicode and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n\n");
tidy_out(doc, "http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n\n");
}
#endif
@ -1832,9 +1998,6 @@ void TY_(ErrorSummary)( TidyDocImpl* doc )
if ( cfg(doc, TidyAccessibilityCheckLevel) > 0 )
tidy_out(doc, " and %s", ATRC_ACCESS_URL );
tidy_out(doc, ".\n" );
tidy_out(doc, ". You may also want to try\n" );
tidy_out(doc, "\"http://www.cast.org/bobby/\" which is a free Web-based\n");
tidy_out(doc, "service for checking URLs for accessibility.\n\n");
}
if (doc->badLayout)