craigmcc 01/08/04 20:42:29 Modified: webapps/tomcat-docs build.xml index.xml project.xml webapps/tomcat-docs/appdev deployment.xml index.xml installation.xml introduction.xml processes.xml project.xml source.xml webapps/tomcat-docs/config index.xml project.xml Added: webapps/tomcat-docs tomcat-docs.xsl webapps/tomcat-docs/images jakarta-logo.gif Removed: webapps/tomcat-docs/appdev tomcat.gif Log: Update to a stylesheet that is (at present) local to the tomcat-docs web application sources, rather than being an external dependency on jakarta-site2. In addition, this stylesheet does *not* try to load the "project.xml" file itself (which caused lots of relative reference problems). Instead, each XML page includes an ENTITY declaration to define the project.xml file for that directory, and a "&project;" reference to load it. Update all existing pages to the new technology. Revision Changes Path 1.4 +9 -35 jakarta-tomcat-4.0/webapps/tomcat-docs/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- build.xml 2001/07/30 19:16:24 1.3 +++ build.xml 2001/08/05 03:42:28 1.4 @@ -18,16 +18,8 @@ <property name="site.xsl" value="../../../jakarta-site2/xdocs/stylesheets/site.xsl"/> - <!-- =================== BUILD: Initialization ========================== --> - <target name="build-init"> - <!-- Required only for the Ant Bugzilla #603 workaround --> - <tstamp/> - <property name="webapp.work" value="${java.io.tmpdir}/${webapp.name}${DSTAMP}${TSTAMP}"/> - </target> - - <!-- =================== BUILD: Create Directories ====================== --> - <target name="build-prepare" depends="build-init"> + <target name="build-prepare"> <mkdir dir="${webapps.build}"/> <mkdir dir="${webapps.build}/${webapp.name}"/> </target> @@ -91,54 +83,36 @@ <!-- ================= BUILD: XML-HTML Generation ======================= --> <target name="build-main" depends="build-static"> - <!-- Workaround for Ant 1.3 bug (Bugzilla #603) where the "style" - attribute is resolved relatively even if it is absolute! Copy - the source tree to a temporary directory, and interpolate the - XSLT stylesheet appropriately --> - <mkdir dir="${webapp.work}"/> - <copy todir="${webapp.work}"> - <fileset dir="."/> - <fileset dir="${site2.home}/xdocs/stylesheets" includes="site.xsl"/> - </copy> - <copy todir="${webapp.work}/appdev"> - <fileset dir="${site2.home}/xdocs/stylesheets" includes="site.xsl"/> - </copy> - <copy todir="${webapp.work}/config"> - <fileset dir="${site2.home}/xdocs/stylesheets" includes="site.xsl"/> - </copy> <!-- Top Level Directory --> - <style basedir="${webapp.work}" + <style basedir="." destdir="${webapps.build}/${webapp.name}" extension=".html" - style="site.xsl" + style="tomcat-docs.xsl" excludes="build.xml project.xml" includes="*.xml"> <param name="relative-path" expression="."/> </style> <!-- Application Developer's Guide --> - <style basedir="${webapp.work}/appdev" + <style basedir="appdev" destdir="${webapps.build}/${webapp.name}/appdev" extension=".html" - style="site.xsl" + style="../tomcat-docs.xsl" excludes="project.xml" includes="*.xml"> - <param name="relative-path" expression="."/> + <param name="relative-path" expression=".."/> </style> <!-- Server Configuration Reference --> - <style basedir="${webapp.work}/config" + <style basedir="config" destdir="${webapps.build}/${webapp.name}/config" extension=".html" - style="site.xsl" + style="../tomcat-docs.xsl" excludes="project.xml" includes="*.xml"> - <param name="relative-path" expression="."/> + <param name="relative-path" expression=".."/> </style> - - <!-- Remove the temporary directory for the Ant bug workaround --> - <delete dir="${webapp.work}" /> </target> 1.3 +5 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/index.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- index.xml 2001/07/30 19:16:24 1.2 +++ index.xml 2001/08/05 03:42:28 1.3 @@ -1,5 +1,10 @@ <?xml version="1.0"?> +<!DOCTYPE document [ + <!ENTITY project SYSTEM "project.xml"> +]> <document> + + &project; <properties> <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> 1.3 +11 -10 jakarta-tomcat-4.0/webapps/tomcat-docs/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/project.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- project.xml 2001/07/30 19:16:24 1.2 +++ project.xml 2001/08/05 03:42:28 1.3 @@ -4,7 +4,7 @@ <title>The Tomcat 4 Servlet/JSP Container</title> - <logo href="http://jakarta.apache.org/tomcat/images/tomcat.gif"> + <logo href="/images/tomcat.gif"> The Tomcat Servlet/JSP Container </logo> @@ -12,25 +12,26 @@ <body> <menu name="Getting Started"> - <item name="Docs Home" href="/index.html"/> - <item name="READ ME" href="/README.txt"/> - <item name="Install and Run" href="/RUNNING.txt"/> - <item name="Building from Source" href="/BUILDING.txt"/> + <item name="Docs Home" href="index.html"/> + <item name="READ ME" href="README.txt"/> + <item name="Install and Run" href="RUNNING.txt"/> + <item name="Building from Source" href="BUILDING.txt"/> </menu> <menu name="Administrators"> - <item name="Config. Reference" href="/config/index.html"/> + <item name="Config. Reference" href="config/index.html"/> </menu> <menu name="App Developers"> - <item name="App Developer Guide" href="/appdev/index.html"/> - <item name="Servlet/JSP Javadocs" href="/servletapi/index.html"/> + <item name="App Developer Guide" href="appdev/index.html"/> + <item name="Servlet/JSP Javadocs" href="servletapi/index.html"/> </menu> <menu name="Tomcat Developers"> - <item name="Catalina Javadocs" href="/catalina/docs/api/index.html"/> - <item name="Jasper Javadocs" href="/jasper/docs/api/index.html"/> + <item name="Catalina Javadocs" href="catalina/docs/api/index.html"/> + <item name="Jasper Javadocs" href="jasper/docs/api/index.html"/> </menu> </body> + </project> 1.1 jakarta-tomcat-4.0/webapps/tomcat-docs/tomcat-docs.xsl Index: tomcat-docs.xsl =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Content Stylesheet for "tomcat-docs" Documentation --> <!-- $Id: tomcat-docs.xsl,v 1.1 2001/08/05 03:42:28 craigmcc Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- Output method --> <xsl:output method="html" encoding="iso-8859-1" indent="no"/> <!-- Defined parameters (overrideable) --> <xsl:param name="home-name" select="'The Jakarta Project'"/> <xsl:param name="home-href" select="'http://jakarta.apache.org/'"/> <xsl:param name="home-logo" select="'/images/jakarta-logo.gif'"/> <xsl:param name="relative-path" select="'.'"/> <xsl:param name="void-image" select="'/images/void.gif'"/> <!-- 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'"/> <!-- Process an entire document into an HTML page --> <xsl:template match="document"> <html> <head> <title><xsl:value-of select="project/title"/> - <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" value="{$name}"/> <meta name="email" value="{$email}"/> </xsl:for-each> </head> <body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}" alink="{$body-link}" vlink="{$body-link}"> <table border="0" width="100%" cellspacing="4"> <xsl:comment>PAGE HEADER</xsl:comment> <tr><td colspan="2"> <xsl:comment>JAKARTA LOGO</xsl:comment> <xsl:variable name="alt"> <xsl:value-of select="$home-name"/> </xsl:variable> <xsl:variable name="href"> <xsl:value-of select="$home-href"/> </xsl:variable> <xsl:variable name="src"> <xsl:value-of select="$relative-path"/><xsl:value-of select="$home-logo"/> </xsl:variable> <a href="{$href}"> <img src="{$src}" align="left" alt="{$alt}" border="0"/> </a> <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="project/logo/@href"/> </xsl:variable> <xsl:comment>PROJECT LOGO</xsl:comment> <a href="{$home}"> <img src="{$src}" align="right" alt="{$alt}" border="0"/> </a> </xsl:if> </td></tr> <xsl:comment>HEADER SEPARATOR</xsl:comment> <tr> <td colspan="2"> <hr noshade="" size="1"/> </td> </tr> <tr> <xsl:comment>LEFT SIDE NAVIGATION</xsl:comment> <td width="20%" valign="top" nowrap="true"> <xsl:apply-templates select="project/body/menu"/> </td> <xsl:comment>RIGHT SIDE MAIN BODY</xsl:comment> <td width="80%" valign="top" align="left"> <xsl:apply-templates select="body/section"/> </td> </tr> <xsl:comment>FOOTER SEPARATOR</xsl:comment> <tr> <td colspan="2"> <hr noshade="" size="1"/> </td> </tr> <xsl:comment>PAGE FOOTER</xsl:comment> <tr><td colspan="2"> <div align="center"><font color="{$body-link}" size="-1"><em> Copyright © 1999-2001, Apache Software Foundation </em></font></div> </td></tr> </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> <ul> <xsl:apply-templates select="item"/> </ul> </xsl:template> <!-- Process a menu item for the navigation bar --> <xsl:template match="item"> <xsl:variable name="href"> <xsl:value-of select="@href"/> </xsl:variable> <li><a href="{$href}"><xsl:value-of select="@name"/></a></li> </xsl:template> <!-- Process a documentation section --> <xsl:template match="section"> <xsl:variable name="name"> <xsl:value-of select="@name"/> </xsl:variable> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <!-- Section heading --> <tr><td bgcolor="{$banner-bg}"> <font color="{$banner-fg}" face="arial,helvetica.sanserif"> <a name="{$name}"> <strong><xsl:value-of select="@name"/></strong></a></font> </td></tr> <!-- Section body --> <tr><td><blockquote> <xsl:apply-templates/> </blockquote></td></tr> </table> </xsl:template> <!-- Process a documentation subsection --> <xsl:template match="subsection"> <xsl:variable name="name"> <xsl:value-of select="@name"/> </xsl:variable> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <!-- Subsection heading --> <tr><td bgcolor="{$sub-banner-bg}"> <font color="{$sub-banner-fg}" face="arial,helvetica.sanserif"> <a name="{$name}"> <strong><xsl:value-of select="@name"/></strong></a></font> </td></tr> <!-- Subsection body --> <tr><td><blockquote> <xsl:apply-templates/> </blockquote></td></tr> </table> </xsl:template> <!-- 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}" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="{$source-color}" height="1"> <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="{$source-color}" width="1" height="1"> <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> </tr> <tr> <td bgcolor="{$source-color}" width="1"> <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="#ffffff" height="1"><pre> <xsl:value-of select="."/> </pre></td> <td bgcolor="{$source-color}" width="1"> <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> </tr> <tr> <td bgcolor="{$source-color}" width="1" height="1"> <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="{$source-color}" height="1"> <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="{$source-color}" width="1" height="1"> <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> </tr> </table> </div> </xsl:template> <!-- Process everything else by just passing it through --> <xsl:template match="*|@*"> <xsl:copy> <xsl:apply-templates select="@*|*|text()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 1.2 +5 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/deployment.xml Index: deployment.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/deployment.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- deployment.xml 2001/07/28 22:54:13 1.1 +++ deployment.xml 2001/08/05 03:42:28 1.2 @@ -1,5 +1,10 @@ <?xml version="1.0"?> +<!DOCTYPE document [ + <!ENTITY project SYSTEM "project.xml"> +]> <document> + + &project; <properties> <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> 1.2 +5 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- index.xml 2001/07/28 22:54:13 1.1 +++ index.xml 2001/08/05 03:42:28 1.2 @@ -1,5 +1,10 @@ <?xml version="1.0"?> +<!DOCTYPE document [ + <!ENTITY project SYSTEM "project.xml"> +]> <document> + + &project; <properties> <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> 1.2 +5 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/installation.xml Index: installation.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/installation.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- installation.xml 2001/07/28 22:54:13 1.1 +++ installation.xml 2001/08/05 03:42:28 1.2 @@ -1,5 +1,10 @@ <?xml version="1.0"?> +<!DOCTYPE document [ + <!ENTITY project SYSTEM "project.xml"> +]> <document> + + &project; <properties> <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> 1.2 +5 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/introduction.xml Index: introduction.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/introduction.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- introduction.xml 2001/07/28 22:54:13 1.1 +++ introduction.xml 2001/08/05 03:42:28 1.2 @@ -1,5 +1,10 @@ <?xml version="1.0"?> +<!DOCTYPE document [ + <!ENTITY project SYSTEM "project.xml"> +]> <document> + + &project; <properties> <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> 1.2 +5 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/processes.xml Index: processes.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/processes.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- processes.xml 2001/07/28 22:54:13 1.1 +++ processes.xml 2001/08/05 03:42:28 1.2 @@ -1,5 +1,10 @@ <?xml version="1.0"?> +<!DOCTYPE document [ + <!ENTITY project SYSTEM "project.xml"> +]> <document> + + &project; <properties> <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> 1.2 +9 -9 jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/project.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- project.xml 2001/07/28 22:54:13 1.1 +++ project.xml 2001/08/05 03:42:28 1.2 @@ -4,7 +4,7 @@ <title>Application Developer's Guide</title> - <logo href="http://jakarta.apache.org/tomcat/images/tomcat.gif"> + <logo href="/images/tomcat.gif"> The Tomcat Servlet/JSP Container </logo> @@ -12,17 +12,17 @@ <body> <menu name="Links"> - <item name="Docs Home" href="/.."/> + <item name="Docs Home" href="../index.html"/> </menu> <menu name="Contents"> - <item name="Contents" href="/index.html"/> - <item name="Introduction" href="/introduction.html"/> - <item name="Installation" href="/installation.html"/> - <item name="Deployment" href="/deployment.html"/> - <item name="Source Code" href="/source.html"/> - <item name="Processes" href="/processes.html"/> - <item name="Example App" href="/sample/"/> + <item name="Contents" href="index.html"/> + <item name="Introduction" href="introduction.html"/> + <item name="Installation" href="installation.html"/> + <item name="Deployment" href="deployment.html"/> + <item name="Source Code" href="source.html"/> + <item name="Processes" href="processes.html"/> + <item name="Example App" href="sample/"/> </menu> </body> 1.2 +5 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/source.xml Index: source.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/source.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- source.xml 2001/07/28 22:54:13 1.1 +++ source.xml 2001/08/05 03:42:28 1.2 @@ -1,5 +1,10 @@ <?xml version="1.0"?> +<!DOCTYPE document [ + <!ENTITY project SYSTEM "project.xml"> +]> <document> + + &project; <properties> <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> 1.2 +5 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/config/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- index.xml 2001/07/30 19:16:25 1.1 +++ index.xml 2001/08/05 03:42:28 1.2 @@ -1,5 +1,10 @@ <?xml version="1.0"?> +<!DOCTYPE document [ + <!ENTITY project SYSTEM "project.xml"> +]> <document> + + &project; <properties> <author email="[EMAIL PROTECTED]">Craig R. McClanahan</author> 1.2 +23 -22 jakarta-tomcat-4.0/webapps/tomcat-docs/config/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/project.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- project.xml 2001/07/30 19:16:25 1.1 +++ project.xml 2001/08/05 03:42:28 1.2 @@ -2,45 +2,46 @@ <project name="Server Configuration Reference" href="http://jakarta.apache.org/tomcat/"> - <title>Server Configuration Reference</title> + <title>Server Configuration Reference</title> - <logo href="http://jakarta.apache.org/tomcat/images/tomcat.gif"> - The Tomcat Servlet/JSP Container - </logo> + <logo href="/images/tomcat.gif"> + The Tomcat Servlet/JSP Container + </logo> - <body> + <body> <menu name="Links"> - <item name="Docs Home" href="/.."/> - <item name="Config Reference" href="/index.html"/> + <item name="Docs Home" href="../index.html"/> + <item name="Config Ref. Home" href="index.html"/> </menu> <menu name="Top Level Elements"> - <item name="Server" href="/server.html"/> - <item name="Service" href="/service.html"/> + <item name="Server" href="server.html"/> + <item name="Service" href="service.html"/> </menu> <menu name="Connectors"> - <item name="HTTP/1.1" href="/http11.html"/> - <item name="Warp" href="/warp.html"/> + <item name="HTTP/1.1" href="http11.html"/> + <item name="Warp" href="warp.html"/> </menu> <menu name="Containers"> - <item name="Context" href="/context.html"/> - <item name="Engine" href="/engine.html"/> - <item name="Host" href="/host.html"/> + <item name="Context" href="context.html"/> + <item name="Engine" href="engine.html"/> + <item name="Host" href="host.html"/> </menu> <menu name="Nested Elements"> - <item name="Default Context" href="/defaultcontext.html"/> - <item name="Loader" href="/loader.html"/> - <item name="Logger" href="/logger.html"/> - <item name="Manager" href="/manager.html"/> - <item name="Realm" href="/realm.htlm"/> - <item name="Resources" href="/resources.html"/> - <item name="Valve" href="/valve.html"/> + <item name="Default Context" href="defaultcontext.html"/> + <item name="Loader" href="loader.html"/> + <item name="Logger" href="logger.html"/> + <item name="Manager" href="manager.html"/> + <item name="Realm" href="realm.htlm"/> + <item name="Resources" href="resources.html"/> + <item name="Valve" href="valve.html"/> </menu> - </body> + </body> + </project> 1.1 jakarta-tomcat-4.0/webapps/tomcat-docs/images/jakarta-logo.gif <<Binary file>>