Herein is a method to create an HTML Help file of the Apache manual
on Windows.
Requirements:
* Microsoft HTML Help SDK which can be downloaded from
http://www.microsoft.com/downloads/release.asp?releaseid=33071
* optional.jar from ant 1.5 ... the one in build/libs doesn't support the
regexp mapper.
* Create directory manual/htmlhelp and place into it:
* manual.en.hhp (Microsoft HTML Help Project File)
* manual-hhc.xml (Simplified TOC in XML format)
* manual-hhc.xsl (Transforms the TOC into HTML for hhc.exe)
* Patch build/build.xml
* run 'build en-htmlhelp'
* The output file is manual/htmlhelp/manual.en.chm
What's going on behind the scenes:
* Copy all manual/**/*.html, .html.en, and image files to
manual/htmlhelp/manual/ and rename the extensions to .html because the links
need to be valid and files with .en on the end won't work.
* Transform manual-hhc.xml to manual.en.hhc which is the contents file.
(I had to work around a few bugs in the help compiler, no surprise there,
so manual-hhc.xsl might look kinda funky).
* Call hhc.exe manual.en.hhp which must be in the PATH variable. It will
spit out a few warnings because it's just stupid, but the resulting html
help file appears to be fine.
* Delete manual/htmlhelp/manual/
Shane
Index: build.xml
===================================================================
RCS file: /home/cvspublic/site-tools/httpd-docs-build/build.xml,v
retrieving revision 1.5
diff -u -r1.5 build.xml
--- build.xml 19 Aug 2002 17:37:06 -0000 1.5
+++ build.xml 23 Aug 2002 06:48:29 -0000
@@ -11,6 +11,7 @@
<exclude name="build/*.xml" />
<exclude name="mod/allmodules.xml*" />
<exclude name="style/*.xml" />
+ <exclude name="htmlhelp/*" />
</patternset>
<patternset id="en-allxml">
@@ -100,5 +101,38 @@
<patternset refid="allxml" />
</fileset>
</xmlvalidate>
+ </target>
+
+ <target name="en-htmlhelp"
+ depends="xslt"
+ description="Compile English HTML Help file">
+ <copy todir="../htmlhelp/manual/">
+ <fileset dir="../">
+ <include name="**/*.html.en" />
+ </fileset>
+
+ <mapper type="regexp" from="^(.*)\.html.en$$" to="\1.html" />
+ </copy>
+
+ <copy todir="../htmlhelp/manual/">
+ <fileset dir="../">
+ <include name="LICENSE" />
+ <include name="**/*.gif" />
+ <include name="**/*.html" />
+ </fileset>
+ </copy>
+
+ <style basedir="../"
+ destdir="../"
+ force="yes"
+ style="../htmlhelp/manual-hhc.xsl"
+ in="../htmlhelp/manual-hhc.xml"
+ out="../htmlhelp/manual.en.hhc" />
+
+ <exec dir="../htmlhelp/" executable="hhc.exe">
+ <arg line="manual.en.hhp" />
+ </exec>
+
+ <delete dir="../htmlhelp/manual/" />
</target>
</project>
[OPTIONS]
Compatibility=1.1 or later
Compiled file=manual.en.chm
Contents file=manual.en.hhc
Default topic=manual\index.html
Display compile progress=No
Full-text search=Yes
Language=0x409 English (United States)
Title=Apache httpd-2.0 Manual
[FILES]
manual\index.html
[INFOTYPES]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- note: hhc is very strict when it reads the contents file and if
there's a flaw in the file it locks up.
* <param> name and value attributes must be read in order. so
in this file the value attribute must come first because
they're outputed in reverse order.
* hhc expects crlf's after the main <object>.
* <li> tags cannot be followed by a crlf, they need to be
followed by an <object> tag.
-->
<xsl:template match="htmlhelp">
<html>
<head>
</head>
<body>
<!-- note: there must be a new line at the end of these ...
-->
<object type="text/site properties"><xsl:text>
</xsl:text>
<param value="Folder" name="ImageType" /><xsl:text>
</xsl:text>
</object><xsl:text>
</xsl:text>
<xsl:apply-templates select="section" />
</body>
</html>
</xsl:template>
<xsl:template match="section">
<xsl:choose>
<xsl:when test="@name='modules'">
<xsl:call-template name="modulesection" />
</xsl:when>
<xsl:otherwise>
<ul>
<!-- note: <li> tags must be followed by <object> tags on the same
line or else ...
-->
<xsl:text disable-output-escaping="yes"><li></xsl:text>
<object type="text/sitemap">
<param value="{title}" name="Name" />
<param value="1" name="ImageNumber" />
<xsl:if test="@index_page">
<param value="[EMAIL PROTECTED]" name="Local" />
</xsl:if>
</object>
<xsl:text disable-output-escaping="yes"></li></xsl:text>
<xsl:apply-templates select="section" />
<xsl:apply-templates select="page" />
</ul>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="page">
<xsl:variable name="title">
<xsl:choose>
<xsl:when test="title">
<xsl:value-of select="title" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="document(concat ('../', location, '.xml'))/manualpage/title" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<ul>
<xsl:text disable-output-escaping="yes"><li></xsl:text>
<object type="text/sitemap">
<param value="{$title}" name="Name" />
<param value="{concat('manual\',location,'.html')}" name="Local" />
</object>
<xsl:text disable-output-escaping="yes"></li></xsl:text>
</ul>
</xsl:template>
<xsl:template name="modulesection">
<ul>
<xsl:text disable-output-escaping="yes"><li></xsl:text>
<object type="text/sitemap">
<param value="Modules" name="Name" />
<param value="1" name="ImageNumber" />
</object>
<xsl:text disable-output-escaping="yes"></li></xsl:text>
<xsl:apply-templates select="page" />
<xsl:for-each select="document(document ('../mod/allmodules.xml')/modulefilelist/modulefile)">
<ul>
<xsl:text disable-output-escaping="yes"><li></xsl:text>
<object type="text/sitemap">
<param value="{modulesynopsis/name}" name="Name" />
<param value="1" name="ImageNumber" />
<param value="{concat ('manual\mod\',modulesynopsis/name,'.html')}" name="Local" />
</object>
<xsl:text disable-output-escaping="yes"></li></xsl:text>
<xsl:for-each select="modulesynopsis/directivesynopsis">
<xsl:sort select="name" />
<ul>
<xsl:text disable-output-escaping="yes"><li></xsl:text>
<object type="text/sitemap">
<param value="{name}" name="Name" />
<xsl:choose>
<xsl:when test="@location">
<param value="{concat ('manual\mod\',@location,'.html#',name)}" name="Local" />
</xsl:when>
<xsl:otherwise>
<param value="{concat ('manual\mod\',../name,'.html#',name)}" name="Local" />
</xsl:otherwise>
</xsl:choose>
</object>
<xsl:text disable-output-escaping="yes"></li></xsl:text>
</ul>
</xsl:for-each>
</ul>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" ?>
<htmlhelp>
<section index_page="index">
<title>Apache httpd-2.0 Manual</title>
<section>
<title>Release Notes</title>
<page>
<location>new_features_2_0</location>
</page>
<page>
<location>upgrading</location>
</page>
</section>
<section>
<title>Using the Apache HTTP Server</title>
<page>
<location>install</location>
</page>
<page>
<location>invoking</location>
</page>
<page>
<location>stopping</location>
</page>
<page>
<location>configuring</location>
</page>
<page>
<title>Configuring Sections</title>
<location>sections</location>
</page>
<page>
<location>server-wide</location>
</page>
<page>
<location>logs</location>
</page>
<page>
<location>urlmapping</location>
</page>
<page>
<location>misc\security_tips</location>
</page>
<page>
<location>dso</location>
</page>
<page>
<location>content-negotiation</location>
</page>
<page>
<title>Custom error responses</title>
<location>custom-error</location>
</page>
<page>
<location>bind</location>
</page>
<page>
<location>mpm</location>
</page>
<page>
<location>env</location>
</page>
<page>
<location>handler</location>
</page>
<page>
<location>filter</location>
</page>
<page>
<location>suexec</location>
</page>
<page>
<title>Apache Performance Notes</title>
<location>misc\perf-tuning</location>
</page>
<page>
<title>URL Rewriting Guide</title>
<location>misc\rewriteguide</location>
</page>
</section>
<section index_page="vhosts\index">
<title>Virtual Hosts</title>
<page>
<title>Name-based Virtual Host Support</title>
<location>vhosts\name-based</location>
</page>
<page>
<title>Apache IP-based Virtual Host Support</title>
<location>vhosts\ip-based</location>
</page>
<page>
<title>Dynamically configured mass virtual hosting</title>
<location>vhosts\mass</location>
</page>
<page>
<title>Virtual Host examples for common setups</title>
<location>vhosts\examples</location>
</page>
<page>
<title>An In-Depth Discussion of Virtual Host Matching</title>
<location>vhosts\details</location>
</page>
<page>
<title>File Descriptor Limits</title>
<location>vhosts\fd-limits</location>
</page>
<page>
<title>Issues Regarding DNS and Apache</title>
<location>dns-caveats</location>
</page>
</section>
<section index_page="faq\index">
<title>FAQ</title>
<page>
<title>Frequently Asked Questions</title>
<location>faq\support</location>
</page>
</section>
<section index_page="ssl\index">
<title>Apache SSL/TLS Encryption</title>
<page>
<title>An Introduction</title>
<location>ssl\ssl_intro</location>
</page>
<page>
<title>Compatibility</title>
<location>ssl\ssl_compat</location>
</page>
<page>
<title>How-To</title>
<location>ssl\ssl_howto</location>
</page>
<page>
<title>FAQ</title>
<location>ssl\ssl_faq</location>
</page>
<page>
<title>Glossary</title>
<location>ssl\ssl_glossary</location>
</page>
</section>
<section>
<title>Guides, Tutorials, and HowTo's</title>
<page>
<title>Authentication</title>
<location>howto\auth</location>
</page>
<page>
<title>Dynamic Content with CGI</title>
<location>howto\cgi</location>
</page>
<page>
<location>howto\htaccess</location>
</page>
<page>
<title>Introduction to Server Side Includes</title>
<location>howto\ssi</location>
</page>
<page>
<title>Apache Tutorials</title>
<location>misc\tutorials</location>
</page>
</section>
<section>
<title>Platform-specific Notes</title>
<page>
<title>Using Apache with Microsoft Windows</title>
<location>platform\windows</location>
</page>
<page>
<title>Compiling Apache for Microsoft Windows</title>
<location>platform\win_compiling</location>
</page>
<page>
<title>Running Apache for Windows as a Service</title>
<location>platform\win_service</location>
</page>
<page>
<title>Using Apache With Novell NetWare</title>
<location>platform\netware</location>
</page>
<page>
<title>Running a High-Performance Web Server for HPUX</title>
<location>platform\perf-hp</location>
</page>
<page>
<title>Overview of the Apache EBCDIC Port</title>
<location>ebcdic</location>
</page>
</section>
<section index_page="programs\index">
<title>Apache HTTP Server and Supporting Programs</title>
<page>
<title>httpd</title>
<location>programs\httpd</location>
</page>
<page>
<title>ab</title>
<location>programs\ab</location>
</page>
<page>
<title>apachectl</title>
<location>programs\apachectl</location>
</page>
<page>
<title>apxs</title>
<location>programs\apxs</location>
</page>
<page>
<title>dbmmanage</title>
<location>programs\dbmmanage</location>
</page>
<page>
<title>htdigest</title>
<location>programs\htdigest</location>
</page>
<page>
<title>htpasswd</title>
<location>programs\htpasswd</location>
</page>
<page>
<title>logresolve</title>
<location>programs\logresolve</location>
</page>
<page>
<title>rotatelogs</title>
<location>programs\rotatelogs</location>
</page>
<page>
<title>suexec</title>
<location>programs\suexec</location>
</page>
<page>
<title>other programs</title>
<location>programs\other</location>
</page>
</section>
<section index_page="misc\index">
<title>Apache Miscellaneous Documentation</title>
<page>
<title>Custom error documents</title>
<location>misc\custom_errordocs</location>
</page>
<page>
<title>Connections in the FIN_WAIT_2 state and Apache</title>
<location>misc\fin_wait_2</location>
</page>
<page>
<title>Known Problems in Clients</title>
<location>misc\known_client_problems</location>
</page>
<page>
<title>Descriptors and Apache</title>
<location>misc\descriptors</location>
</page>
<page>
<title>PATH_INFO Changes in the CGI Environment</title>
<location>cgi_path</location>
</page>
</section>
<section name="modules">
<title>Modules</title>
<page>
<title>All Directives</title>
<location>mod\directives</location>
</page>
<page>
<title>Definitions of terms used to describe Apache modules</title>
<location>mod\module-dict</location>
</page>
<page>
<title>Definitions of terms used to describe Apache directives</title>
<location>mod\directive-dict</location>
</page>
</section>
<section index_page="developer\index">
<title>Developer Documentation</title>
<page>
<title>Apache API notes</title>
<location>developer\API</location>
</page>
<page>
<title>Debugging Memory Allocation in APR</title>
<location>developer\debugging</location>
</page>
<page>
<title>Documentating Apache 2.0</title>
<location>developer\documenting</location>
</page>
<page>
<title>Apache Hook Functions</title>
<location>developer\hooks</location>
</page>
<page>
<title>Apache Layered I/O</title>
<location>developer\layeredio</location>
</page>
<page>
<title>From Apache 1.3 to Apache 2.0 Modules</title>
<location>developer\modules</location>
</page>
<page>
<title>Request Processing in Apache 2.0</title>
<location>developer\request</location>
</page>
<page>
<title>How filters work in Apache 2.0</title>
<location>developer\filters</location>
</page>
<page>
<title>Thread Safety</title>
<location>developer\thread_safety</location>
</page>
</section>
<page>
<title>Glossary</title>
<location>glossary</location>
</page>
</section>
</htmlhelp>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]