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 2014/02/01 22:42:48 UTC

svn commit: r1563477 - in /httpd/httpd/branches/2.0.x/docs/manual/style/xsl: common.xsl directiveindex.xsl faq.xsl indexpage.xsl manualpage.xsl moduleindex.xsl quickreference.xsl sitemap.xsl synopsis.xsl

Author: nd
Date: Sat Feb  1 21:42:47 2014
New Revision: 1563477

URL: http://svn.apache.org/r1563477
Log:
- use localized retirement notice
- properly place the html container

Modified:
    httpd/httpd/branches/2.0.x/docs/manual/style/xsl/common.xsl
    httpd/httpd/branches/2.0.x/docs/manual/style/xsl/directiveindex.xsl
    httpd/httpd/branches/2.0.x/docs/manual/style/xsl/faq.xsl
    httpd/httpd/branches/2.0.x/docs/manual/style/xsl/indexpage.xsl
    httpd/httpd/branches/2.0.x/docs/manual/style/xsl/manualpage.xsl
    httpd/httpd/branches/2.0.x/docs/manual/style/xsl/moduleindex.xsl
    httpd/httpd/branches/2.0.x/docs/manual/style/xsl/quickreference.xsl
    httpd/httpd/branches/2.0.x/docs/manual/style/xsl/sitemap.xsl
    httpd/httpd/branches/2.0.x/docs/manual/style/xsl/synopsis.xsl

Modified: httpd/httpd/branches/2.0.x/docs/manual/style/xsl/common.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/docs/manual/style/xsl/common.xsl?rev=1563477&r1=1563476&r2=1563477&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/docs/manual/style/xsl/common.xsl (original)
+++ httpd/httpd/branches/2.0.x/docs/manual/style/xsl/common.xsl Sat Feb  1 21:42:47 2014
@@ -31,6 +31,7 @@
 <!--                                                                      -->
 
 <!-- Injected variables:                                                  -->
+<!--   $is-retired      - (boolean) Is this httpd version retired?        -->
 <!--   $is-chm          - (boolean) target is for CHM generation or not   -->
 <!--   $is-zip          - (boolean) target is for ZIP generation or not   -->
 <!--   $message         - (node-set) localized common text snippets       -->
@@ -68,7 +69,7 @@
 <!-- make sure, we set relative anchors only, if we're actually -->
 <!-- transforming a modulefile (see <directive> template)       -->
 <xsl:variable name="in-modulesynopsis" select="boolean(/modulesynopsis)" />
-<xsl:variable name="upgrade" select="boolean(/modulesynopsis/@upgrade)" />
+<xsl:variable name="upgrade" select="boolean(/*/@upgrade)" />
 
 <!-- when referencing to a directory, we may need to complete the path -->
 <!-- with the index file (for offline applications like *.chm files)   -->
@@ -172,16 +173,18 @@
     <!-- chm files do not need a favicon or a canonical link-->
     <xsl:if test="not($is-chm or $is-zip)">&lf;
         <link rel="shortcut icon" href="{$path}/images/favicon.ico" />
-        <xsl:choose>
-        <xsl:when test="$upgrade">
-            <xsl:if test="not(/*/@upgrade = '')">
-                <link rel="canonical" href="http://httpd.apache.org/docs/2.2{concat($metafile/path, /*/@upgrade, '.html')}"/>
-            </xsl:if>
-        </xsl:when>
-        <xsl:otherwise>
-            <link rel="canonical" href="http://httpd.apache.org/docs/2.2{concat($metafile/path, $metafile/basename, '.html')}"/>
-        </xsl:otherwise>
-        </xsl:choose>
+        <xsl:if test="$is-retired">
+            <xsl:choose>
+            <xsl:when test="$upgrade">
+                <xsl:if test="not(/*/@upgrade = '')">
+                    <link rel="canonical" href="http://httpd.apache.org/docs/current{concat($metafile/path, /*/@upgrade, '.html')}"/>
+                </xsl:if>
+            </xsl:when>
+            <xsl:otherwise>
+                <link rel="canonical" href="http://httpd.apache.org/docs/current{concat($metafile/path, $metafile/basename, '.html')}"/>
+            </xsl:otherwise>
+            </xsl:choose>
+        </xsl:if>
     </xsl:if>
 </head>
 </xsl:template>
@@ -272,36 +275,94 @@
     </a>
     </xsl:if>
 </div> <!-- /path -->
