]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
the style/chm directory contains styles used only for building chm
authorAndré Malo <nd@apache.org>
Thu, 17 Apr 2003 16:42:15 +0000 (16:42 +0000)
committerAndré Malo <nd@apache.org>
Thu, 17 Apr 2003 16:42:15 +0000 (16:42 +0000)
files. the foo.$lang.xsl stylesheets are the entry styles for ant.

hhc builds the toc file (html help contents) from the sitemap
hhp builds the project file from the sitemap

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99411 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/chm/chm.de.xsl [new file with mode: 0644]
docs/manual/style/chm/chm.en.xsl [new file with mode: 0644]
docs/manual/style/chm/chm.ja.xsl [new file with mode: 0644]
docs/manual/style/chm/hhc.de.xsl [new file with mode: 0644]
docs/manual/style/chm/hhc.en.xsl [new file with mode: 0644]
docs/manual/style/chm/hhc.ja.xsl [new file with mode: 0644]
docs/manual/style/chm/hhc.xsl [new file with mode: 0644]
docs/manual/style/chm/hhp.de.xsl [new file with mode: 0644]
docs/manual/style/chm/hhp.en.xsl [new file with mode: 0644]
docs/manual/style/chm/hhp.ja.xsl [new file with mode: 0644]
docs/manual/style/chm/hhp.xsl [new file with mode: 0644]

