HOWTO validate the HTML/XML code generated by tex4ht ---------------------------------------------------- Eitan Gurari (the upstream author) strongly recommends the validation of the generated HTML/XML. The command line switch "-cvalidate" can be used to do this after making suitable changes as outlined below. One possibility is to install the Debian packages ""libxml2-utils" and/or "w3c-markup-validator". The latter package will pull-in all the Document Type Definition (DTD) files that are required in order to perform validation in most cases. The program "xmllint" in "libxml2-utils" performs xml and html validation. The other method for html validation is via a cgi-bin in the "w3c-markup-validator" package. There is a hint about how this can be run from the command line in "/usr/share/doc/w3c-markup-validator/README.Debian". Eitan Gurari has also provided a java program and some instructions on how to use it. The following instructions are taken from some instructions originally found at his website. If needed, a simple XML validator in Java can be installed in the following manner. 1. The files /usr/share/tex4ht/xv4ht.java contains the sources. 2. Compile the java program with the following command. This works with the free-java-sdk. javac /usr/share/tex4ht/xv4ht.java 3. In your copy of tex4ht.env replace the record .xml myxmlparser %%1.xml with (there should be no leading spaces) java -classpath xv4ht %%1.xml where should be name of the directory where the classes now reside and catalog file is the name of XML catalog (usually /etc/xml/catalog on Debian systems; a catalog file is also provided in /usr/share/tex4ht/xv4ht.cat). 4. Download the desirable DTD'S and and have the catalog file correctly reference their locations. If you install the debian packages xml-core, w3-dtd-mathml, sgml-data, w3c-dtd-xhtml, docbook-xml then a number of DTD's are installed in the locations that are entered in the default "xmlvalidator.cat". You must find/download others which you may want to use. A CSS validator can also be installed in a similar way. For a CSS validator see http://jigsaw.w3.org/css-validator/ Kapil H. Paranjape Mon Nov 21 07:36:50 IST 2005 --