]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
- use localized retirement notice
authorAndré Malo <nd@apache.org>
Sat, 1 Feb 2014 21:42:47 +0000 (21:42 +0000)
committerAndré Malo <nd@apache.org>
Sat, 1 Feb 2014 21:42:47 +0000 (21:42 +0000)
- properly place the html container

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@1563477 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/xsl/common.xsl
docs/manual/style/xsl/directiveindex.xsl
docs/manual/style/xsl/faq.xsl
docs/manual/style/xsl/indexpage.xsl
docs/manual/style/xsl/manualpage.xsl
docs/manual/style/xsl/moduleindex.xsl
docs/manual/style/xsl/quickreference.xsl
docs/manual/style/xsl/sitemap.xsl
docs/manual/style/xsl/synopsis.xsl

index 6bcdee1748093e074593f48d6f0e30b5d2e1a328..39735d1bcc81247e0cd178ad271f4c72fc43e4f7 100644 (file)
@@ -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)   -->
     <!-- 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>
     </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                                                          -->
index 062ad3880151168e96d37ddb618f43b7a2cd104b..75d81de5c37d7f3e08fac68657dc4cc9ee22cbff 100644 (file)
@@ -52,6 +52,8 @@
             </xsl:call-template>
         </xsl:variable>
 
+        <xsl:call-template name="retired" />
+
         <div id="preamble">
             <h1>
                 <xsl:value-of select="title" />
index 2cd3d3bb551b3748b8c760d9823634ed2d27a7e7..344bdb61ed82d01f5fdc5156cc3725ed3dda5fcd 100644 (file)
@@ -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" />
index d62814bfc1cb98bb1bf720d6df64364ce7293105..789f0df22ffcbf30b6d3bf06233d33a9a1cef6d3 100644 (file)
@@ -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;
index 30cc9d100e71537380b8d6e687e8de86330cdbc4..85772b553b50e703b033f19a1c98dbebde799612 100644 (file)
@@ -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"/>
index e3651a4588dcb9ffa465da08b4a4b728223c5933..ad54441326cbbadf95a71556f7d92ffd02b0caf4 100644 (file)
@@ -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" />
index f6ea14162c55e9e5f49b387854be47618ad69163..e6c1524501141b46cedc38e9fddc8387e5971f36 100644 (file)
@@ -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" />
index eaa2c413c6799e3db3077beb1b0c602acfe28030..f72dafcbf889e2e3d867fd98153b8556bdd6f306 100644 (file)
@@ -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" />
index 7e43411a0d6215e73915c3882ddd2bbe55770f18..0733a59a3d26670bf82733d244cba3b96847c5e8 100644 (file)
@@ -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>