home *** CD-ROM | disk | FTP | other *** search
/ HTML - Publishing on the Internet / html_cdrom.iso / tools / html / mac / check / readme.40 < prev    next >
Encoding:
Text File  |  1995-02-18  |  8.7 KB  |  172 lines

  1. htmlchek version 4.0, January 17 1995
  2.  
  3.  
  4.      htmlchek  --  Syntactically checks HTML 2.0 or 3.0 files for a
  5.                    number of possible errors; can do local link
  6.                    cross-reference checking, and generate a
  7.                    rudimentary reference-dependency map.  Runs
  8.                    under awk or perl.  Includes a number of
  9.                    supplemental utilities for HTML file processing.
  10.  
  11.  
  12. This release of htmlchek (version 4.0) is a moderately significant
  13. upgrade to previous versions, and includes the following files:
  14. (The documentation for all programs and shell scripts other than htmlsrpl.pl
  15. is in htmlchek.man/htmlchek.html.)
  16.  
  17.      README.40    This file
  18.    htmlchek.man   Documentation
  19.    htmlchek.html  HTML version of Documentation
  20.  
  21.    htmlchek.awk   Awk version of htmlchek HTML error checker
  22.    htmlchek.pl    Port of htmlchek to perl
  23.     example.cfg   Sample htmlchek configuration file
  24.    html2dtd.cfg   Config. file for stricter compliance with 2.0 DTD
  25.  
  26.    htmlqref.txt   Yet another HTML quick reference (plain text)
  27.    htmlqref.html  HTML version of yet another HTML quick reference
  28.  
  29.    htmlsrpl.pl    HTML-aware search-and-replace program (perl)
  30.    htmlsrpl.man   Documentation for htmlsrpl.pl
  31.    htmlsrpl.html  HTML version of documentation for htmlsrpl.pl
  32.  
  33.    xtraclnk.pl    Extracts links and link/title text from HTML files (perl)
  34.  
  35.    makemenu.awk   Makes simple menu for HTML files using <TITLE>; can also
  36.    makemenu.pl      make table of contents using <H1>-<H6> (awk/perl)
  37.  
  38.      dehtml.awk   Remove all HTML markup, preliminary to spell check (awk)
  39.      dehtml.pl    Perl version of dehtml
  40.  
  41.      entify.awk   Replace high Latin 1 alphabetic characters with ampersand
  42.      entify.pl      entities for safe 7-bit transport (awk/perl)
  43.  
  44.    metachar.awk   Trivial program to protect HTML/SGML "&<>" metacharacters
  45.    metachar.pl      in text to be included in an HTML file (awk/perl)
  46.  
  47. (Unix shell files:)
  48.  
  49.    htmlchek.sh    Run htmlchek.awk under the best available interpreter,
  50.                     and with options checking
  51.    htmlchkp.sh    Run htmlchek.pl with external options checking
  52.    runachek.sh    Do cross-reference checking using htmlchek.awk
  53.    runpchek.sh    Do cross-reference checking using htmlchek.pl
  54.    rducfila.sh    Reduce .NAME/.HREF files (external xref check, awk)
  55.    rducfilp.sh    Reduce .NAME/.HREF files (external xref check, perl)
  56.    makemenu.sh    Run makemenu.awk under the best available interpreter,
  57.                     and with options checking
  58.      dehtml.sh    Run dehtml.awk under the best available interpreter
  59.  
  60.  
  61.    The htmlchek program checks for quite a number of possible defects
  62. in the HTML (Hyper-Text Mark-up Language) version 2.0 SGML files used
  63. on the World-Wide Web.  (Preliminary HTML 3.0 files for the Arena
  64. browser, or files with Netscape extensions, can also be checked by
  65. specifying the appropriate options.)  The program makes no claim to
  66. understand all of SGML, but is easy and relatively simple to use,
  67. gives lots of information (including about many stylistically bad
  68. practices), can do local cross-reference checking and generate
  69. rudimentary reference-dependency maps, and can be run on any platform
  70. for which the language interpreter (awk or perl) is available.
  71.  
  72.    This release of htmlchek also includes a number of supplemental
  73. utilities, including the htmlsrpl.pl HTML-aware search-and-replace
  74. program, which uses either literal strings or regular expressions;
  75. acts either only outside HTML/SGML tags, or only within tags; can be
  76. restricted to operate only within and/or only outside specified
  77. elements; and can also upper-case tag names.
  78.  
  79.    The accompanying .sh files are for greater ease of use under Unix
  80. (actually, any Posix 1003.2, including VMS Posix) but nothing in
  81. htmlchek.awk or htmlchek.pl themselves, or in the accompanying
  82. supplemental programs, depends on the Unix operating system (in
  83. particular, the perl programs do not use any of the Unix-specific
  84. systems-programming features of the perl language), so that this
  85. package can be used on non-Unix systems.
  86.  
  87.    If you seem to get a million errors the first time you run htmlchek
  88. on a file, don't be dismayed -- sometimes htmlchek can't compensate
  89. for an error, so that the invalid HTML code it has encountered affects
  90. its interpretation of valid HTML code later on in the file.  Just go
  91. back and fix the _first_ error, or first few errors, in the HTML file,
  92. then run htmlchek again and see what you get.  Iterate as necessary.
  93. (However, I have tried to eliminate many of the cascades of redundant
  94. errormessages that some earlier versions of this program tended to
  95. generate.)
  96.  
  97.    The htmlchek program performs a fairly comprehensive job of
  98. checking for HTML errors, but does not always exactly follow the
  99. official standard (currently this is version 1.22 of the HTML 2.0
  100. DTD).  Bad stylistic practices are warned against, as well as actual
  101. HTML errors, and in some cases htmlchek is stricter than the standard,
  102. in order to accommodate the peculiarities of some browsers.  The idea
  103. is that HTML code should be ruggedized for the real world, rather than
  104. just being SGML-ically correct -- especially since the official
  105. standard allows many SGML features which are hardly understood by any
  106. HTML-specific applications; for example, according to the official
  107. standard the following is a completely valid HTML 2.0 file (without
  108. even any omitted tags!):
  109.  
  110.    <><HEAD/<TITLE///<BODY/text<IMG TOP SRC=x.gif<![IGNORE[ </HTML>]]>/</>
  111.  
  112.  Version 4.0 of the htmlchek distribution has the following new features:
  113.  
  114. Main changes to htmlchek: added internal cross-reference checking (not as
  115. hard as I thought it would be!); added option of generating dependency
  116. map; added command-line options to allow `<' and`>' characters within
  117. quoted attribute values and <!-- --> comments, and `>' characters outside
  118. tags.  Other changes: added HTML quick reference, in plain text and .html
  119. versions; added htmlsrpl.pl; added xtraclnk.pl; added makemenu.awk/
  120. makemenu.pl; added metachar.awk/metachar.pl; added Perl version of
  121. entify; enhanced the Unix/Posix-1003.2 shell scripts to redirect
  122. non-program output to STDERR, detect non-zero exit status of awk/perl,
  123. and add required trailing slashes automatically.  Minor changes to
  124. htmlchek: added sample configuration files; added check for content of
  125. <ADDRESS> element; now detect multiple <HEAD> elements in document;
  126. <OPTION>, <TEXTAREA>, and <TITLE> elements should not contain any tags;
  127. <INPUT>, <SELECT> and <TEXTAREA> do not have to be _immediately_
  128. contained within a <FORM> (inclusion exception); allow reqopts=
  129. command-line option to specify multiple required attributes for a single
  130. tag; added dlstrict= option and changed default strictness to that of
  131. dlstrict=1; differentiated novalopts= from tagopts=; added subtract="..."
  132. command-line option (to facilitate checking files outside current
  133. directory); updated Arena/HTML3 language definition; tinkered with the
  134. Netscape language definition (in the absence of any definitive
  135. documentation); improved internal htmlchek.pl options checking; other
  136. minor fixes and enhancements.
  137.  
  138. Both the awk program htmlchek.awk and a port of this awk program to
  139. perl are included in the distribution (the original reason for doing
  140. the perl port in the first place was to make it possible to add full
  141. off-site cross-reference checking over the the Web; however, this
  142. project may never be completed, and at present the awk and perl
  143. programs have the same functionality); similarly, most of the
  144. supplemental programs also have both awk and perl versions.  You might
  145. use one or the other based on personal preference, or because some
  146. vendor-supplied awks on Unix boxes have proven to exhibit unendearing
  147. peculiarities (you can also get around this by using GNU gawk if it is
  148. on your system, or getting it from one of the ftp sites listed at the
  149. end of almost every posting to the Usenet group gnu.announce and
  150. compiling it; the program htmlchek.sh will automatically run gawk in
  151. preference to nawk or awk, if gawk is on your system and in your
  152. PATH).  Gawk for MS-DOS (and a pointer to OS/2 gawk) is available from
  153. ftp://oak.oakland.edu/SimTel/msdos/awk/.  (See awk-perl.html.)
  154.  
  155.  
  156. Typical command lines:
  157.  
  158.    awk -f htmlchek.awk [options] infiles.html > outfile.check
  159.  
  160.    perl htmlchek.pl [options] infiles.html > outfile.check
  161.  
  162. The options are in the form "option=value" (see htmlchek.html or
  163. htmlchek.man).  Remember that on some Unix systems ``awk'' is an
  164. archaic incompatible program, so you should use ``nawk'' or ``gawk''
  165. instead; the shell script htmlchek.sh will do this automatically (and
  166. do some options checking as well):
  167.  
  168.    sh htmlchek.sh [options] infiles.html > outfile.check
  169.  
  170.  
  171. Author:  Henry Churchyard  churchh@uts.cc.utexas.edu
  172.