RE: automatic generation of quickref.html

Charlie <[email protected]>
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
I third the motion.  I originally generated quickref.html from an XML 
file.  The idea being you could generate a man page and quick reference 
from the same doc source.  I have attached what I think are the original 
XSLT stylesheet and XML data file.

You end up wanting to embed basic HTML within the documentation for each 
option.  Modularizing HTML is still pretty much broken.  What most folks 
end up doing is embed CDATA sections, in which case the result is no good 
for man pages.

...separation of presentation and content tends to be an ideal rarely 
achieved in practice...


At 01:16 PM 3/21/2005 -0500, Jelks Cabaniss wrote:
>Bjoern Hoehrmann wrote:
> >> The idea is to have a C file (1) containing the description of each
> >> option. Then, a driver (2) generates quickref.html, making sure that
> >> all options are dealt with. The generated HTML is almost a copy
> >> of the current quickref.html.
> >
> > Well, I think I am -0 on this, I quite dislike maintaining the docs
> > in C files; I would prefer to have a proper XML format with the
> > documentation plus a command line tool to retrieve data from Tidy and
> > an XSLT to merge those.
>
>If it were to generate clean XHTML (with IDs for each option), that should 
>allow you to parse the output with XSLT or any other tool.
>
>OTOH, I agree with you that it's a good idea to have a succinct XML format 
>in place of stuff like this (from the current quickref page) ...
>
>     ...
>     <tr>
>     <td class="tabletitle" valign="top" id="write-back">write-back</td>
>     <td class="tabletitlelink" valign="top" align="right"><a
>href="#top">Top</a></td>
>     </tr>
>     <tr>
>     <td valign="top">
>       Type: <b>Boolean</b><br />
>       Default: <b>no</b><br />
>       Example: <b>y/n, yes/no, t/f, true/false, 1/0</b></td>
>     <td align="right" valign="top">
>     </td>
>     </tr>
>     <tr>
>     <td colspan="2">This option specifies if Tidy
>     should write back the tidied markup to the same file it read from. You
>are
>     advised to keep copies of important files before tidying them, as on
>rare
>     occasions the result may not be what you expect. </td>
>     </tr>
>     ...
>
>vs.
>         <TidyOptions>
>           ...
>           <option>
>             <name>write-back</name>
>             <type>Boolean</type>
>             <desc>This option specifies if Tidy should write back the 
> tidied markup to the same file it read from. You are advised to keep 
> copies of important files before tidying them, as on rare occasions the 
> result may not be what you expect.</desc>
>           </option>
>           ...
>         </TidyOptions>
>
>I think it would be nice if the latter were generated from Tidy itself,
>where it's all in one place.  Then you could run an XSLT on that, changing 
>with the times as necessary, and without all the presentational stuff 
>hardcoded into the C program.
>
>
>/Jelks
>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>_______________________________________________
>Tidy-develop mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/tidy-develop
quickref.xsl (text/plain, 6.7 KB)
<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" indent="yes"
     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 xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>HTML Tidy Configuration Options Quick Reference</title>
    <link type="text/css" rel="stylesheet" href="tidy.css" />
  </head>

  <body>
    <h1><a name="top" id="top"></a>Quick Reference</h1>

    <h2>HTML Tidy Configuration Options</h2>

    <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>

    <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>

    <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>
  </body>
  </html>
