]> granicus.if.org Git - apache/commitdiff
sitemap revision: support for new sitemap.xml
authorAndre Malo <nd@apache.org>
Tue, 10 Sep 2002 00:36:11 +0000 (00:36 +0000)
committerAndre Malo <nd@apache.org>
Tue, 10 Sep 2002 00:36:11 +0000 (00:36 +0000)
new sitemap.dtd and sitemap.xsl
added some corresponding items to en.xml
added new li.separate style to manual.css

also, increased the distance between list items inside the sidebar

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

docs/manual/style/css/manual.css
docs/manual/style/lang/en.xml
docs/manual/style/sitemap.dtd [new file with mode: 0644]
docs/manual/style/xsl/common.xsl
docs/manual/style/xsl/sitemap.xsl [new file with mode: 0644]

index f1f3a50079cc2df10929e588a64b0595f987150e..24ae2271158ad577144e8c261ebefd3f974dffeb 100644 (file)
@@ -348,6 +348,10 @@ ol.up-A {
     list-style-type: upper-alpha;
 }
 
+li.separate {
+    margin-bottom: 1em;
+}
+
 /* table of contents      */
 /* ====================== */
 #toc,
@@ -436,7 +440,7 @@ div#quickview .seealso {
 #manual-page div#quickview ul#toc li,
 div#quickview #topics li,
 div#quickview .seealso li {
-    margin: 0 0 2px 0;
+    margin: 0.4em 0 2px 0;
     padding: 0;
     list-style-type: square;
     list-style-position: outside;
index 70189008daf4b09ec7da0b7805b3759dfbc94319..f7583db16cc952fe34d1b1c39846a68a914ccc66 100644 (file)
  <message name="corefeatures">Core Features and Multi-Processing Modules</message>
  <message name="othermodules">Other Modules</message>
 
- <!-- Title for modulesynopsis -->
+ <!-- Used for the modulesynopsis and sitemap -->
  <message name="apachemodule">Apache Module</message>
+ <message name="apachecore">Apache Core Features</message>
+ <message name="apachempmcommon">Apache MPM Common Directives</message>
+ <message name="apachempm">Apache MPM</message>
 
  <!-- Used in description box for modulesynopsis -->
  <message name="description">Description</message>
