Author: markt
Date: Tue Aug 27 10:18:08 2013
New Revision: 1517778
URL: http://svn.apache.org/r1517778
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55383
Improve markup and design of the Tomcat 8 documentation webapp.
Patch provided by Konstantin Preißer.
Added:
tomcat/trunk/webapps/docs/images/docs-stylesheet.css (with props)
tomcat/trunk/webapps/docs/images/tomcat.png (with props)
Modified:
tomcat/trunk/build.xml
tomcat/trunk/webapps/docs/tomcat-docs.xsl
Modified: tomcat/trunk/build.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1517778&r1=1517777&r2=1517778&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Tue Aug 27 10:18:08 2013
@@ -210,6 +210,7 @@
<tstamp>
<format property="year" pattern="yyyy" locale="en"/>
<format property="today" pattern="MMM d yyyy" locale="en"/>
+ <format property="today-iso-8601" pattern="yyyy-MM-dd" locale="en"/>
<format property="tstamp" pattern="hh:mm:ss"/>
</tstamp>
<filterset id="version.filters">
@@ -845,6 +846,7 @@
<param name="relative-path" expression="."/>
<param name="version" expression="${version}"/>
<param name="build-date" expression="${today}"/>
+ <param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
<xslt basedir="webapps/docs/appdev"
@@ -859,6 +861,7 @@
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="build-date" expression="${today}"/>
+ <param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
<xslt basedir="webapps/docs/funcspecs"
@@ -873,6 +876,7 @@
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="build-date" expression="${today}"/>
+ <param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
<xslt basedir="webapps/docs/config"
@@ -887,6 +891,7 @@
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="build-date" expression="${today}"/>
+ <param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
<xslt basedir="webapps/docs/architecture"
@@ -901,6 +906,7 @@
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="build-date" expression="${today}"/>
+ <param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
@@ -916,6 +922,7 @@
<param name="relative-path" expression=".."/>
<param name="version" expression="${version}"/>
<param name="build-date" expression="${today}"/>
+ <param name="build-date-iso-8601" expression="${today-iso-8601}"/>
<param name="year" expression="${year}"/>
</xslt>
</target>
Added: tomcat/trunk/webapps/docs/images/docs-stylesheet.css
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/images/docs-stylesheet.css?rev=1517778&view=auto
==============================================================================
--- tomcat/trunk/webapps/docs/images/docs-stylesheet.css (added)
+++ tomcat/trunk/webapps/docs/images/docs-stylesheet.css Tue Aug 27 10:18:08
2013
@@ -0,0 +1,260 @@
+@charset "utf-8";
+/*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+
+/* General style */
+
+body {
+ margin: 0;
+}
+
+body, input {
+ font-family: 'Lucida Sans Unicode', Arial, Helvetica, sans-serif;
+ font-size: 10.5pt;
+}
+
+code, pre {
+ font-family: Consolas, monospace;
+}
+
+img {
+ border: 0;
+}
+
+table {
+ border-collapse: collapse;
+}
+
+main {
+ /* Remove this once all IEs support <main> element */
+ display: block;
+}
+
+
+/* Layout */
+
+#wrapper {
+ min-width: 400px;
+}
+
+#header {
+ box-shadow: 0 0 7px #aaa;
+ border-bottom: 1px solid #bbb;
+}
+
+#header > div {
+ padding-left: 15px;
+ padding-right: 15px;
+ background: linear-gradient(to bottom, #ffffff -10%, #F8F3E4 100%);
+ position: relative;
+}
+
+#header .logo {
+ float: left;
+ padding-top: 10px;
+ min-width: 190px;
+}
+
+#header .logo img{
+ /* To avoid that the Font Descender being added to the parent div's height */
+ vertical-align: middle;
+}
+
+#header .asfLogo {
+ float: right;
+ position: relative;
+ top: 8px;
+}
+
+#header h1 {
+ margin-top: 0.6em;
+ margin-bottom: 0;
+}
+
+#header .versionInfo {
+ font-size: 13pt;
+ margin-bottom: 1em;
+}
+
+#middle {
+ display: table;
+ table-layout: fixed;
+ margin: 0;
+ width: 100%;
+}
+#middle > div { display: table-row; }
+#middle > div > div { display: table-cell; vertical-align: top; }
+
+
+
+#mainLeft {
+ width: 190px;
+}
+
+#mainLeft > div {
+ margin-top: -1px; /* to overwrite border of element above */
+ padding-left: 16px;
+ padding-right: 14px;
+ padding-top: 6px;
+ padding-bottom: 15px;
+ background-color: #F8F3E4;
+ border-right: 1px solid #bbb;
+ border-bottom: 1px solid #bbb;
+ font-size: 10pt;
+ border-bottom-right-radius: 20px;
+ box-shadow: 0 0 5px #aaa;
+}
+
+#mainLeft h2 {
+ margin-bottom: 0.2em;
+ font-size: 1.2em;
+}
+
+#mainLeft ul {
+ padding: 0;
+ margin: 0;
+ list-style-type: none;
+}
+
+#mainLeft ul a {
+ text-indent: -0.6em;
+ padding-left: 1.4em;
+ display: block;
+ text-decoration: none;
+ color: #444;
+}
+#mainLeft ul a:hover {
+ color: #000;
+ background-color: #D1c9b9;
+}
+
+#mainRight {
+ padding-left: 14px;
+ padding-right: 20px;
+
+}
+
+#footer {
+ margin-top: 30px;
+ padding-top: 20px;
+ padding-bottom: 20px;
+ padding-left: 20px;
+ padding-right: 20px;
+ border-top: 1px solid #ccc;
+ color: #444;
+ text-align: center;
+ /* font-style: italic; */
+ font-size: 9pt;
+}
+
+
+/* Content */
+
+#content div.text {
+ padding-left: 1em;
+ padding-left: 1em;
+}
+
+#content h3, #content h4, #content h5, #content h6 {
+ padding-left: 5px;
+ padding-right: 5px;
+ background-color: #eaeaea;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+}
+
+#content h4, #content h5, #content h6 {
+ background-color: #f6f6f6;
+}
+
+code {
+ background-color: rgb(224,255,255);
+ padding: 0 0.1em;
+}
+
+div.codeBox pre code, code.attributeName, code.propertyName {
+ background-color: transparent;
+}
+div.codeBox {
+ overflow: auto;
+ /* TODO: Maybe add margin-top and margin-bottom like with <p> */
+}
+div.codeBox pre {
+ margin: 0;
+ padding: 4px;
+ border: 1px solid #999;
+ border-radius: 5px;
+ background-color: #eff8ff;
+ display: table; /* To prevent <pre>s from taking the complete available
width. */
+ /*
+ When it is officially supported, use the following CSS instead of display:
table
+ to prevent big <pre>s from exceeding the browser window:
+ max-width: available;
+ width: min-content;
+ */
+}
+
+div.codeBox pre.wrap {
+ white-space: pre-wrap;
+}
+
+
+table.defaultTable th {
+ background-color: #88b;
+ color: #fff;
+}
+
+table.detail-table th {
+ background-color: #039acc;
+ color: #fff;
+}
+table.detail-table td {
+ background-color: #DAF2FA;
+}
+
+table.defaultTable th, table.defaultTable td, table.detail-table th,
table.detail-table td {
+ border: 1px solid #777;
+ padding: 5px;
+ text-align: left;
+}
+
+
+p.notice {
+ border: 1px solid rgb(255, 0, 0);
+ background-color: rgb(238, 238, 238);
+ color: rgb(0, 51, 102);
+ padding: 0.5em;
+ margin: 1em 2em 1em 1em;
+}
+
+
+/* Changelog-Styles */
+
+ul.changelog {
+ padding-left: 1em;
+ list-style-type: none;
+}
+
+ul.changelog li{
+ padding-top: 5px;
+ padding-bottom: 5px;
+}
+
+ul.changelog img {
+ vertical-align: middle
+}
Propchange: tomcat/trunk/webapps/docs/images/docs-stylesheet.css
------------------------------------------------------------------------------
svn:eol-style = native
Added: tomcat/trunk/webapps/docs/images/tomcat.png
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/images/tomcat.png?rev=1517778&view=auto
==============================================================================
Binary file - no diff available.
Propchange: tomcat/trunk/webapps/docs/images/tomcat.png
------------------------------------------------------------------------------
svn:mime-type = image/png
Modified: tomcat/trunk/webapps/docs/tomcat-docs.xsl
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/tomcat-docs.xsl?rev=1517778&r1=1517777&r2=1517778&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/tomcat-docs.xsl (original)
+++ tomcat/trunk/webapps/docs/tomcat-docs.xsl Tue Aug 27 10:18:08 2013
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -20,237 +20,223 @@
<!-- $Id$ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
+ version="3.0">
<!-- Output method -->
<xsl:output method="html"
- encoding="iso-8859-1"
- indent="no"/>
+ html-version="5.0"
+ encoding="UTF-8"
+ indent="no"
+ doctype-system="about:legacy-compat"/>
<!-- Defined parameters (overrideable) -->
- <xsl:param name="home-name" select="'The Tomcat Project'"/>
- <xsl:param name="home-href" select="'http://tomcat.apache.org/'"/>
- <xsl:param name="home-logo" select="'/images/tomcat.gif'"/>
- <xsl:param name="printer-logo" select="'/images/printer.gif'"/>
- <xsl:param name="apache-logo" select="'/images/asf-logo.gif'"/>
- <xsl:param name="subdir" select="''"/>
- <xsl:param name="relative-path" select="'.'"/>
- <xsl:param name="version" select="'8.0.x'"/>
- <xsl:param name="majorversion" select="'8.0'"/>
- <xsl:param name="build-date" select="'MMM d yyyy'"/>
- <xsl:param name="year" select="'yyyy'"/>
- <xsl:param name="void-image" select="'/images/void.gif'"/>
- <xsl:param name="project-menu" select="'menu'"/>
- <xsl:param name="standalone" select="''"/>
- <xsl:param name="buglink"
select="'http://issues.apache.org/bugzilla/show_bug.cgi?id='"/>
- <xsl:param name="revlink"
select="'http://svn.apache.org/viewvc?view=rev&rev='"/>
- <xsl:param name="sitedir" select="''"/>
- <xsl:param name="filename" select="'-'"/>
+ <xsl:param name="home-name" select="'The Tomcat Project'"/>
+ <xsl:param name="home-href"
select="'http://tomcat.apache.org/'"/>
+ <xsl:param name="home-logo" select="'/images/tomcat.png'"/>
+ <xsl:param name="home-stylesheet"
select="'/images/docs-stylesheet.css'"/>
+ <xsl:param name="apache-logo" select="'/images/asf-logo.gif'"/>
+ <xsl:param name="subdir" select="''"/>
+ <xsl:param name="relative-path" select="'.'"/>
+ <xsl:param name="version" select="'8.0.x'"/>
+ <xsl:param name="majorversion" select="'8.0'"/>
+ <xsl:param name="build-date" select="'MMM d yyyy'"/>
+ <xsl:param name="build-date-iso-8601" select="'yyyy-dd-MM'"/>
+ <xsl:param name="year" select="'yyyy'"/>
+ <xsl:param name="buglink"
select="'http://issues.apache.org/bugzilla/show_bug.cgi?id='"/>
+ <xsl:param name="revlink"
select="'http://svn.apache.org/viewvc?view=rev&rev='"/>
+ <xsl:param name="sitedir" select="''"/>
+ <xsl:param name="filename" select="'-'"/>
<!-- Defined variables (non-overrideable) -->
- <xsl:variable name="body-bg" select="'#ffffff'"/>
- <xsl:variable name="body-fg" select="'#000000'"/>
- <xsl:variable name="body-link" select="'#525D76'"/>
- <xsl:variable name="banner-bg" select="'#525D76'"/>
- <xsl:variable name="banner-fg" select="'#ffffff'"/>
- <xsl:variable name="sub-banner-bg" select="'#828DA6'"/>
- <xsl:variable name="sub-banner-fg" select="'#ffffff'"/>
- <xsl:variable name="source-color" select="'#023264'"/>
- <xsl:variable name="attributes-color" select="'#023264'"/>
- <xsl:variable name="table-th-bg" select="'#039acc'"/>
- <xsl:variable name="table-td-bg" select="'#a0ddf0'"/>
<xsl:variable name="commentslink">/<xsl:value-of
select="$sitedir"/>comments.html</xsl:variable>
<!-- Process an entire document into an HTML page -->
<xsl:template match="document">
<xsl:variable name="project"
select="document('project.xml')/project"/>
- <html>
- <head>
- <title><xsl:value-of select="project/title"/> (<xsl:value-of
select="$version"/>) - <xsl:value-of select="properties/title"/></title>
- <xsl:for-each select="properties/author">
- <xsl:variable name="name">
- <xsl:value-of select="."/>
- </xsl:variable>
- <!--
+<html lang="en">
+<head>
+ <!-- Note: XLST seems to always output a
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ when method="html",
+ therefore we can't use
+ <meta charset="UTF-8"/>.
+
+ In XHTML, this is not needed as the encoding will be
+ specified in the XML declaration.
+ -->
+
+ <xsl:variable name="css-src">
+ <xsl:value-of select="$relative-path"/><xsl:value-of
select="$home-stylesheet"/>
+ </xsl:variable>
+ <link href="{$css-src}" rel="stylesheet" type="text/css"/>
+ <style type="text/css" media="print"><![CDATA[
+ .noPrint { display: none; }
+ #middle > div > div#mainLeft { display: none; }
+ a { color: inherit; text-decoration: none; }
+ ]]></style>
+
+ <title><xsl:value-of select="project/title"/> (<xsl:value-of
select="$version"/>) - <xsl:value-of select="properties/title"/></title>
+ <xsl:for-each select="properties/author">
+ <xsl:variable name="name">
+ <xsl:value-of select="."/>
+ </xsl:variable>
+ <!--
<xsl:variable name="email">
<xsl:value-of select="@email"/>
</xsl:variable>
- -->
- <meta name="author" content="{$name}"/>
- <!-- Don't publish e-mail addresses
- <meta name="email" content="{$email}"/>
- -->
- </xsl:for-each>
- <style type="text/css" media="print">
- .noPrint {display: none;}
- td#mainBody {width: 100%;}
- </style>
- <style type="text/css">
- code {background-color:rgb(224,255,255);padding:0 0.1em;}
- code.attributeName, code.propertyName
{background-color:transparent;}
- </style>
- <style type="text/css">
- .wrapped-source code { display: block; background-color:
transparent; }
- .wrapped-source div { margin: 0 0 0 1.25em; }
- .wrapped-source p { margin: 0 0 0 1.25em; text-indent: -1.25em; }
- </style>
- <style type="text/css">
- p.notice {
- border: 1px solid rgb(255, 0, 0);
- background-color: rgb(238, 238, 238);
- color: rgb(0, 51, 102);
- padding: 0.5em;
- margin: 1em 2em 1em 1em;
- }
- </style>
- </head>
-
- <body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}"
- alink="{$body-link}" vlink="{$body-link}">
-
- <table border="0" width="100%" cellspacing="0">
-
- <xsl:comment>PAGE HEADER</xsl:comment>
- <tr>
- <td>
+ -->
+ <meta name="author" content="{$name}"/>
+ <!-- Don't publish e-mail addresses
+ <meta name="email" content="{$email}"/>
+ -->
+ </xsl:for-each>
+
+ <!-- Script for ASF Comments System. -->
+ <!--
+ Use data-* attributes for retrieval of XSLT-generated data
+ in JavaScript.
+ Use this approach rather than directly inserting text
+ in a JS string literal as that would cause
+ problems when the string contains special characters
+ like ", ', \n etc.
+ -->
+ <xsl:variable name="comments-identifier">
+ <xsl:value-of select="$sitedir"/><xsl:value-of
select="$subdir"/><xsl:value-of
select="substring($filename,1,string-length($filename)-4)"/>
+ </xsl:variable>
+ <script type="application/javascript"
+ data-comments-identifier="{$comments-identifier}"><![CDATA[
+ "use strict"; // Enable strict mode
+
+ (function() {
+ var thisScript = document.currentScript;
+ if (!thisScript) { // Workaround for IE <= 11
+ var scripts = document.getElementsByTagName("script");
+ thisScript = scripts[scripts.length - 1];
+ }
+ document.addEventListener("DOMContentLoaded", (function() {
+ var commentsDiv = document.getElementById("comments_thread");
+ var commentsShortname = "tomcat";
+ var commentsIdentifier = "http://tomcat.apache.org/" +
+ thisScript.getAttribute("data-comments-identifier") + ".html";
+
+ (function(w, d) {
+ if (w.location.hostname.toLowerCase() == "tomcat.apache.org") {
+ commentsDiv.appendChild(d.createTextNode("Loading commentsâ¦"));
+ var s = d.createElement("script");
+ s.type = "application/javascript";
+ s.async = true;
+ s.src = "https://comments.apache.org/show_comments.lua?site=" +
+ encodeURIComponent(commentsShortname) +
+ "&page=" + encodeURIComponent(commentsIdentifier);
+ d.head.appendChild(s);
+ } else {
+ commentsDiv.appendChild(d.createTextNode("Comments are disabled
for this page at the moment."));
+ }
+ })(window, document);
+ }), false);
+ })();
+ ]]></script>
+ </head>
+
+ <body>
+ <div id="wrapper">
+ <!-- Header -->
+ <header id="header">
+ <div>
+ <div>
<xsl:if test="project/logo">
- <xsl:variable name="alt">
- <xsl:value-of select="project/logo"/>
- </xsl:variable>
- <xsl:variable name="home">
- <xsl:value-of select="project/@href"/>
- </xsl:variable>
<xsl:variable name="src">
- <xsl:value-of select="$relative-path"/><xsl:value-of
select="project/logo/@href"/>
+ <xsl:value-of select="$relative-path"/><xsl:value-of
select="$home-logo"/>
</xsl:variable>
-
- <xsl:comment>PROJECT LOGO</xsl:comment>
- <a href="{$home}">
- <img src="{$src}" align="right" alt="{$alt}" border="0"/>
- </a>
+ <div class="logo noPrint">
+ <a href="{project/@href}"><img alt="Tomcat Home" src="{$src}"/></a>
+ </div>
</xsl:if>
- </td>
- <td>
- <h1><font face="arial,helvetica,sanserif"><xsl:value-of
select="$project/title"/></font></h1>
- <font face="arial,helvetica,sanserif">Version <xsl:value-of
select="$version"/>, <xsl:value-of select="$build-date"/></font>
- </td>
- <td>
- <xsl:comment>APACHE LOGO</xsl:comment>
- <xsl:variable name="src">
- <xsl:value-of select="$relative-path"/><xsl:value-of
select="$apache-logo"/>
- </xsl:variable>
- <a href="http://www.apache.org/">
- <img src="{$src}" align="right" alt="Apache Logo" border="0"/>
- </a>
- </td>
- </tr>
- </table>
- <table border="0" width="100%" cellspacing="4">
-
- <xsl:comment>HEADER SEPARATOR</xsl:comment>
- <tr>
- <td colspan="2">
- <hr noshade="noshade" size="1"/>
- </td>
- </tr>
-
- <tr>
-
- <xsl:comment>LEFT SIDE NAVIGATION</xsl:comment>
- <td width="20%" valign="top" nowrap="nowrap" class="noPrint">
- <xsl:apply-templates select="project/body/menu"/>
- </td>
-
- <xsl:comment>RIGHT SIDE MAIN BODY</xsl:comment>
- <td width="80%" valign="top" align="left" id="mainBody">
- <h1><xsl:value-of select="properties/title"/></h1>
- <xsl:apply-templates select="body/section"/>
- </td>
-
- </tr>
-
- <xsl:if test="not(properties/no-comments)">
- <tr class="noPrint">
+ <div style="height: 1px;"/>
+ <div class="asfLogo"><a href="http://www.apache.org/"
target="_blank"><img src="http://www.apache.org/images/feather.png" alt="The
Apache Software Foundation" style="width: 266px; height: 83px;"/></a></div>
+ <h1><xsl:value-of select="$project/title"/></h1>
+ <div class="versionInfo">
+ Version <xsl:value-of select="$version"/>,
+ <time datetime="{$build-date-iso-8601}"><xsl:value-of
select="$build-date"/></time>
+ </div>
+ <div style="height: 1px;"/>
+ <div style="clear: left;"/>
+ </div>
+ </div>
+ </header>
- <td width="20%" valign="top" nowrap="nowrap" class="noPrint">
- </td>
- <td width="80%" valign="top" align="left">
- <table border="0" cellspacing="0" cellpadding="2">
- <!-- Comment heading -->
- <tr><td bgcolor="{$banner-bg}">
- <font color="{$banner-fg}" face="arial,helvetica.sanserif">
- <a name="comments_section"
id="comments_section"><strong>Comments</strong></a></font>
- </td>
- </tr>
- <!-- Comment body -->
- <tr><td>
- <blockquote>
- <p class="notice">
- <strong>Notice: </strong>This comments section collects your
suggestions
- on improving documentation for Apache Tomcat.<br/><br/>
- If you have trouble and need help, read
- <a href="http://tomcat.apache.org/findhelp.html">Find Help</a>
page
- and ask your question on the tomcat-users
- <a href="http://tomcat.apache.org/lists.html">mailing list</a>.
- Do not ask such questions here. This is not a Q&A
section.<br/><br/>
- The Apache Comments System is explained <a
href="{$commentslink}">here</a>.
- Comments may be removed by our moderators if they are either
- implemented or considered invalid/off-topic.</p>
- <script type="text/javascript">
- <xsl:text
disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!--
- var comments_shortname = 'tomcat';
- var comments_identifier =
'http://tomcat.apache.org/]]></xsl:text><xsl:value-of
select="$sitedir"/><xsl:value-of select="$subdir"/><xsl:value-of
select="substring($filename,1,string-length($filename)-4)"/><xsl:text
disable-output-escaping="yes"><![CDATA[.html';
- (function(w, d) {
- if (w.location.hostname.toLowerCase() ==
"tomcat.apache.org") {
- d.write('<div id="comments_thread"><\/div>');
- var s = d.createElement('script');
- s.type = 'text/javascript';
- s.async = true;
- s.src =
'https://comments.apache.org/show_comments.lua?site=' + comments_shortname +
'&page=' + comments_identifier;
- (d.getElementsByTagName('head')[0] ||
d.getElementsByTagName('body')[0]).appendChild(s);
- }
- else {
- d.write('<div id="comments_thread"><strong>Comments are
disabled for this page at the moment.<\/strong><\/div>');
- }
- })(window, document);
- //--><!]]]]>></xsl:text></script>
- </blockquote></td></tr>
- </table>
- </td>
- </tr>
- </xsl:if>
+ <div id="middle">
+ <div>
+ <div id="mainLeft" class="noprint">
+ <div>
+ <!-- Navigation -->
+ <nav>
+ <xsl:apply-templates select="project/body/menu"/>
+ </nav>
+ </div>
+ </div>
+ <div id="mainRight">
+ <div id="content">
+ <!-- Main Part -->
+ <main>
+ <h2><xsl:value-of select="properties/title"/></h2>
+ <xsl:apply-templates select="body/section"/>
+
+ <!-- Comments Section -->
+ <xsl:if test="not(properties/no-comments)">
+ <div class="noprint">
+ <h3 id="comments_section">
+ Comments
+ </h3>
+
+ <div class="text">
+ <p class="notice">
+ <strong>Notice: </strong>This comments section collects
your suggestions
+ on improving documentation for Apache Tomcat.<br/><br/>
+ If you have trouble and need help, read
+ <a href="http://tomcat.apache.org/findhelp.html">Find
Help</a> page
+ and ask your question on the tomcat-users
+ <a href="http://tomcat.apache.org/lists.html">mailing
list</a>.
+ Do not ask such questions here. This is not a Q&A
section.<br/><br/>
+ The Apache Comments System is explained <a
href="{$commentslink}">here</a>.
+ Comments may be removed by our moderators if they are
either
+ implemented or considered invalid/off-topic.
+ </p>
+ <div id="comments_thread"/>
+ </div>
+ </div>
+ </xsl:if>
- <xsl:comment>FOOTER SEPARATOR</xsl:comment>
- <tr>
- <td colspan="2">
- <hr noshade="noshade" size="1"/>
- </td>
- </tr>
+ </main>
+ </div>
+ </div>
+ </div>
+ </div>
- <xsl:comment>PAGE FOOTER</xsl:comment>
- <tr><td colspan="2">
- <div align="center"><font color="{$body-link}" size="-1"><em>
- Copyright © 1999-<xsl:value-of select="$year"/>, Apache Software
Foundation
- </em></font></div>
- </td></tr>
+ <!-- Footer -->
+ <footer id="footer">
+ Copyright © 1999-<xsl:value-of select="$year"/>, The Apache Software
Foundation
+ </footer>
+</div>
+</body>
+</html>
- </table>
- </body>
- </html>
</xsl:template>
<!-- Process a menu for the navigation bar -->
<xsl:template match="menu">
- <p><strong><xsl:value-of select="@name"/></strong></p>
+ <div>
+ <h2><strong><xsl:value-of select="@name"/></strong></h2>
<ul>
<xsl:apply-templates select="item"/>
</ul>
+ </div>
</xsl:template>
@@ -265,7 +251,7 @@
<!-- Process a documentation section -->
<xsl:template match="section">
- <xsl:variable name="name">
+ <xsl:variable name="name2">
<xsl:choose>
<xsl:when test="@anchor">
<xsl:value-of select="@anchor" />
@@ -275,40 +261,32 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="name2">
- <xsl:value-of select="translate($name, ' #', '__')"/>
+ <xsl:variable name="name">
+ <xsl:value-of select="translate($name2, ' #', '__')"/>
</xsl:variable>
- <table border="0" cellspacing="0" cellpadding="2">
- <!-- Section heading -->
- <tr><td bgcolor="{$banner-bg}">
- <font color="{$banner-fg}" face="arial,helvetica.sanserif">
- <xsl:if test="$name != $name2"><a
name="{$name}"><xsl:comment>()</xsl:comment></a></xsl:if>
- <a name="{$name2}">
- <strong><xsl:value-of select="@name"/></strong></a></font>
- </td>
+
+
+ <!-- Section heading -->
+ <h3 id="{$name}">
<xsl:if test="@rtext">
<!-- Additional right-aligned text cell in section heading. It is used
by changelog.xml -->
- <td align="right" bgcolor="{$banner-bg}">
- <font color="{$banner-fg}" face="arial,helvetica.sanserif">
- <strong><xsl:value-of select="@rtext"/></strong></font>
- </td>
+ <span style="float: right;">
+ <xsl:value-of select="@rtext"/>
+ </span><xsl:text> </xsl:text> <!-- Ensure a space follows after
</span> -->
</xsl:if>
- </tr>
- <!-- Section body -->
- <tr><td>
- <xsl:if test="@rtext">
- <xsl:attribute name="colspan">2</xsl:attribute>
- </xsl:if>
- <blockquote>
- <xsl:apply-templates/>
- </blockquote></td></tr>
- </table>
+ <xsl:value-of select="@name"/>
+ </h3>
+ <!-- Section body -->
+ <div class="text">
+ <xsl:apply-templates/>
+ </div>
+
</xsl:template>
<!-- Process a documentation subsection -->
<xsl:template match="subsection">
- <xsl:variable name="name">
+ <xsl:variable name="name2">
<xsl:choose>
<xsl:when test="@anchor">
<xsl:value-of select="@anchor" />
@@ -323,22 +301,21 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="name2">
- <xsl:value-of select="translate($name, ' #', '__')"/>
+ <xsl:variable name="name">
+ <xsl:value-of select="translate($name2, ' #', '__')"/>
</xsl:variable>
- <table border="0" cellspacing="0" cellpadding="2">
+
+ <div class="subsection">
<!-- Subsection heading -->
- <tr><td bgcolor="{$sub-banner-bg}">
- <font color="{$sub-banner-fg}" face="arial,helvetica.sanserif">
- <xsl:if test="$name != $name2"><a
name="{$name}"><xsl:comment>()</xsl:comment></a></xsl:if>
- <a name="{$name2}">
- <strong><xsl:value-of select="@name"/></strong></a></font>
- </td></tr>
+ <h4 id="{$name}">
+ <xsl:value-of select="@name"/>
+ </h4>
<!-- Subsection body -->
- <tr><td><blockquote>
+ <div class="text">
<xsl:apply-templates/>
- </blockquote></td></tr>
- </table>
+ </div>
+ </div>
+
</xsl:template>
@@ -348,7 +325,7 @@
</xsl:template>
<xsl:template mode="toc" match="section|subsection">
- <xsl:variable name="name">
+ <xsl:variable name="name2">
<xsl:choose>
<xsl:when test="@anchor">
<xsl:value-of select="@anchor" />
@@ -363,10 +340,10 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:variable name="name2">
- <xsl:value-of select="translate($name, ' #', '__')"/>
+ <xsl:variable name="name">
+ <xsl:value-of select="translate($name2, ' #', '__')"/>
</xsl:variable>
- <li><a href="#{$name2}"><xsl:value-of select="@name"/></a>
+ <li><a href="#{$name}"><xsl:value-of select="@name"/></a>
<xsl:if test="subsection">
<ol><xsl:apply-templates mode="toc" select="subsection"/></ol>
</xsl:if>
@@ -376,59 +353,14 @@
<!-- Process a source code example -->
<xsl:template match="source">
- <xsl:variable name="void">
- <xsl:value-of select="$relative-path"/><xsl:value-of
select="$void-image"/>
- </xsl:variable>
- <div align="left">
- <table cellspacing="4" cellpadding="0" border="0">
- <tr>
- <td bgcolor="{$source-color}" width="1" height="1">
- <img src="{$void}" alt="" width="1" height="1" vspace="0"
hspace="0" border="0"/>
- </td>
- <td bgcolor="{$source-color}" height="1">
- <img src="{$void}" alt="" width="1" height="1" vspace="0"
hspace="0" border="0"/>
- </td>
- <td bgcolor="{$source-color}" width="1" height="1">
- <img src="{$void}" alt="" width="1" height="1" vspace="0"
hspace="0" border="0"/>
- </td>
- </tr>
- <tr>
- <td bgcolor="{$source-color}" width="1">
- <img src="{$void}" alt="" width="1" height="1" vspace="0"
hspace="0" border="0"/>
- </td>
- <xsl:choose>
- <xsl:when test="@wrapped='true'">
- <td bgcolor="#ffffff" height="1">
- <div class="wrapped-source">
- <code>
- <xsl:apply-templates />
- </code>
- </div>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td bgcolor="#ffffff" height="1"><pre>
- <xsl:value-of select="."/>
- </pre></td>
- </xsl:otherwise>
- </xsl:choose>
- <td bgcolor="{$source-color}" width="1">
- <img src="{$void}" alt="" width="1" height="1" vspace="0"
hspace="0" border="0"/>
- </td>
- </tr>
- <tr>
- <td bgcolor="{$source-color}" width="1" height="1">
- <img src="{$void}" alt="" width="1" height="1" vspace="0"
hspace="0" border="0"/>
- </td>
- <td bgcolor="{$source-color}" height="1">
- <img src="{$void}" alt="" width="1" height="1" vspace="0"
hspace="0" border="0"/>
- </td>
- <td bgcolor="{$source-color}" width="1" height="1">
- <img src="{$void}" alt="" width="1" height="1" vspace="0"
hspace="0" border="0"/>
- </td>
- </tr>
- </table>
- </div>
+ <div class="codeBox">
+ <pre>
+ <xsl:if test="@wrapped='true'">
+ <xsl:attribute name="class">wrap</xsl:attribute>
+ </xsl:if>
+ <code><xsl:apply-templates/></code>
+ </pre>
+ </div>
</xsl:template>
@@ -446,18 +378,18 @@
<!-- Process an attributes list with nested attribute elements -->
<xsl:template match="attributes">
- <table border="1" cellpadding="5">
+ <table class="defaultTable">
<tr>
- <th width="15%" bgcolor="{$attributes-color}">
- <font color="#ffffff">Attribute</font>
+ <th style="width: 15%;">
+ Attribute
</th>
- <th width="85%" bgcolor="{$attributes-color}">
- <font color="#ffffff">Description</font>
+ <th style="width: 85%;">
+ Description
</th>
</tr>
<xsl:for-each select="attribute">
<tr>
- <td align="left" valign="center">
+ <td>
<xsl:if test="@required = 'true'">
<strong><code class="attributeName"><xsl:value-of
select="@name"/></code></strong>
</xsl:if>
@@ -465,7 +397,7 @@
<code class="attributeName"><xsl:value-of select="@name"/></code>
</xsl:if>
</td>
- <td align="left" valign="center">
+ <td>
<xsl:apply-templates/>
</td>
</tr>
@@ -475,21 +407,21 @@
<!-- Process a properties list with nested property elements -->
<xsl:template match="properties">
- <table border="1" cellpadding="5">
+ <table class="defaultTable">
<tr>
- <th width="15%" bgcolor="{$attributes-color}">
- <font color="#ffffff">Property</font>
+ <th style="width: 15%;">
+ Property
</th>
- <th width="85%" bgcolor="{$attributes-color}">
- <font color="#ffffff">Description</font>
+ <th style="width: 85%;">
+ Description
</th>
</tr>
<xsl:for-each select="property">
<tr>
- <td align="left" valign="center">
+ <td>
<code class="propertyName"><xsl:value-of select="@name"/></code>
</td>
- <td align="left" valign="center">
+ <td>
<xsl:apply-templates/>
</td>
</tr>
@@ -497,115 +429,53 @@
</table>
</xsl:template>
- <!-- Fix relative links in printer friendly versions of the docs -->
- <xsl:template match="a">
- <xsl:variable name="href" select="@href"/>
- <xsl:choose>
- <xsl:when test="$standalone = 'standalone'">
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:when test="$project-menu != 'menu' and starts-with(@href,'../')">
- <a href="../{$href}"><xsl:apply-templates/></a>
- </xsl:when>
- <xsl:when test="$project-menu != 'menu' and starts-with(@href,'./') and
contains(substring(@href,3),'/')">
- <a href=".{$href}"><xsl:apply-templates/></a>
- </xsl:when>
- <xsl:when test="$project-menu != 'menu' and not(contains(@href,'//'))
and not(starts-with(@href,'/')) and not(starts-with(@href,'#')) and
contains(@href,'/')">
- <a href="../{$href}"><xsl:apply-templates/></a>
- </xsl:when>
- <xsl:when test="$href != ''">
- <a href="{$href}"><xsl:apply-templates/></a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="name" select="@name"/>
- <a name="{$name}"><xsl:apply-templates/></a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
<!-- Changelog related tags -->
<xsl:template match="changelog">
- <table border="0" cellpadding="2" cellspacing="2">
+ <ul class="changelog">
<xsl:apply-templates/>
- </table>
+ </ul>
</xsl:template>
<xsl:template match="changelog/add">
- <tr>
- <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/add.gif</xsl:variable>
- <td><img alt="add" class="icon" src="{$src}"/></td>
- <td><xsl:apply-templates/></td>
- </tr>
+ <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/add.gif</xsl:variable>
+ <li>
+ <img alt="Add: " class="icon" src="{$src}"/><xsl:apply-templates/>
+ </li>
</xsl:template>
<xsl:template match="changelog/update">
- <tr>
- <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/update.gif</xsl:variable>
- <td><img alt="update" class="icon" src="{$src}"/></td>
- <td><xsl:apply-templates/></td>
- </tr>
+ <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/update.gif</xsl:variable>
+ <li>
+ <img alt="Update: " class="icon" src="{$src}"/><xsl:apply-templates/>
+ </li>
</xsl:template>
<xsl:template match="changelog/design">
- <tr>
- <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/design.gif</xsl:variable>
- <td><img alt="design" class="icon" src="{$src}"/></td>
- <td><xsl:apply-templates/></td>
- </tr>
+ <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/design.gif</xsl:variable>
+ <li>
+ <img alt="Design: " class="icon" src="{$src}"/><xsl:apply-templates/>
+ </li>
</xsl:template>
<xsl:template match="changelog/docs">
- <tr>
- <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/docs.gif</xsl:variable>
- <td><img alt="docs" class="icon" src="{$src}"/></td>
- <td><xsl:apply-templates/></td>
- </tr>
+ <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/docs.gif</xsl:variable>
+ <li>
+ <img alt="Docs: " class="icon" src="{$src}"/><xsl:apply-templates/>
+ </li>
</xsl:template>
<xsl:template match="changelog/fix">
- <tr>
- <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/fix.gif</xsl:variable>
- <td><img alt="fix" class="icon" src="{$src}"/></td>
- <td><xsl:apply-templates/></td>
- </tr>
+ <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/fix.gif</xsl:variable>
+ <li>
+ <img alt="Fix: " class="icon" src="{$src}"/><xsl:apply-templates/>
+ </li>
</xsl:template>
<xsl:template match="changelog/scode">
- <tr>
- <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/code.gif</xsl:variable>
- <td><img alt="code" class="icon" src="{$src}"/></td>
- <td><xsl:apply-templates/></td>
- </tr>
- </xsl:template>
-
- <!-- Process an attributes list with nested attribute elements -->
- <xsl:template match="status">
- <table border="1" cellpadding="5">
- <tr>
- <th width="15%" bgcolor="{$attributes-color}">
- <font color="#ffffff">Priority</font>
- </th>
- <th width="50%" bgcolor="{$attributes-color}">
- <font color="#ffffff">Action Item</font>
- </th>
- <th width="25%" bgcolor="{$attributes-color}">
- <font color="#ffffff">Volunteers</font>
- </th>
- <xsl:for-each select="item">
- <tr>
- <td align="left" valign="center">
- <xsl:value-of select="@priority"/>
- </td>
- <td align="left" valign="center">
- <xsl:apply-templates/>
- </td>
- <td align="left" valign="center">
- <xsl:value-of select="@owner"/>
- </td>
- </tr>
- </xsl:for-each>
- </tr>
- </table>
+ <xsl:variable name="src"><xsl:value-of
select="$relative-path"/>/images/code.gif</xsl:variable>
+ <li>
+ <img alt="Code: " class="icon" src="{$src}"/><xsl:apply-templates/>
+ </li>
</xsl:template>
<!-- Link to a bug report -->
@@ -620,28 +490,6 @@
<a href="{$link}">r<xsl:apply-templates/></a>
</xsl:template>
- <!-- specially process td tags ala site.vsl -->
- <xsl:template match="table[@class='detail-table']/tr/td">
- <td bgcolor="{$table-td-bg}" valign="top" align="left">
- <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of
select="@colspan"/></xsl:attribute></xsl:if>
- <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of
select="@rowspan"/></xsl:attribute></xsl:if>
- <font color="#000000" size="-1" face="arial,helvetica,sanserif">
- <xsl:apply-templates/>
- </font>
- </td>
- </xsl:template>
-
- <!-- handle th ala site.vsl -->
- <xsl:template match="table[@class='detail-table']/tr/th">
- <td bgcolor="{$table-th-bg}" valign="top">
- <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of
select="@colspan"/></xsl:attribute></xsl:if>
- <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of
select="@rowspan"/></xsl:attribute></xsl:if>
- <font color="#000000" size="-1" face="arial,helvetica,sanserif">
- <xsl:apply-templates />
- </font>
- </td>
- </xsl:template>
-
<!-- Process everything else by just passing it through -->
<xsl:template match="*|@*">
<xsl:copy>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]