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>

File diff suppressed because it is too large Load diff