diff --git a/docs/manual/style/sitemap.dtd b/docs/manual/style/sitemap.dtd
new file mode 100644 (file)
index 0000000..89808e7
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!ENTITY % common SYSTEM "common.dtd">
+%common;
+
+<!-- <sitemap> is the root element -->
+<!ELEMENT sitemap (relativepath, title, summary?, seealso*, category*)>
+
+<!ELEMENT category (title, page*, modulefilelist? )>
+<!ATTLIST category id ID #IMPLIED>
+
+<!ELEMENT page (#PCDATA)>
+<!ATTLIST page href CDATA #IMPLIED
+               separate (yes | no) "no" >
+
+<!ELEMENT modulefilelist (modulefile*) >
+<!ELEMENT modulefile (#PCDATA) >
+
+<!-- The path to the root of the documentation from the current doc -->
+<!ELEMENT relativepath EMPTY>
+<!ATTLIST relativepath href CDATA #REQUIRED >
+
index 24f02043d5460deea52c6f28be8bb0609190e8fd..0c18cb642035ad2f8fb5c14250d1d45a91466323 100644 (file)
@@ -38,6 +38,7 @@
   <xsl:include href="directiveindex.xsl"/>
   <xsl:include href="manualpage.xsl"/>
   <xsl:include href="synopsis.xsl"/>
+  <xsl:include href="sitemap.xsl"/>
 
   <!--                                                            -->
   <!--    Utility templates for constructing pages                -->
diff --git a/docs/manual/style/xsl/sitemap.xsl b/docs/manual/style/xsl/sitemap.xsl
new file mode 100644 (file)
index 0000000..09f9b1e
--- /dev/null
@@ -0,0 +1,210 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                  xmlns="http://www.w3.org/1999/xhtml">
+
+  <!-- document() works relative to the xsl (!) file -->
+  <xsl:variable name="basedir" select="'../../'"/>
+
+
+  <!--                                                    -->
+  <!-- <sitemap>                                          -->
+  <!-- Process an entire document into an HTML page       -->
+  <!--                                                    -->
+  <xsl:template match="sitemap">
+    <html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+      <xsl:call-template name="head"/>
+
+      <body id="manual-page">
+        <xsl:call-template name="top"/>          
+
+        <div id="page-content">
+          <div id="preamble">        
+            <h1>
+              <xsl:value-of select="title"/>
+            </h1>
+
+            <xsl:apply-templates select="summary"/>
+          </div> <!-- /preamble -->
+          
+          <xsl:if test="count(category) > 1 or seealso">
+            <div id="quickview">
+              <xsl:if test="count(category) > 1">
+
+                <!-- category index -->
+                <ul id="toc">
+                  <xsl:for-each select="category">
+                    <xsl:if test="@id">
+                      <li>
+                        <img src="{$path}/images/down.gif" alt="" />
+                        <xsl:text> </xsl:text>
+                        <a href="#{@id}">
+                          <xsl:apply-templates select="title" mode="print"/>
+                        </a>
+                      </li>
+                    </xsl:if>
+
+                    <xsl:if test="not(@id)">
+                      <li>
+                        <img src="{$path}/images/down.gif" alt="" />
+                        <xsl:text> </xsl:text>
+                        <xsl:apply-templates select="title" mode="print"/>
+                      </li>
+                    </xsl:if>
+                  </xsl:for-each>
+                </ul>
+              </xsl:if>
+
+              <xsl:if test="seealso">
+                <h3>
+                  <xsl:value-of select="$messages/message[@name='seealso']"/>
+                </h3>
+                <ul class="seealso">
+                  <xsl:for-each select="seealso">
+                    <li>
+                      <xsl:apply-templates/>
+                    </li>
+                  </xsl:for-each>
+                </ul>
+              </xsl:if>
+
+           </div> <!-- /quickview -->
+          </xsl:if>
+
+          <xsl:apply-templates select="category"/>
+        </div> <!-- /page-content -->
+
+        <xsl:call-template name="bottom"/>
+      </body>
+    </html>
+  </xsl:template>
+  
+
+  <!--                                                    -->
+  <!-- category/page                                      -->
+  <!--                                                    -->
+  <xsl:template match="category/page">
+    <xsl:variable name="link">
+      <xsl:if test="@href">
+        <a href="{@href}">
+          <xsl:value-of select="."/>
+        </a>
+      </xsl:if>
+      <xsl:if test="not(@href)">
+        <xsl:value-of select="."/>
+      </xsl:if>
+    </xsl:variable>
+
+    <xsl:if test="@separate='yes'">
+      <li class="separate">
+        <xsl:copy-of select="$link"/>
+      </li>
+    </xsl:if>
+
+    <xsl:if test="@separate='no'">
+      <li>
+        <xsl:copy-of select="$link"/>
+      </li>
+    </xsl:if>
+  </xsl:template>
+  <!-- /category/page -->
+
+
+  <!--                                                            -->
+  <!-- Process a sitemap category                                 -->
+  <!--                                                            -->
+  <xsl:template match="category">
+
+    <xsl:call-template name="toplink"/>
+
+    <div class="section">
+
+      <!-- Section heading -->
+      <h2>
+        <xsl:if test="@id">
+          <a id="{@id}" name="{@id}">
+            <xsl:apply-templates select="title" mode="print"/>
+          </a>
+        </xsl:if>
+
+        <xsl:if test="not(@id)">
+          <xsl:apply-templates select="title" mode="print"/>
+        </xsl:if>
+      </h2>
+
+      <!-- category body -->
+      <ul>
+        <xsl:apply-templates select="page"/>
+      </ul>
+      
+      <xsl:apply-templates select="modulefilelist"/>
+
+    </div> <!-- /.section -->
+  </xsl:template>
+  <!-- /category -->
+
+
+  <!--                                                    -->
+  <!-- category/modulefilelist                            -->
+  <!-- insert module list into sitemap                    -->
+  <!--                                                    -->
+  <xsl:template match="category/modulefilelist">
+    <ul>
+      <xsl:for-each select="modulefile">
+        <xsl:sort select="document(concat($basedir,'mod/',.))/modulesynopsis/name"/>
+        <xsl:variable name="current" select="document(concat($basedir,'mod/',.))/modulesynopsis" />
+
+        <xsl:if test="$current/status='MPM' or $current/status='Core'">
+          <xsl:variable name="name"><xsl:choose>
+            <xsl:when test="starts-with($current/name,'mpm_')">
+              <xsl:value-of select="substring($current/name,5)"/>
+            </xsl:when>
+
+            <xsl:otherwise>
+              <xsl:value-of select="$current/name"/>
+            </xsl:otherwise>
+          </xsl:choose></xsl:variable>
+
+          <li>
+            <a href="mod/{$current/name}.html"><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>
+            </a>
+          </li>
+        </xsl:if>
+      </xsl:for-each>
+      <!-- /core,mpm -->
+
+      <xsl:for-each select="modulefile">
+        <xsl:sort select="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'">
+          <li>
+            <a href="mod/{$current/name}.html">
+              <xsl:value-of select="$messages/message[@name='apachemodule']"/>
+              <xsl:text> </xsl:text>
+              <xsl:value-of select="$current/name"/>
+            </a>
+          </li>
+        </xsl:if>
+      </xsl:for-each>
+      <!-- /other modules -->
+
+    </ul>
+  </xsl:template>
+  <!-- /category/modulefilelist -->
+
+</xsl:stylesheet>