summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Malo <nd@apache.org>2014-02-01 21:42:47 +0000
committerAndré Malo <nd@apache.org>2014-02-01 21:42:47 +0000
commit58bd7f0cfbaab9c6110d5c3384a1e978abd9374a (patch)
tree1d355186d1d373d149c0a7b8a4482358a8e77cdb
parenta812c9d29be0ca45e197a85036cc37514394cd1d (diff)
downloadhttpd-58bd7f0cfbaab9c6110d5c3384a1e978abd9374a.tar.gz
- use localized retirement notice
- 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
-rw-r--r--docs/manual/style/xsl/common.xsl117
-rw-r--r--docs/manual/style/xsl/directiveindex.xsl2
-rw-r--r--docs/manual/style/xsl/faq.xsl2
-rw-r--r--docs/manual/style/xsl/indexpage.xsl2
-rw-r--r--docs/manual/style/xsl/manualpage.xsl2
-rw-r--r--docs/manual/style/xsl/moduleindex.xsl2
-rw-r--r--docs/manual/style/xsl/quickreference.xsl2
-rw-r--r--docs/manual/style/xsl/sitemap.xsl2
-rw-r--r--docs/manual/style/xsl/synopsis.xsl2
9 files changed, 105 insertions, 28 deletions
diff --git a/docs/manual/style/xsl/common.xsl b/docs/manual/style/xsl/common.xsl
index 6bcdee1748..39735d1bcc 100644
--- a/docs/manual/style/xsl/common.xsl
+++ b/docs/manual/style/xsl/common.xsl
@@ -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 -->
diff --git a/docs/manual/style/xsl/directiveindex.xsl b/docs/manual/style/xsl/directiveindex.xsl
index 062ad38801..75d81de5c3 100644
--- a/docs/manual/style/xsl/directiveindex.xsl
+++ b/docs/manual/style/xsl/directiveindex.xsl
@@ -52,6 +52,8 @@
</xsl:call-template>
</xsl:variable>
+ <xsl:call-template name="retired" />
+
<div id="preamble">
<h1>
<xsl:value-of select="title" />
diff --git a/docs/manual/style/xsl/faq.xsl b/docs/manual/style/xsl/faq.xsl
index 2cd3d3bb55..344bdb61ed 100644
--- a/docs/manual/style/xsl/faq.xsl
+++ b/docs/manual/style/xsl/faq.xsl
@@ -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" />
diff --git a/docs/manual/style/xsl/indexpage.xsl b/docs/manual/style/xsl/indexpage.xsl
index d62814bfc1..789f0df22f 100644
--- a/docs/manual/style/xsl/indexpage.xsl
+++ b/docs/manual/style/xsl/indexpage.xsl
@@ -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;
diff --git a/docs/manual/style/xsl/manualpage.xsl b/docs/manual/style/xsl/manualpage.xsl
index 30cc9d100e..85772b553b 100644
--- a/docs/manual/style/xsl/manualpage.xsl
+++ b/docs/manual/style/xsl/manualpage.xsl
@@ -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"/>
diff --git a/docs/manual/style/xsl/moduleindex.xsl b/docs/manual/style/xsl/moduleindex.xsl
index e3651a4588..ad54441326 100644
--- a/docs/manual/style/xsl/moduleindex.xsl
+++ b/docs/manual/style/xsl/moduleindex.xsl
@@ -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" />
diff --git a/docs/manual/style/xsl/quickreference.xsl b/docs/manual/style/xsl/quickreference.xsl
index f6ea14162c..e6c1524501 100644
--- a/docs/manual/style/xsl/quickreference.xsl
+++ b/docs/manual/style/xsl/quickreference.xsl
@@ -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" />
diff --git a/docs/manual/style/xsl/sitemap.xsl b/docs/manual/style/xsl/sitemap.xsl
index eaa2c413c6..f72dafcbf8 100644
--- a/docs/manual/style/xsl/sitemap.xsl
+++ b/docs/manual/style/xsl/sitemap.xsl
@@ -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" />
diff --git a/docs/manual/style/xsl/synopsis.xsl b/docs/manual/style/xsl/synopsis.xsl
index 7e43411a0d..0733a59a3d 100644
--- a/docs/manual/style/xsl/synopsis.xsl
+++ b/docs/manual/style/xsl/synopsis.xsl
@@ -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>