Commit 6ae0f0ab authored by Andre Malo's avatar Andre Malo
Browse files

- 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
parent e95ca80c
Loading
Loading
Loading
Loading
+89 −28
Original line number Diff line number Diff line
@@ -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,17 +173,19 @@
    <!-- 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:if test="$is-retired">
            <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')}"/>
                    <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/2.2{concat($metafile/path, $metafile/basename, '.html')}"/>
                <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>
<!-- /head -->
@@ -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/>
    <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/">Current release version of Apache HTTP Server documentation</a></li>
            <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 = '')">
    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>
            <p><xsl:apply-templates select="$message[@id='retired.document']" mode="retired" /></p>
        </xsl:if>
    </div>
</xsl:if>
</xsl:template>
<!-- /top -->
<!-- /retired -->

<xsl:template match="message">
    <xsl:apply-templates />
</xsl:template>

<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                                                          -->
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@
            </xsl:call-template>
        </xsl:variable>

        <xsl:call-template name="retired" />

        <div id="preamble">
            <h1>
                <xsl:value-of select="title" />
+2 −0
Original line number Diff line number Diff line
@@ -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" />
+2 −0
Original line number Diff line number Diff line
@@ -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;
+2 −0
Original line number Diff line number Diff line
@@ -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"/>
Loading