-<!-- Retirement notice -->
-<div class="outofdate" style="width: 90%;">
-    <xsl:variable name="future">
+</xsl:template>
+<!-- /top -->
+
+
+<!-- ==================================================================== -->
+<!-- retired                                                              -->
+<!-- ==================================================================== -->
+<xsl:template name="retired">
+<xsl:if test="$is-retired">
+    <xsl:variable name="base">
         <xsl:choose>
         <xsl:when test="$upgrade">
             <xsl:if test="not(/*/@upgrade = '')">
-                <xsl:value-of
-                    select="concat($metafile/path, /*/@upgrade, '.html')" />
+                <xsl:value-of select="/*/@upgrade" />
             </xsl:if>
         </xsl:when>
         <xsl:otherwise>
             <xsl:value-of
-                select="concat($metafile/path, $metafile/basename, '.html')" />
+                select="$metafile/basename" />
+        </xsl:otherwise>
+        </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="future">
+        <xsl:choose>
+        <xsl:when test="$base = 'index'">
+            <xsl:value-of select="$metafile/path" />
+        </xsl:when>
+        <xsl:when test="$base = ''">
+            <!-- nothing -->
+        </xsl:when>
+        <xsl:otherwise>
+            <xsl:value-of select="concat($metafile/path, $base, '.html')" />
         </xsl:otherwise>
         </xsl:choose>
     </xsl:variable>
 
-    <h4>Please note</h4>
-    This document refers to the 2.0 version of Apache httpd, which is no longer maintained.<br/>
-    Upgrade, and refer to the current version of httpd instead, documented at:<br/>
-    <ul>
-        <li><a href="http://httpd.apache.org/docs/current/">Current release version of Apache HTTP Server documentation</a></li>
-    </ul>
-    <xsl:if test="not($future = '')">
-    You may follow <a href="http://httpd.apache.org/docs/current{$future}">this link</a> to 
-    go to the current version of this document.
-</xsl:if></div>
+    <div class="retired">
+        <h4><xsl:value-of select="$message[@id='retired.headline']" /></h4>
+        <xsl:apply-templates select="$message[@id='retired.description']" />
+        <ul>
+            <li><a href="http://httpd.apache.org/docs/current/">
+                <xsl:value-of select="$message[@id='retired.current']" /></a>
+            </li>
+        </ul>
+        <xsl:if test="not($future = '')">
+            <p><xsl:apply-templates select="$message[@id='retired.document']" mode="retired" /></p>
+        </xsl:if>
+    </div>
+</xsl:if>
+</xsl:template>
+<!-- /retired -->
+
+<xsl:template match="message">
+    <xsl:apply-templates />
 </xsl:template>
-<!-- /top -->
 
+<xsl:template match="link" mode="retired">
+<xsl:variable name="base">
+    <xsl:choose>
+    <xsl:when test="$upgrade">
+        <xsl:if test="not(/*/@upgrade = '')">
+            <xsl:value-of select="/*/@upgrade" />
+        </xsl:if>
+    </xsl:when>
+    <xsl:otherwise>
+        <xsl:value-of
+            select="$metafile/basename" />
+    </xsl:otherwise>
+    </xsl:choose>
+</xsl:variable>
+<xsl:variable name="future">
+    <xsl:choose>
+    <xsl:when test="$base = 'index'">
+        <xsl:value-of select="$metafile/path" />
+    </xsl:when>
+    <xsl:when test="$base = ''">
+        <!-- nothing -->
+    </xsl:when>
+    <xsl:otherwise>
+        <xsl:value-of select="concat($metafile/path, $base, '.html')" />
+    </xsl:otherwise>
+    </xsl:choose>
+</xsl:variable>
+
+<a href="http://httpd.apache.org/docs/current{$future}">
+    <xsl:apply-templates />
+</a>
+</xsl:template>
 
 <!-- ==================================================================== -->
 <!-- out of date                                                          -->

Modified: httpd/httpd/branches/2.0.x/docs/manual/style/xsl/directiveindex.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/docs/manual/style/xsl/directiveindex.xsl?rev=1563477&r1=1563476&r2=1563477&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/docs/manual/style/xsl/directiveindex.xsl (original)
+++ httpd/httpd/branches/2.0.x/docs/manual/style/xsl/directiveindex.xsl Sat Feb  1 21:42:47 2014
@@ -52,6 +52,8 @@
             </xsl:call-template>
         </xsl:variable>
 
+        <xsl:call-template name="retired" />
+
         <div id="preamble">
             <h1>
                 <xsl:value-of select="title" />

