You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2002/09/10 02:36:11 UTC

cvs commit: httpd-2.0/docs/manual/style/xsl sitemap.xsl common.xsl

nd          2002/09/09 17:36:11

  Modified:    docs/manual/style/css manual.css
               docs/manual/style/lang en.xml
               docs/manual/style/xsl common.xsl
  Added:       docs/manual/style sitemap.dtd
               docs/manual/style/xsl sitemap.xsl
  Log:
  sitemap revision: support for new sitemap.xml
  
  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
  
  Revision  Changes    Path
  1.1                  httpd-2.0/docs/manual/style/sitemap.dtd
  
  Index: sitemap.dtd
  ===================================================================
  <?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 >
  
  
  
  
  1.5       +5 -1      httpd-2.0/docs/manual/style/css/manual.css
  
  Index: manual.css
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/css/manual.css,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- manual.css	9 Sep 2002 02:33:24 -0000	1.4
  +++ manual.css	10 Sep 2002 00:36:10 -0000	1.5
  @@ -348,6 +348,10 @@
       list-style-type: upper-alpha;
   }
   
  +li.separate {
  +    margin-bottom: 1em;
  +}
  +
   /* table of contents      */
   /* ====================== */
   #toc,
  @@ -436,7 +440,7 @@
   #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;
  
  
  
  1.3       +4 -1      httpd-2.0/docs/manual/style/lang/en.xml
  
  Index: en.xml
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/en.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- en.xml	6 Sep 2002 23:12:27 -0000	1.2
  +++ en.xml	10 Sep 2002 00:36:10 -0000	1.3
  @@ -12,8 +12,11 @@
    <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>
  
  
  
  1.4       +1 -0      httpd-2.0/docs/manual/style/xsl/common.xsl
  
  Index: common.xsl
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/style/xsl/common.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- common.xsl	6 Sep 2002 17:13:46 -0000	1.3
  +++ common.xsl	10 Sep 2002 00:36:11 -0000	1.4
  @@ -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                -->
  
  
  
  1.1                  httpd-2.0/docs/manual/style/xsl/sitemap.xsl
  
  Index: sitemap.xsl
  ===================================================================
  <?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>