</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"><a name="{$headerID}"
    id="{$headerID}"></a><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]">
    <tr>
      <td><a href="#{name}"><xsl:value-of select="name"/></a></td>
      <td><xsl:value-of select="type"/></td>
      <td><xsl:value-of select="default"/></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'>
    <a name="{$headerID}"
    id="{$headerID}"></a><xsl:value-of select="$header"/>
    Options Reference</td>
  </tr>

  <tr>
    <td>&#160;</td>
  </tr>

  <xsl:for-each select="/config/option[@class=$class]">
    <tr>
      <td class="tabletitle" valign="top"><a name="{name}"
      id="{name}"></a><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:if test="default != ''">
       Default: <strong><xsl:value-of select="default"/></strong><br />
      </xsl:if>
      <xsl:choose>
        <xsl:when test="example">
       Example: <strong><xsl:value-of select="example"/></strong>
        </xsl:when>
        <xsl:when test="type = 'Boolean'">
       Example: <strong>yes/no, y/n, true/false, t/f, 1/0</strong>
        </xsl:when>
        <xsl:when test="type = 'AutoBool'">
       Example: <strong>auto, yes/no, y/n, true/false, t/f, 1/0</strong>
        </xsl:when>
        <xsl:when test="type = 'Integer'">
       Example: <strong>0, 1, 2, ...</strong>
        </xsl:when>
        <xsl:when test="type = 'Encoding'">
       Example: <strong>ascii, latin1, raw, utf8, iso2022, mac, win1252</strong>
        </xsl:when>
      </xsl:choose>
      </td><td align="right" valign="top"></td>
    </tr>

    <tr>
      <td colspan="2"><xsl:value-of select="description"/>&#160;</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:stylesheet>