diff --git a/docs/manual/style/chm/chm.de.xsl b/docs/manual/style/chm/chm.de.xsl
new file mode 100644 (file)
index 0000000..16b4910
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+  method="xml"
+  encoding="ISO-8859-1"
+  indent="no"
+  doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+  omit-xml-declaration="yes"
+/>
+
+<!-- Read the localized messages from the specified language file -->
+<xsl:variable name="messages" select="document('../lang/de.xml')/messages"/>
+
+<!-- some meta information have to be passed to the transformation -->
+<xsl:variable name="output-encoding" select="'ISO-8859-1'" />
+<xsl:variable name="is-chm" select="true()" />
+
+<!-- Now get the real guts of the stylesheet -->
+<xsl:include href="../xsl/common.xsl"/>
+
+</xsl:stylesheet>
diff --git a/docs/manual/style/chm/chm.en.xsl b/docs/manual/style/chm/chm.en.xsl
new file mode 100644 (file)
index 0000000..2819495
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+  method="xml"
+  encoding="ISO-8859-1"
+  indent="no"
+  doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+  omit-xml-declaration="yes"
+/>
+
+<!-- Read the localized messages from the specified language file -->
+<xsl:variable name="messages" select="document('../lang/en.xml')/messages"/>
+
+<!-- some meta information have to be passed to the transformation -->
+<xsl:variable name="output-encoding" select="'ISO-8859-1'" />
+<xsl:variable name="is-chm" select="true()" />
+
+<!-- Now get the real guts of the stylesheet -->
+<xsl:include href="../xsl/common.xsl"/>
+
+</xsl:stylesheet>
diff --git a/docs/manual/style/chm/chm.ja.xsl b/docs/manual/style/chm/chm.ja.xsl
new file mode 100644 (file)
index 0000000..f3db56e
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+  method="xml"
+  encoding="SHIFT_JIS"
+  indent="no"
+  doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+  omit-xml-declaration="yes"
+/>
+
+<!-- Read the localized messages from the specified language file -->
+<xsl:variable name="messages" select="document('../lang/ja.xml')/messages"/>
+
+<!-- some meta information have to be passed to the transformation -->
+<xsl:variable name="output-encoding" select="'SHIFT_JIS'" />
+<xsl:variable name="is-chm" select="true()" />
+
+<!-- Now get the real guts of the stylesheet -->
+<xsl:include href="../xsl/common.xsl"/>
+
+</xsl:stylesheet>
diff --git a/docs/manual/style/chm/hhc.de.xsl b/docs/manual/style/chm/hhc.de.xsl
new file mode 100644 (file)
index 0000000..e1e1bbb
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+  method="text"
+  encoding="windows-1252"
+  indent="no"
+/>
+
+<!-- Read the localized messages from the specified language file -->
+<xsl:variable name="messages" select="document('../lang/de.xml')/messages"/>
+
+<!-- some meta information have to be passed to the transformation -->
+<xsl:variable name="output-encoding" select="'windows-1252'" />
+<xsl:variable name="toc-font" select="',8,0'" /> <!-- MS magic ... -->
+<xsl:variable name="xml-ext" select="'.xml.de'" />
+
+<!-- Now get the real guts of the stylesheet -->
+<xsl:include href="hhc.xsl"/>
+
+</xsl:stylesheet>
+
diff --git a/docs/manual/style/chm/hhc.en.xsl b/docs/manual/style/chm/hhc.en.xsl
new file mode 100644 (file)
index 0000000..ffa3086
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+  method="text"
+  encoding="windows-1252"
+  indent="no"
+/>
+
+<!-- Read the localized messages from the specified language file -->
+<xsl:variable name="messages" select="document('../lang/en.xml')/messages"/>
+
+<!-- some meta information have to be passed to the transformation -->
+<xsl:variable name="output-encoding" select="'windows-1252'" />
+<xsl:variable name="toc-font" select="',8,0'" /> <!-- MS magic ... -->
+<xsl:variable name="xml-ext" select="'.xml'" />
+
+<!-- Now get the real guts of the stylesheet -->
+<xsl:include href="hhc.xsl"/>
+
+</xsl:stylesheet>
+
diff --git a/docs/manual/style/chm/hhc.ja.xsl b/docs/manual/style/chm/hhc.ja.xsl
new file mode 100644 (file)
index 0000000..ec1c578
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+  method="text"
+  encoding="SHIFT_JIS"
+  indent="no"
+/>
+
+<!-- Read the localized messages from the specified language file -->
+<xsl:variable name="messages" select="document('../lang/ja.xml')/messages"/>
+
+<!-- some meta information have to be passed to the transformation -->
+<xsl:variable name="output-encoding" select="'SHIFT_JIS'" />
+<xsl:variable name="toc-font" select="'@MS UI Gothic,10,128'" /> <!-- MS magic ... -->
+<xsl:variable name="xml-ext" select="'.xml.ja'" />
+
+<!-- Now get the real guts of the stylesheet -->
+<xsl:include href="hhc.xsl"/>
+
+</xsl:stylesheet>
+
diff --git a/docs/manual/style/chm/hhc.xsl b/docs/manual/style/chm/hhc.xsl
new file mode 100644 (file)
index 0000000..39e7445
--- /dev/null
@@ -0,0 +1,543 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE xsl:stylesheet [
+  <!ENTITY lf SYSTEM "../xsl/util/lf.xml">
+  <!ENTITY tab SYSTEM "../xsl/util/tab.xml">
+]>
+
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!--
+    XXX: WARNING! Do not touch anything, especially the whitespaces [1] unless
+    you know, what you're doing. The HTML help compiler parses the TOC file
+    not really as html instead of line by line and takes care of whitespace
+    indentations etc.
+
+    [1] Covered by the &lf; and &tab; entities.
+
+    You have been warned.
+-->
+
+<!-- documents not converted (yet?). -->
+<xsl:variable name="not-existing">
+  developer/API.xml
+
+  programs/ab.xml
+  programs/apxs.xml
+  programs/dbmmanage.xml
+  programs/htdigest.xml
+  programs/htpasswd.xml
+  programs/logresolve.xml
+  programs/rotatelogs.xml
+  programs/suexec.xml
+  programs/other.xml
+</xsl:variable>
+
+<!-- Constants used for case translation -->
+<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
+<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
+
+<!-- document() works relative to the xsl (!) file -->
+<xsl:variable name="basedir" select="'../../'"/>
+
+<!-- icons -->
+<xsl:variable name="icon.document" select="'11'" />
+<xsl:variable name="icon.document.not-translated" select="'12'" />
+<xsl:variable name="icon.section" select="'35'" />
+<xsl:variable name="icon.directive" select="'41'" />
+<xsl:variable name="icon.commondirective" select="'19'" />
+
+<!-- for module-translatename -->
+<xsl:include href="../xsl/util/modtrans.xsl"/>
+
+<!--                                                    -->
+<!-- <sitemap>                                          -->
+<!-- Process an entire document into an HTML page       -->
+<!--                                                    -->
+<xsl:template match="/sitemap">
+<xsl:text>&lt;html&gt;&lt;head&gt;</xsl:text>
+<xsl:text>&lt;title&gt;TOC - Apache HTTP Server Documentation&lt;/title&gt;</xsl:text>
+<xsl:text>&lt;/head&gt;</xsl:text>&lf;
+
+<xsl:text>&lt;body&gt;</xsl:text>&lf;
+
+<!-- toc properties first -->
+<xsl:text>
+&lt;object type="text/site properties"&gt;
+&#9;&lt;param name="Window Styles" value="0x800027"&gt;
+&#9;&lt;param name="Font" value="</xsl:text>
+    <xsl:value-of select="$toc-font" />
+<xsl:text>"&gt;</xsl:text>&lf;
+<xsl:text>&lt;/object&gt;</xsl:text>&lf;
+
+<xsl:text>&lt;ul&gt;</xsl:text>&lf;
+
+<!-- index page on top. -->
+<xsl:text>&lt;li&gt;&lt;object type="text/sitemap"&gt;</xsl:text>&lf;&tab;&tab;
+
+  <xsl:text>&lt;param name="Name" value="</xsl:text>
+    <xsl:call-template name="filter.attval">
+      <xsl:with-param name="text" select="$messages/message[@name='apachehttpserver']" />
+    </xsl:call-template>
+  <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;
+
+  <xsl:text>&lt;param name="Local" value="</xsl:text>
+      <xsl:value-of select="'index.html'" />
+  <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;
+
+  <xsl:text>&lt;param name="ImageNumber" value="</xsl:text>
+    <xsl:choose>
+      <xsl:when test="$messages/@lang='en' or (document(document(concat($basedir, 'index.xml'))/*/@metafile)/metafile/variants/variant[.=$messages/@lang and not(@htmlonly='yes')])">
+        <xsl:value-of select="$icon.document" />
+      </xsl:when>
+
+      <xsl:otherwise>
+        <xsl:value-of select="$icon.document.not-translated" />
+      </xsl:otherwise>
+    </xsl:choose>
+  <xsl:text>"&gt;</xsl:text>&lf;&tab;
+
+  <xsl:text>&lt;/object&gt;&lt;/li&gt;</xsl:text>&lf;
+
+<xsl:for-each select="category">
+
+<xsl:text>&lt;li&gt;&lt;object type="text/sitemap"&gt;</xsl:text>&lf;&tab;&tab;
+
+  <xsl:text>&lt;param name="Name" value="</xsl:text>
+    <xsl:call-template name="filter.attval">
+      <xsl:with-param name="text" select="normalize-space(title)" />
+    </xsl:call-template>
+  <xsl:text>"&gt;</xsl:text>&lf;&tab;
+    <xsl:text>&lt;/object&gt;</xsl:text>&lf;&tab;
+
+    <xsl:text>&lt;ul&gt;</xsl:text>&lf;&tab;
+
+      <xsl:for-each select="page">
+
+        <xsl:variable name="local"><xsl:choose>
+          <xsl:when test="not(@href)">
+            <xsl:text>sitemap.html</xsl:text>
+          </xsl:when>
+
+          <xsl:when test="contains(@href, '#') and substring(@href, string-length(substring-before(@href, '#')), 1) = '/'">
+            <xsl:value-of select="substring-before(@href, '#')" />
+            <xsl:text>index.html</xsl:text>
+          </xsl:when>
+
+          <xsl:when test="substring(@href,string-length(@href),1) = '/'">
+            <xsl:value-of select="@href"/>
+            <xsl:text>index.html</xsl:text>
+          </xsl:when>
+
+          <xsl:otherwise><xsl:value-of select="@href"/></xsl:otherwise></xsl:choose>
+        </xsl:variable>
+
+        <xsl:variable name="xmlfile-en" select="concat(substring-before($local, '.html'), '.xml')"/>
+        <xsl:variable name="xmlfile-exists" select="boolean(not(contains(concat(' ', normalize-space($not-existing), ' '), concat(' ', $xmlfile-en, ' '))))"/>
+
+        <xsl:text>&lt;li&gt;&lt;object type="text/sitemap"&gt;</xsl:text>&lf;&tab;&tab;
+
+          <xsl:text>&lt;param name="Name" value="</xsl:text>
+            <xsl:call-template name="filter.attval">
+              <xsl:with-param name="text">
+                <xsl:if test="@href">
+                  <xsl:value-of select="normalize-space(.)" />
+                </xsl:if>
+                <xsl:if test="not(@href)">
+                  <xsl:value-of select="normalize-space($messages/message[@name='sitemap'])" />
+                </xsl:if>
+              </xsl:with-param>
+            </xsl:call-template>
+          <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;
+
+          <xsl:text>&lt;param name="Local" value="</xsl:text>
+            <xsl:choose>
+              <xsl:when test="not(@href)">
+                <xsl:text>sitemap.html</xsl:text>
+              </xsl:when>
+
+              <xsl:when test="contains(@href, '#') and substring(@href, string-length(substring-before(@href, '#')), 1) = '/'">
+                <xsl:value-of select="substring-before(@href, '#')" />
+                <xsl:text>index.html#</xsl:text>
+                <xsl:value-of select="substring-after(@href, '#')" />
+              </xsl:when>
+
+              <xsl:when test="substring(@href,string-length(@href),1) = '/'">
+                <xsl:value-of select="@href"/>
+                <xsl:text>index.html</xsl:text>
+              </xsl:when>
+
+              <xsl:otherwise><xsl:value-of select="@href"/></xsl:otherwise>
+            </xsl:choose>
+          <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;
+
+          <xsl:text>&lt;param name="ImageNumber" value="</xsl:text>
+            <xsl:choose>
+              <xsl:when test="$messages/@lang='en' or ($xmlfile-exists and document(document(concat($basedir, $xmlfile-en))/*/@metafile)/metafile/variants/variant[.=$messages/@lang and not(@htmlonly='yes')])">
+                <xsl:value-of select="$icon.document" />
+              </xsl:when>
+
+              <xsl:otherwise>
+                <xsl:value-of select="$icon.document.not-translated" />
+              </xsl:otherwise>
+            </xsl:choose>
+          <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;
+          <xsl:text>&lt;/object&gt;</xsl:text>
+
+          <xsl:if test="$xmlfile-exists">
+            <xsl:variable name="metafile" select="document(document(concat($basedir, $xmlfile-en))/*/@metafile)/metafile" />
+            <xsl:if test="not($metafile/variants/variant[.=$messages/@lang] and $metafile/variants/variant[.=$messages/@lang]/@htmlonly = 'yes')">
+              <xsl:variable name="xmlfile"><xsl:choose>
+                <xsl:when test="$metafile/variants/variant[.=$messages/@lang]">
+                    <xsl:value-of select="concat($basedir, substring-before($local, '.html'), $xml-ext)" />
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="concat($basedir, substring-before($local, '.html'), '.xml')" />
+                </xsl:otherwise></xsl:choose>
+              </xsl:variable>
+
+              <xsl:variable name="current" select="document($xmlfile)" />
+              <xsl:if test="count($current/*/*[local-name()='section' or local-name()='category']) > 1">&lf;&tab;&tab;&tab;
+
+                <xsl:text>&lt;ul&gt;</xsl:text>&lf;&tab;&tab;&tab;
+
+                  <xsl:for-each select="$current/*/*[local-name()='section' or local-name()='category']">
+                    <xsl:text>&lt;li&gt;&lt;object type="text/sitemap"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+                      <xsl:text>&lt;param name="Name" value="</xsl:text>
+                        <xsl:call-template name="filter.attval">
+                          <xsl:with-param name="text" select="normalize-space(title)" />
+                        </xsl:call-template>
+                      <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+
+                      <xsl:if test="@id">
+                        <xsl:text>&lt;param name="Local" value="</xsl:text>
+                            <xsl:value-of select="$local" />
+                            <xsl:text>#</xsl:text>
+                            <xsl:value-of select="@id" />
+                        <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+                      </xsl:if>
+
+                      <xsl:text>&lt;param name="ImageNumber" value="</xsl:text>
+                          <xsl:if test="@id"><xsl:value-of select="$icon.section" /></xsl:if>
+                          <xsl:if test="not(@id)">9</xsl:if> <!-- "?" -->
+                      <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+                    <xsl:text>&lt;/object&gt;&lt;/li&gt;</xsl:text>&lf;&tab;&tab;
+                  </xsl:for-each>
+                <xsl:text>&lt;/ul&gt;</xsl:text>&lf;&tab;
+              </xsl:if> <!-- count() > 1 -->
+            </xsl:if> <!-- $xml-ext exists -->
+          </xsl:if> <!-- xml exists -->
+        <xsl:text>&lt;/li&gt;</xsl:text>&lf;&tab;
+      </xsl:for-each> <!-- / page -->
+
+      <xsl:apply-templates select="modulefilelist"/>
+    <xsl:text>&lt;/ul&gt;</xsl:text>&lf;
+  <xsl:text>&lt;/li&gt;</xsl:text>&lf;&tab;
+</xsl:for-each>&lf;
+
+<xsl:text>&lt;/ul&gt;</xsl:text>&lf;
+
+<xsl:text>&lt;/body&gt;&lt;/html&gt;</xsl:text>&lf;
+
+</xsl:template>
+  
+<xsl:template match="category/modulefilelist">
+
+  <!-- create our own translation list first -->
+  <xsl:variable name="translist">
+    <xsl:text>-</xsl:text>
+
+    <xsl:for-each select="modulefile">
+      <xsl:variable name="current" select="document(concat($basedir,'mod/',.))/modulesynopsis" />
+   
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="$current/name"/>
+      <xsl:text> </xsl:text>
+      <xsl:call-template name="module-translatename">
+        <xsl:with-param name="name" select="$current/name"/>
+      </xsl:call-template>
+      <xsl:text> -</xsl:text>
+    </xsl:for-each>
+  </xsl:variable>
+
+  <!-- put core and mpm_common on top -->
+  <xsl:call-template name="toc-entry.mpm">
+    <xsl:with-param name="current" select="document(concat($basedir, 'mod/', modulefile[starts-with(.,'core.xml')]/text()))/modulesynopsis"/>
+    <xsl:with-param name="name" select="'core'"/>
+  </xsl:call-template>
+
+  <xsl:call-template name="toc-entry.mpm">
+    <xsl:with-param name="current" select="document(concat($basedir, 'mod/', modulefile[starts-with(.,'mpm_common.xml')]/text()))/modulesynopsis"/>
+    <xsl:with-param name="name" select="'common'"/>
+  </xsl:call-template>
+
+  <xsl:for-each select="modulefile">
+  <xsl:sort select="substring-before(substring-after($translist, concat('- ', document(concat($basedir,'mod/',.))/modulesynopsis/name, ' ')), ' -')"/>
+
+    <xsl:variable name="current" select="document(concat($basedir, 'mod/', .))/modulesynopsis" />
+
+    <xsl:if test="$current/status='MPM' and $current/name!='mpm_common'">
+      <xsl:call-template name="toc-entry.mpm">
+        <xsl:with-param name="current" select="$current"/>
+        <xsl:with-param name="name" select="substring-before(substring-after($translist, concat('- ', $current/name, ' ')), ' -')"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:for-each> <!-- /mpm -->
+
+  <xsl:for-each select="modulefile">
+  <xsl:sort select="substring-before(substring-after($translist, concat('- ', document(concat($basedir,'mod/',.))/modulesynopsis/name, ' ')), ' -')"/>
+
+    <xsl:variable name="current" select="document(concat($basedir, 'mod/', .))/modulesynopsis" />
+
+    <xsl:if test="$current/status!='MPM' and $current/status!='Core'">
+      <xsl:call-template name="toc-entry.module">
+        <xsl:with-param name="current" select="$current"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:for-each> <!-- /modules -->
+
+</xsl:template>
+
+<xsl:template name="toc-entry.mpm">
+<xsl:param name="current"/>
+<xsl:param name="name"/>
+
+  <xsl:text>&lt;li&gt;&lt;object type="text/sitemap"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+    <xsl:text>&lt;param name="Name" value="</xsl:text>
+      <xsl:call-template name="filter.attval">
+        <xsl:with-param name="text"><xsl:choose>
+          <xsl:when test="$name='core'">
+            <xsl:value-of select="$messages/message[@name='apachecore']"/>
+          </xsl:when>
+
+          <xsl:when test="$name='common'">
+            <xsl:value-of select="$messages/message[@name='apachempmcommon']"/>
+          </xsl:when>
+
+          <xsl:otherwise>
+            <xsl:value-of select="$messages/message[@name='apachempm']"/>
+            <xsl:text> </xsl:text>
+            <xsl:value-of select="$name"/>
+          </xsl:otherwise></xsl:choose>
+        </xsl:with-param>
+      </xsl:call-template>
+    <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+
+    <xsl:text>&lt;param name="Local" value="</xsl:text>
+        <xsl:value-of select="concat('mod/', $current/name, '.html')" />
+    <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+
+    <xsl:text>&lt;param name="ImageNumber" value="</xsl:text>
+      <xsl:choose>
+        <xsl:when test="$messages/@lang='en' or (document($current/@metafile)/metafile/variants/variant[.=$messages/@lang and not(@htmlonly='yes')])">
+          <xsl:value-of select="$icon.document" />
+        </xsl:when>
+
+        <xsl:otherwise>
+          <xsl:value-of select="$icon.document.not-translated" />
+        </xsl:otherwise>
+      </xsl:choose>
+    <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;
+    <xsl:text>&lt;/object&gt;</xsl:text>
+    
+    <xsl:call-template name="sections-and-directives">
+      <xsl:with-param name="current" select="$current" />
+    </xsl:call-template>
+  <xsl:text>&lt;/li&gt;</xsl:text>&lf;&tab;
+</xsl:template>
+  
+<xsl:template name="toc-entry.module">
+<xsl:param name="current"/>
+
+  <xsl:text>&lt;li&gt;&lt;object type="text/sitemap"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+    <xsl:text>&lt;param name="Name" value="</xsl:text>
+      <xsl:call-template name="filter.attval">
+        <xsl:with-param name="text">
+          <xsl:value-of select="$messages/message[@name='apachemodule']"/>
+          <xsl:text> </xsl:text>
+          <xsl:value-of select="$current/name"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+
+    <xsl:text>&lt;param name="Local" value="</xsl:text>
+        <xsl:value-of select="concat('mod/', $current/name, '.html')" />
+    <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+
+    <xsl:text>&lt;param name="ImageNumber" value="</xsl:text>
+      <xsl:choose>
+        <xsl:when test="$messages/@lang='en' or (document($current/@metafile)/metafile/variants/variant[.=$messages/@lang and not(@htmlonly='yes')])">
+          <xsl:value-of select="$icon.document" />
+        </xsl:when>
+
+        <xsl:otherwise>
+          <xsl:value-of select="$icon.document.not-translated" />
+        </xsl:otherwise>
+      </xsl:choose>
+    <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;
+    <xsl:text>&lt;/object&gt;</xsl:text>
+    
+    <xsl:call-template name="sections-and-directives">
+      <xsl:with-param name="current" select="$current" />
+    </xsl:call-template>
+  <xsl:text>&lt;/li&gt;</xsl:text>&lf;&tab;
+</xsl:template>
+
+<xsl:template name="sections-and-directives">
+<xsl:param name="current" />
+
+  <xsl:if test="count($current/section) > 0 or count($current/directivesynopsis) > 0">
+    &lf;&tab;&tab;
+
+    <xsl:text>&lt;ul&gt;</xsl:text>&lf;&tab;&tab;
+
+    <xsl:for-each select="$current/section">
+      <xsl:text>&lt;li&gt;&lt;object type="text/sitemap"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+        <xsl:text>&lt;param name="Name" value="</xsl:text>
+          <xsl:call-template name="filter.attval">
+            <xsl:with-param name="text" select="normalize-space(title)" />
+          </xsl:call-template>
+        <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+
+        <xsl:if test="@id">
+          <xsl:text>&lt;param name="Local" value="</xsl:text>
+              <xsl:value-of select="concat('mod/', $current/name, '.html')" />
+              <xsl:text>#</xsl:text>
+              <xsl:value-of select="@id" />
+          <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+        </xsl:if>
+
+        <xsl:text>&lt;param name="ImageNumber" value="</xsl:text>
+            <xsl:if test="@id"><xsl:value-of select="$icon.section"/></xsl:if>
+            <xsl:if test="not(@id)">9</xsl:if> <!-- "?" -->
+        <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+      <xsl:text>&lt;/object&gt;&lt;/li&gt;</xsl:text>&lf;&tab;&tab;
+    </xsl:for-each> <!-- sections -->
+
+    <xsl:for-each select="$current/directivesynopsis[not(@location)]">
+    <xsl:sort select="name"/>
+
+      <xsl:variable name="lowername" select="translate(name, $uppercase, $lowercase)"/>
+
+      <xsl:text>&lt;li&gt;&lt;object type="text/sitemap"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+        <xsl:text>&lt;param name="Name" value="</xsl:text>
+          <xsl:call-template name="filter.attval">
+            <xsl:with-param name="text">
+              <xsl:if test="@type='section'">&lt;</xsl:if>
+              <xsl:value-of select="name"/>
+              <xsl:if test="@type='section'">&gt;</xsl:if>
+              <xsl:text> </xsl:text>
+              <xsl:value-of select="$messages/message[@name='directive']"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+
+        <xsl:text>&lt;param name="Local" value="</xsl:text>
+            <xsl:value-of select="concat('mod/',$current/name,'.html')" />
+            <xsl:text>#</xsl:text>
+            <xsl:value-of select="$lowername" />
+        <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+
+        <xsl:text>&lt;param name="ImageNumber" value="</xsl:text>
+            <xsl:value-of select="$icon.directive" />
+        <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+      <xsl:text>&lt;/object&gt;&lt;/li&gt;</xsl:text>&lf;&tab;&tab;
+    </xsl:for-each> <!-- directivesynopsis -->
+
+    <xsl:for-each select="$current/directivesynopsis[@location]">
+    <xsl:sort select="name"/>
+
+      <xsl:variable name="lowername" select="translate(name, $uppercase, $lowercase)"/>
+
+      <xsl:text>&lt;li&gt;&lt;object type="text/sitemap"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+        <xsl:text>&lt;param name="Name" value="</xsl:text>
+          <xsl:call-template name="filter.attval">
+            <xsl:with-param name="text">
+              <xsl:if test="@type='section'">&lt;</xsl:if>
+              <xsl:value-of select="name"/>
+              <xsl:if test="@type='section'">&gt;</xsl:if>
+              <xsl:text> </xsl:text>
+              <xsl:value-of select="$messages/message[@name='directive']"/>
+            </xsl:with-param>
+          </xsl:call-template>
+        <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+
+        <xsl:text>&lt;param name="Local" value="</xsl:text>
+            <xsl:value-of select="concat('mod/',@location,'.html')" />
+            <xsl:text>#</xsl:text>
+            <xsl:value-of select="$lowername" />
+        <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;&tab;
+
+        <xsl:text>&lt;param name="ImageNumber" value="</xsl:text>
+            <xsl:value-of select="$icon.commondirective" />
+        <xsl:text>"&gt;</xsl:text>&lf;&tab;&tab;&tab;
+      <xsl:text>&lt;/object&gt;&lt;/li&gt;</xsl:text>&lf;&tab;&tab;
+    </xsl:for-each> <!-- directivesynopsis -->
+
+    <xsl:text>&lt;/ul&gt;</xsl:text>&lf;&tab;
+  </xsl:if> <!-- sections or directives present -->
+
+</xsl:template>
+
+<xsl:template name="filter.attval">
+<xsl:param name="text"/>
+
+    <xsl:choose>
+        <xsl:when test="contains($text, '&amp;')">
+            <xsl:call-template name="filter.attval.special">
+              <xsl:with-param name="text" select="substring-before($text, '&amp;')"/>
+            </xsl:call-template>
+            <xsl:text>&amp;amp;</xsl:text>
+            <xsl:call-template name="filter.attval">
+                <xsl:with-param name="text"
+                              select="substring-after($text, '&amp;')"/>
+            </xsl:call-template>
+        </xsl:when>
+
+        <xsl:otherwise>
+          <xsl:call-template name="filter.attval.special">
+            <xsl:with-param name="text" select="$text"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template name="filter.attval.special">
+<xsl:param name="text"/>
+
+    <xsl:choose>
+        <xsl:when test="contains($text, '&lt;')">
+            <xsl:value-of select="substring-before($text, '&lt;')"/>
+            <xsl:text>&amp;lt;</xsl:text>
+            <xsl:call-template name="filter.attval.special">
+                <xsl:with-param name="text"
+                              select="substring-after($text, '&lt;')"/>
+            </xsl:call-template>
+        </xsl:when>
+
+        <xsl:when test="contains($text, '&gt;')">
+            <xsl:value-of select="substring-before($text, '&gt;')"/>
+            <xsl:text>&amp;gt;</xsl:text>
+            <xsl:call-template name="filter.attval.special">
+                <xsl:with-param name="text"
+                              select="substring-after($text, '&gt;')"/>
+            </xsl:call-template>
+        </xsl:when>
+
+        <xsl:when test="contains($text, '&quot;')">
+            <xsl:value-of select="substring-before($text, '&quot;')"/>
+            <xsl:text>&amp;quot;</xsl:text>
+            <xsl:call-template name="filter.attval.special">
+                <xsl:with-param name="text"
+                              select="substring-after($text, '&quot;')"/>
+            </xsl:call-template>
+        </xsl:when>
+
+        <xsl:otherwise>
+            <xsl:value-of select="$text"/>
+        </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/docs/manual/style/chm/hhp.de.xsl b/docs/manual/style/chm/hhp.de.xsl
new file mode 100644 (file)
index 0000000..083c626
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+  method="text"
+  encoding="ISO-8859-1"
+  indent="no"
+/>
+
+<!-- Read the localized messages from the specified language file -->
+<xsl:variable name="messages" select="document('../lang/de.xml')/messages"/>
+
+<!-- some meta information have to be passed to the transformation -->
+<xsl:variable name="hhp-lang" select="'0x407 German (Germany)'" /> <!-- MS magic ... -->
+
+<!-- Now get the real guts of the stylesheet -->
+<xsl:include href="hhp.xsl"/>
+
+</xsl:stylesheet>
+
diff --git a/docs/manual/style/chm/hhp.en.xsl b/docs/manual/style/chm/hhp.en.xsl
new file mode 100644 (file)
index 0000000..e3c2e29
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+  method="text"
+  encoding="ISO-8859-1"
+  indent="no"
+/>
+
+<!-- Read the localized messages from the specified language file -->
+<xsl:variable name="messages" select="document('../lang/en.xml')/messages"/>
+
+<!-- some meta information have to be passed to the transformation -->
+<xsl:variable name="hhp-lang" select="'0x409 English (United States)'" /> <!-- MS magic ... -->
+
+<!-- Now get the real guts of the stylesheet -->
+<xsl:include href="hhp.xsl"/>
+
+</xsl:stylesheet>
+
diff --git a/docs/manual/style/chm/hhp.ja.xsl b/docs/manual/style/chm/hhp.ja.xsl
new file mode 100644 (file)
index 0000000..1f64ee3
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+  method="text"
+  encoding="SHIFT_JIS"
+  indent="no"
+/>
+
+<!-- Read the localized messages from the specified language file -->
+<xsl:variable name="messages" select="document('../lang/ja.xml')/messages"/>
+
+<!-- some meta information have to be passed to the transformation -->
+<xsl:variable name="hhp-lang" select="'0x411 Japanese'" /> <!-- MS magic ... -->
+
+<!-- Now get the real guts of the stylesheet -->
+<xsl:include href="hhp.xsl"/>
+
+</xsl:stylesheet>
+
diff --git a/docs/manual/style/chm/hhp.xsl b/docs/manual/style/chm/hhp.xsl
new file mode 100644 (file)
index 0000000..70a5811
--- /dev/null
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE xsl:stylesheet
+ [ <!ENTITY lf SYSTEM "../xsl/util/lf.xml"> ]
+>
+
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!--                                                    -->
+<!-- <sitemap>                                          -->
+<!-- Process an entire document into an HTML page       -->
+<!--                                                    -->
+<xsl:template match="/sitemap">
+
+<!-- static information -->
+<!-- ================== -->
+
+  <xsl:text>[OPTIONS]</xsl:text>&lf;
+  <xsl:text>Binary TOC=No</xsl:text>&lf;
+  <xsl:text>Compatibility=1.0</xsl:text>&lf;
+
+  <!-- e.g. manual.en.chm -->
+  <xsl:text>Compiled file=..\manual.</xsl:text>
+  <xsl:value-of select="$messages/@lang" />
+  <xsl:text>.chm</xsl:text>&lf;
+
+  <xsl:text>Contents file=toc.hhc</xsl:text>&lf;
+  <xsl:text>Default Window=Main</xsl:text>&lf;
+  <xsl:text>Default topic=index.html</xsl:text>&lf;
+
+  <!-- compiler related -->
+  <xsl:text>Display compile progress=Yes</xsl:text>&lf;
+  <xsl:text>Enhanced decompilation=Yes</xsl:text>&lf;
+
+  <!-- search related -->
+  <xsl:text>Full-text search=Yes</xsl:text>&lf;
+  <xsl:text>Language=</xsl:text>
+  <xsl:value-of select="$hhp-lang" />&lf;
+
+  <!-- title of the help file -->
+  <xsl:text>Title=</xsl:text>
+  <xsl:value-of select="$messages/message[@name='apachehttpserver']"/>&lf;
+
+  &lf;
+
+  <!-- window definition                                             -->
+  <!-- (don't care about the magic values, they are mostly generated -->
+  <!--  from the HTML Help workshop)                                 -->
+  <xsl:text>[WINDOWS]</xsl:text>&lf;
+  <xsl:text>Main=</xsl:text>
+
+  <!-- title -->
+  <xsl:text>"</xsl:text>
+  <xsl:value-of select="$messages/message[@name='apachehttpserver']"/>
+  <xsl:text>",</xsl:text>
+
+  <!-- toc file -->
+  <xsl:text>"toc.hhc",</xsl:text>
+
+  <!-- index file (currently none) -->
+  <xsl:text>,</xsl:text>
+
+  <!-- default file (startup) -->
+  <xsl:text>"index.html",</xsl:text>
+
+  <!-- Home button file -->
+  <xsl:text>"index.html",</xsl:text>
+
+  <!-- Jump 1 url, text -->
+  <xsl:text>,,</xsl:text>
+
+  <!-- Jump 2 url, text -->
+  <xsl:text>,,</xsl:text>
+
+  <!-- navigation pane style, initial width (px) -->
+  <xsl:text>0x1e357e,180,</xsl:text>
+  
+  <!-- button mask -->
+  <xsl:text>0x10305e,</xsl:text>
+  
+  <!-- Initial Position [Left, Top, Right, Bottom] -->
+  <xsl:text>[0,0,600,380],</xsl:text>
+  
+  <!-- style, extended style -->
+  <xsl:text>0xb7cf0000,,</xsl:text>
+  
+  <!-- flag: navigation initial closed (=1) -->
+  <xsl:text>,</xsl:text>
+  
+  <!-- unknown -->
+  <xsl:text>,</xsl:text>
+  
+  <!-- default pane -->
+  <xsl:text>,</xsl:text>
+  
+  <!-- unknown, unknown -->
+  <xsl:text>,0</xsl:text>&lf;
+
+  &lf;
+  
+<!-- file list -->
+<!-- ========= -->
+  <xsl:text>[FILES]</xsl:text>&lf;
+
+  <!-- not automatically sucked in. (because only @import()ed) -->
+  <xsl:text>style\css\manual.css</xsl:text>&lf;
+  <xsl:text>style\css\manual-loose-100pc.css</xsl:text>&lf;
+
+  <!-- include project file itself for easier recompiling -->
+  <xsl:text>manual.hhp</xsl:text>&lf;
+
+  <xsl:for-each select="category">
+    <xsl:for-each select="page[@href]">
+      <xsl:variable name="local"><xsl:choose>
+        <xsl:when test="contains(@href, '#') and substring(@href, string-length(substring-before(@href, '#')), 1) = '/'">
+          <xsl:value-of select="substring-before(@href, '#')" />
+          <xsl:text>index.html</xsl:text>
+        </xsl:when>
+
+        <xsl:when test="substring(@href,string-length(@href),1) = '/'">
+          <xsl:value-of select="@href"/>
+          <xsl:text>index.html</xsl:text>
+        </xsl:when>
+
+        <xsl:otherwise><xsl:value-of select="@href"/></xsl:otherwise></xsl:choose>
+      </xsl:variable>
+        
+      <xsl:call-template name="back-slash">
+        <xsl:with-param name="file" select="$local"/>
+      </xsl:call-template>&lf;
+    </xsl:for-each> <!-- / page -->
+
+    <xsl:apply-templates select="modulefilelist"/>
+  </xsl:for-each>&lf;
+
+</xsl:template>
+
+<!-- module files -->
+<xsl:template match="category/modulefilelist">
+  <xsl:for-each select="modulefile">
+    <xsl:text>mod\</xsl:text>
+    <xsl:value-of select="substring-before(normalize-space(.), '.xml')"/>
+    <xsl:text>.html</xsl:text>&lf;
+  </xsl:for-each>
+</xsl:template>
+
+<!-- turn slashes to backslashes -->
+<xsl:template name="back-slash">
+<xsl:param name="file"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($file, '/')">
+      <xsl:value-of select="substring-before($file, '/')"/>
+      <xsl:text>\</xsl:text>
+
+      <xsl:call-template name="back-slash">
+        <xsl:with-param name="file" select="substring-after($file, '/')"/>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:otherwise>
+      <xsl:value-of select="$file"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>