Modified: httpd/httpd/branches/2.0.x/docs/manual/style/xsl/faq.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/docs/manual/style/xsl/faq.xsl?rev=1563477&r1=1563476&r2=1563477&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/docs/manual/style/xsl/faq.xsl (original)
+++ httpd/httpd/branches/2.0.x/docs/manual/style/xsl/faq.xsl Sat Feb  1 21:42:47 2014
@@ -43,6 +43,8 @@
         <xsl:call-template name="top" />          
 
         <div id="page-content">
+            <xsl:call-template name="retired" />
+
             <div id="preamble">        
                 <h1>
                     <xsl:value-of select="title" />

Modified: httpd/httpd/branches/2.0.x/docs/manual/style/xsl/indexpage.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/docs/manual/style/xsl/indexpage.xsl?rev=1563477&r1=1563476&r2=1563477&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/docs/manual/style/xsl/indexpage.xsl (original)
+++ httpd/httpd/branches/2.0.x/docs/manual/style/xsl/indexpage.xsl Sat Feb  1 21:42:47 2014
@@ -55,6 +55,8 @@
         <xsl:call-template name="top"/>&lf;
 
         <div id="page-content">
+            <xsl:call-template name="retired" />
+
             <h1>
                 <xsl:value-of select="title"/>
             </h1>&lf;

Modified: httpd/httpd/branches/2.0.x/docs/manual/style/xsl/manualpage.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/docs/manual/style/xsl/manualpage.xsl?rev=1563477&r1=1563476&r2=1563477&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/docs/manual/style/xsl/manualpage.xsl (original)
+++ httpd/httpd/branches/2.0.x/docs/manual/style/xsl/manualpage.xsl Sat Feb  1 21:42:47 2014
@@ -41,6 +41,8 @@
         <xsl:call-template name="top"/>          
 
         <div id="page-content">
+            <xsl:call-template name="retired" />
+
             <div id="preamble">        
                 <h1>
                     <xsl:value-of select="title"/>

Modified: httpd/httpd/branches/2.0.x/docs/manual/style/xsl/moduleindex.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/docs/manual/style/xsl/moduleindex.xsl?rev=1563477&r1=1563476&r2=1563477&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/docs/manual/style/xsl/moduleindex.xsl (original)
+++ httpd/httpd/branches/2.0.x/docs/manual/style/xsl/moduleindex.xsl Sat Feb  1 21:42:47 2014
@@ -36,6 +36,8 @@
         <xsl:call-template name="top"/>  
 
         <div id="page-content">
+            <xsl:call-template name="retired" />
+
             <div id="preamble">
                 <h1>
                     <xsl:value-of select="title" />

Modified: httpd/httpd/branches/2.0.x/docs/manual/style/xsl/quickreference.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/docs/manual/style/xsl/quickreference.xsl?rev=1563477&r1=1563476&r2=1563477&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/docs/manual/style/xsl/quickreference.xsl (original)
+++ httpd/httpd/branches/2.0.x/docs/manual/style/xsl/quickreference.xsl Sat Feb  1 21:42:47 2014
@@ -35,6 +35,8 @@
     <body id="directive-index">&lf;
         <xsl:call-template name="top"/>&lf;
 
+        <xsl:call-template name="retired" />
+
         <div id="preamble">
             <h1>
                 <xsl:value-of select="title" />

Modified: httpd/httpd/branches/2.0.x/docs/manual/style/xsl/sitemap.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/docs/manual/style/xsl/sitemap.xsl?rev=1563477&r1=1563476&r2=1563477&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/docs/manual/style/xsl/sitemap.xsl (original)
+++ httpd/httpd/branches/2.0.x/docs/manual/style/xsl/sitemap.xsl Sat Feb  1 21:42:47 2014
@@ -36,6 +36,8 @@
         <xsl:call-template name="top" />&lf;
 
         <div id="page-content">
+            <xsl:call-template name="retired" />
+
             <div id="preamble">        
                 <h1>
                     <xsl:value-of select="title" />

Modified: httpd/httpd/branches/2.0.x/docs/manual/style/xsl/synopsis.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/docs/manual/style/xsl/synopsis.xsl?rev=1563477&r1=1563476&r2=1563477&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/docs/manual/style/xsl/synopsis.xsl (original)
+++ httpd/httpd/branches/2.0.x/docs/manual/style/xsl/synopsis.xsl Sat Feb  1 21:42:47 2014
@@ -36,6 +36,8 @@
         <xsl:call-template name="top" />&lf;
 
         <div id="page-content">&lf;
+            <xsl:call-template name="retired" />
+
             <div id="preamble">
                 <h1>
                     <xsl:choose>