tidyoptions.xml (application/xml, 25.9 KB)
<config>
  <option class="markup">
    <name>add-xml-decl</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should add the
    XML declaration when outputting XML or XHTML. Note that if
    the input already includes an &lt;?xml ... ?&gt; declaration
    then this option will be ignored.</description>
  </option>
  <option class="markup">
    <name>add-xml-pi</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option is the same as the add-xml-decl
    option.</description>
  </option>
  <option class="markup">
    <name>add-xml-space</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should add
    xml:space="preserve" to elements such as &lt;pre&gt;,
    &lt;style&gt; and &lt;script&gt; when generating XML. This
    is needed if the whitespace in such elements is to be parsed
    appropriately without having access to the DTD.
    </description>
  </option>
  <option class="markup">
    <name>alt-text</name>
    <type>String</type>
    <default></default>
    <description>This option specifies the default "alt=" text
    Tidy uses for &lt;img&gt; attributes. This feature is
    dangerous as it suppresses further accessibility warnings.
    You are responsible for making your documents accessible to
    people who can not see the images!</description>
  </option>
  <option class="markup">
    <name>assume-xml-procins</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should change the
    parsing of processing instructions to require ?&gt; as the
    terminator rather than &gt;. This option is automatically
    set if the input is in XML. </description>
  </option>
  <option class="markup">
    <name>bare</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should strip
    Microsoft specific HTML from Word 2000 documents, and output
    spaces rather than non-breaking spaces where they exist in
    the input.</description>
  </option>
  <option class="markup">
    <name>break-before-br</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should output a
    line break before each &lt;br&gt; element. </description>
  </option>
  <option class="markup">
    <name>clean</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should strip out
    surplus presentational tags and attributes replacing them by
    style rules and structural markup as appropriate. It works
    well on the HTML saved by Microsoft Office
    products.</description>
  </option>
  <option class="markup">
    <name>doctype</name>
    <type>DocType</type>
    <default>auto</default>
    <example>auto, omit, strict, loose, transitional, user 
     specified fpi (string)</example>
    <description>This option specifies the DOCTYPE declaration
    generated by Tidy. If set to "omit" the output won't contain
    a DOCTYPE declaration. If set to "auto" (the default) Tidy
    will use an educated guess based upon the contents of the
    document. If set to "strict", Tidy will set the DOCTYPE to
    the strict DTD. If set to "loose", the DOCTYPE is set to the
    loose (transitional) DTD. Alternatively, you can supply a
    string for the formal public identifier (FPI).

    For example: 

    doctype: "-//ACME//DTD HTML 3.14159//EN"

    If you specify the FPI for an XHTML document, Tidy will set
    the system identifier to the empty string. Tidy leaves the
    DOCTYPE for generic XML documents unchanged. </description>
  </option>
  <option class="markup">
    <name>drop-empty-paras</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should discard
    empty paragraphs. If set to no, empty paragraphs are
    replaced by a pair of &lt;br&gt; elements as HTML4 precludes
    empty paragraphs. </description>
  </option>
  <option class="markup">
    <name>drop-font-tags</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should discard
    &lt;font&gt; and &lt;center&gt; tags rather than creating
    the corresponding style rules, but only if the clean option
    is also set to yes. </description>
  </option>
  <option class="markup">
    <name>drop-proprietary-attributes</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should strip out
    proprietary attributes, such as MS data binding attributes.
    </description>
  </option>
  <option class="markup">
    <name>enclose-block-text</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should insert a
    &lt;p&gt; element to enclose any text it finds in any
    element that allows mixed content for HTML transitional but
    not HTML strict. </description>
  </option>
  <option class="markup">
    <name>enclose-text</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should enclose
    any text it finds in the body element within a &lt;p&gt;
    element. This is useful when you want to take existing HTML
    and use it with a style sheet.</description>
  </option>
  <option class="markup">
    <name>escape-cdata</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should convert
    &lt;![CDATA[]]&gt; sections to normal text.</description>
  </option>
  <option class="markup">
    <name>fix-bad-comments</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should replace
    unexpected hyphens with "=" characters when it comes across
    adjacent hyphens. The default is yes. This option is
    provided for users of Cold Fusion which uses the comment
    syntax: &lt;!--- ---&gt;</description>
  </option>
  <option class="markup">
    <name>fix-uri</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should check
    attribute values that carry URIs for illegal characters and
    if such are found, escape them as HTML 4 recommends.
    </description>
  </option>
  <option class="markup">
    <name>hide-comments</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should print out
    comments. </description>
  </option>
  <option class="markup">
    <name>hide-endtags</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should omit
    optional end-tags when generating the pretty printed markup.
    This option is ignored if you are outputting to XML.
    </description>
  </option>
  <option class="markup">
    <name>indent-cdata</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should indent
    &lt;![CDATA[]]&gt; sections.</description>
  </option>
  <option class="markup">
    <name>input-xml</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should use the
    XML parser rather than the error correcting HTML parser.
    </description>
  </option>
  <option class="markup">
    <name>join-classes</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should combine
    class names to generate a single new class name, if multiple
    class assignments are detected on an element.</description>
  </option>
  <option class="markup">
    <name>join-styles</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should combine
    styles to generate a single new style, if multiple style
    values are detected on an element.</description>
  </option>
  <option class="markup">
    <name>logical-emphasis</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should replace
    any occurrence of &lt;i&gt; by &lt;em&gt; and any occurrence
    of &lt;b&gt; by &lt;strong&gt;. In both cases, the
    attributes are preserved unchanged. This option can be set
    independently of the clean and drop-font-tags options.
    </description>
  </option>
  <option class="markup">
    <name>lower-literals</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should convert
    the value of an attribute that takes a list of predefined
    values to lower case. This is required for XHTML documents.
    </description>
  </option>
  <option class="markup">
    <name>ncr</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should allow
    numeric character references.</description>
  </option>
  <option class="markup">
    <name>new-blocklevel-tags</name>
    <type>Tag names</type>
    <default></default>
    <example>tagX, tagY, ...</example>
    <description>This option specifies new block-level tags.
    This option takes a space or comma separated list of tag
    names. Unless you declare new tags, Tidy will refuse to
    generate a tidied file if the input includes previously
    unknown tags. Note you can't change the content model for
    elements such as &lt;table&gt;, &lt;ul&gt;, &lt;ol&gt; and
    &lt;dl&gt;.</description>
  </option>
  <option class="markup">
    <name>new-empty-tags</name>
    <type>Tag names</type>
    <default></default>
    <example>tagX, tagY, ...</example>
    <description>This option specifies new empty inline tags.
    This option takes a space or comma separated list of tag
    names. Unless you declare new tags, Tidy will refuse to
    generate a tidied file if the input includes previously
    unknown tags. Remember to also declare empty tags as either
    inline or blocklevel. </description>
  </option>
  <option class="markup">
    <name>new-inline-tags</name>
    <type>Tag names</type>
    <default></default>
    <example>tagX, tagY, ...</example>
    <description>This option specifies new non-empty inline
    tags. This option takes a space or comma separated list of
    tag names. Unless you declare new tags, Tidy will refuse to
    generate a tidied file if the input includes previously
    unknown tags.</description>
  </option>
  <option class="markup">
    <name>new-pre-tags</name>
    <type>Tag names</type>
    <default></default>
    <example>tagX, tagY, ...</example>
    <description>This option specifies new tags that are to be
    processed in exactly the same way as HTML's &lt;pre&gt;
    element. This option takes a space or comma separated list
    of tag names. Unless you declare new tags, Tidy will refuse
    to generate a tidied file if the input includes previously
    unknown tags. Note you can not as yet add new CDATA elements
    (similar to &lt;script&gt;). </description>
  </option>
  <option class="markup">
    <name>numeric-entities</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should output
    entities other than the built-in HTML entities (&amp;amp;,
    &amp;lt;, &amp;gt; and &amp;quot;) in the numeric rather
    than the named entity form. </description>
  </option>
  <option class="markup">
    <name>output-xhtml</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should generate
    pretty printed output, writing it as extensible HTML. This
    option causes Tidy to set the DOCTYPE and default namespace
    as appropriate to XHTML. If a DOCTYPE or namespace is given
    they will checked for consistency with the content of the
    document. In the case of an inconsistency, the corrected
    values will appear in the output. For XHTML, entities can be
    written as named or numeric entities according to the
    setting of the "numeric-entities" option. The original case
    of tags and attributes will be preserved, regardless of
    other options.</description>
  </option>
  <option class="markup">
    <name>output-xml</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should pretty
    print output, writing it as well-formed XML. Any entities
    not defined in XML 1.0 will be written as numeric entities
    to allow them to be parsed by a XML parser. The original
    case of tags and attributes will be preserved, regardless of
    other options.</description>
  </option>
  <option class="markup">
    <name>quote-ampersand</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should output
    unadorned &amp; characters as &amp;amp;. </description>
  </option>
  <option class="markup">
    <name>quote-marks</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should output "
    characters as &amp;quot; as is preferred by some editing
    environments. The apostrophe character ' is written out as
    &amp;#39; since a few older web browsers don't support
    &amp;apos;. </description>
  </option>
  <option class="markup">
    <name>quote-nbsp</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should output
    non-breaking space characters as entities, rather than as
    the Unicode character value 160 (decimal). </description>
  </option>
  <option class="markup">
    <name>repeated-attributes</name>
    <type>-</type>
    <default>keep-last</default>
    <example>keep-first, keep-last</example>
    <description>This option specifies if Tidy should keep the
    first or last attribute, if an attribute is repeated, e.g.
    has two align attributes.</description>
  </option>
  <option class="markup">
    <name>replace-color</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should replace
    numeric values in color attributes by HTML/XHTML color names
    where defined, e.g. replace "#ffffff" with "white".
    </description>
  </option>
  <option class="markup">
    <name>show-body-only</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should print only
    the contents of the body tag as an HTML fragment.  Useful
    for incorporating existing whole pages as a portion of
    another page.</description>
  </option>
  <option class="markup">
    <name>uppercase-attributes</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should output
    attribute names in upper case. The default is no, which
    results in lower case attribute names, except for XML input,
    where the original case is preserved. </description>
  </option>
  <option class="markup">
    <name>uppercase-tags</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should output tag
    names in upper case. The default is no, which results in
    lower case tag names, except for XML input, where the
    original case is preserved. </description>
  </option>
  <option class="markup">
    <name>word-2000</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should go to
    great pains to strip out all the surplus stuff Microsoft
    Word 2000 inserts when you save Word documents as "Web
    pages". Doesn't handle embedded images or VML.
    </description>
  </option>

  <option class="diagnostics">
    <name>error-file</name>
    <type>String</type>
    <default></default>
    <description>This option specifies the error file Tidy uses
    for errors and warnings. Normally errors and warnings are
    output to "stderr".</description>
  </option>
  <option class="diagnostics">
    <name>force-output</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should produce
    output even if errors are encountered. Use this option with
    care - if Tidy reports an error, this means Tidy was not
    able to, or is not sure how to, fix the error, so the
    resulting output may not reflect your intention.
    </description>
  </option>
  <option class="diagnostics">
    <name>gnu-emacs</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should change the
    format for reporting errors and warnings to a format that is
    more easily parsed by GNU Emacs. </description>
  </option>
  <option class="diagnostics">
    <name>quiet</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should output the
    summary of the numbers of errors and warnings, or the
    welcome or informational messages.</description>
  </option>
  <option class="diagnostics">
    <name>show-errors</name>
    <type>Integer</type>
    <default>6</default>
    <description>This option specifies the number Tidy uses to
    determine if further errors should be shown. If set to 0,
    then no errors are shown.</description>
  </option>
  <option class="diagnostics">
    <name>show-warnings</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should suppress
    warnings. This can be useful when a few errors are hidden in
    a flurry of warnings. </description>
  </option>
  <option class="diagnostics">
    <name>tidy-mark</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should add a meta
    element to the document head to indicate that the document
    has been tidied. Tidy won't add a meta element if one is
    already present.</description>
  </option>

  <option class="print">
    <name>indent</name>
    <type>AutoBool</type>
    <default>no</default>
    <description>This option specifies if Tidy should indent
    block-level tags. If set to "auto", this option causes Tidy
    to decide whether or not to indent the content of tags such
    as TITLE, H1-H6, LI, TD, TD, or P depending on whether or
    not the content includes a block-level element. You are
    advised to avoid setting indent to yes as this can expose
    layout bugs in some browsers. </description>
  </option>
  <option class="print">
    <name>indent-attributes</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should begin each
    attribute on a new line. </description>
  </option>
  <option class="print">
    <name>indent-spaces</name>
    <type>Integer</type>
    <default>2</default>
    <description>This option specifies the number of spaces Tidy
    uses to indent content, when indentation is
    enabled.</description>
  </option>
  <option class="print">
    <name>literal-attributes</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should ensure
    that whitespace characters within attribute values are
    passed through unchanged.</description>
  </option>
  <option class="print">
    <name>markup</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should generate a
    pretty printed version of the markup. Note that Tidy won't
    generate a pretty printed version if it finds significant
    errors (see force-output).</description>
  </option>
  <option class="print">
    <name>tab-size</name>
    <type>Integer</type>
    <default>4</default>
    <description>This option specifies the number of columns
    that Tidy uses between successive tab stops. It is used to
    map tabs to spaces when reading the input. Tidy never
    outputs tabs. </description>
  </option>
  <option class="print">
    <name>wrap</name>
    <type>Integer</type>
    <default>68</default>
    <description>This option specifies the right margin Tidy
    uses for line wrapping. Tidy tries to wrap lines so that
    they do not exceed this length. Set wrap to zero if you want
    to disable line wrapping. </description>
  </option>
  <option class="print">
    <name>wrap-asp</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should line wrap
    text contained within ASP pseudo elements, which look like:
    &lt;% ... %&gt;. </description>
  </option>
  <option class="print">
    <name>wrap-attributes</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should line wrap
    attribute values, for easier editing. This option can be set
    independently of wrap-script-literals.</description>
  </option>
  <option class="print">
    <name>wrap-jste</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should line wrap
    text contained within JSTE pseudo elements, which look like:
    &lt;# ... #&gt;. </description>
  </option>
  <option class="print">
    <name>wrap-php</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should line wrap
    text contained within PHP pseudo elements, which look like:
    &lt;?php ... ?&gt;.</description>
  </option>
  <option class="print">
    <name>wrap-script-literals</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should line wrap
    string literals that appear in script attributes. Tidy wraps
    long script string literals by inserting a backslash
    character before the line break.</description>
  </option>
  <option class="print">
    <name>wrap-sections</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should line wrap
    text contained within &lt;![ ... ]&gt; section tags.
    </description>
  </option>

  <option class="encoding">
    <name>ascii-chars</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>Can be used to modify behavior of -c (--clean
    yes) option.  Defaults to "yes" when using -c.  Set to "no"
    to prevent converting &gt;emdash;, &amp;rdquo;, and other
    named character entities to their ascii
    equivalents.</description>
  </option>
  <option class="encoding">
    <name>char-encoding</name>
    <type>Encoding</type>
    <default>ascii</default>
    <description>This option specifies the character encoding
    Tidy uses for both the input and output. For ascii, Tidy
    will accept Latin-1 (ISO-8859-1) character values, but will
    use entities for all characters whose value &gt; 127. For
    raw, Tidy will output values above 127 without translating
    them into entities. For latin1, characters above 255 will be
    written as entities. For utf8, Tidy assumes that both input
    and output is encoded as UTF-8. You can use iso2022 for
    files encoded using the ISO-2022 family of encodings e.g.
    ISO-2022-JP. For mac and win1252, Tidy will accept vendor
    specific character values, but will use entities for all
    characters whose value &gt; 127. </description>
  </option>
  <option class="encoding">
    <name>input-encoding</name>
    <type>Encoding</type>
    <default>latin1</default>
    <description>This option specifies the character encoding
    Tidy uses for the input. See char-encoding for more
    info.</description>
  </option>
  <option class="encoding">
    <name>language</name>
    <type>Language</type>
    <default></default>
    <description>Currently not used, but this option specifies
    the language Tidy uses.</description>
  </option>
  <option class="encoding">
    <name>output-bom</name>
    <type>AutoBool</type>
    <default>auto</default>
    <description>This option specifies if Tidy should write a
    Unicode Byte Order Mark character (BOM; also known as Zero
    Width No-Break Space; has value of U+FEFF) to the beginning
    of the output; only for UTF-8 and UTF-16 output encodings.
    If set to "auto", this option causes Tidy to write a BOM to
    the output only if a BOM was present at the beginning of the
    input. A BOM is always written for XML/XHTML output using
    UTF-16 output encodings.</description>
  </option>
  <option class="encoding">
    <name>output-encoding</name>
    <type>Encoding</type>
    <default>ascii</default>
    <description>This option specifies the character encoding
    Tidy uses for the output. See char-encoding for more info.
    May only be different from input-encoding for Latin
    encodings (ascii, latin1, mac, win1252).</description>
  </option>

  <option class="misc">
    <name>fix-backslash</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should replace
    backslash characters "\" in URLs by forward slashes "/".
    </description>
  </option>
  <option class="misc">
    <name>keep-time</name>
    <type>Boolean</type>
    <default>yes</default>
    <description>This option specifies if Tidy should alter the
    last modified time for files it writes back to. The default
    is no, which allows you to tidy files without affecting
    which ones will be uploaded to a Web server when using a
    tool such as 'SiteCopy'. Note that this feature may not work
    on some platforms. </description>
  </option>
  <option class="misc">
    <name>write-back</name>
    <type>Boolean</type>
    <default>no</default>
    <description>This option specifies if Tidy should write back
    the tidied markup to the same file it read from. You are
    advised to keep copies of important files before tidying
    them, as on rare occasions the result may not be what you
    expect. </description>
  </option>
</config>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.