You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2003/01/08 15:04:03 UTC
cvs commit: jakarta-cactus/documentation/docs/skins/jakarta.apache.org/css apache.css
vmassol 2003/01/08 06:04:03
Modified: documentation build.xml
documentation/docs/xdocs changes.xml mailinglist.xml
features.xml
documentation/docs/skins/jakarta.apache.org/stylesheets
document2html.xsl
Added: documentation/docs/skins/jakarta.apache.org/images
remove.jpg logocactus.gif note.gif jakarta-logo.gif
add.jpg update.jpg fix.jpg
documentation/docs/xdocs sitemap.xml
documentation/docs/skins/jakarta.apache.org/css apache.css
Removed: documentation/docs/skins/jakarta.apache.org/resources
update.jpg add.jpg jakarta-logo.gif note.gif
remove.jpg fix.jpg logocactus.gif
Log:
- Improved XSL stylesheet. Now supports: sub-directories, automatic sitemap generation and dynamic menu items according to current page
Revision Changes Path
1.1 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/images/remove.jpg
<<Binary file>>
1.1 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/images/logocactus.gif
<<Binary file>>
1.1 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/images/note.gif
<<Binary file>>
1.1 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/images/jakarta-logo.gif
<<Binary file>>
1.1 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/images/add.jpg
<<Binary file>>
1.1 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/images/update.jpg
<<Binary file>>
1.1 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/images/fix.jpg
<<Binary file>>
1.22 +22 -13 jakarta-cactus/documentation/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/build.xml,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- build.xml 3 Jan 2003 19:28:51 -0000 1.21
+++ build.xml 8 Jan 2003 14:04:03 -0000 1.22
@@ -164,7 +164,8 @@
elapsed="15" executable="${cvs.executable}">
<fileset dir="${doc.xdoc.dir}">
- <exclude name="navigation.xml"/>
+ <exclude name="**/navigation.xml"/>
+ <exclude name="sitemap.xml"/>
<exclude name="todo.xml"/>
<exclude name="changes.xml"/>
<exclude name="**/cvslog.xml"/>
@@ -186,7 +187,12 @@
<!-- Copy the images -->
<copy todir="${target.doc.dir}/images" filtering="off">
<fileset dir="${doc.xdoc.dir}/images"/>
- <fileset dir="${doc.skin.dir}/jakarta.apache.org/resources"/>
+ <fileset dir="${doc.skin.dir}/jakarta.apache.org/images"/>
+ </copy>
+
+ <!-- Copy the css -->
+ <copy todir="${target.doc.dir}/css" filtering="on">
+ <fileset dir="${doc.skin.dir}/jakarta.apache.org/css"/>
</copy>
<!-- Copy the misc doc files needed by the web site -->
@@ -202,8 +208,10 @@
<style basedir="${target.xdoc.dir}" destdir="${target.doc.dir}"
style="${doc.skin.dir}/jakarta.apache.org/stylesheets/document2html.xsl">
- <include name="*.xml"/>
- <exclude name="navigation.xml"/>
+ <include name="**/*.xml"/>
+ <!--include name="**/build_result.xml"/>
+ <include name="**/howto_testcase.xml"/-->
+ <exclude name="**/navigation.xml"/>
<param name="software" expression="Cactus"/>
<param name="title" expression="Cactus Documentation"/>
@@ -212,15 +220,16 @@
<param name="project.other.version" expression="${project.other.version}"/>
<param name="last.updated.date" expression="${TODAY}"/>
- <!--Location of the navigation.xml file relative to where the
- stylesheet is located. Note: this path MUST be relative as it
- is used as a relative URI from within the stylesheet -->
- <param name="navfile" expression="../../../../../${target.xdoc.dir}/navigation.xml"/>
-
- <!-- Location of the cvslog.xml file relative to where the
- stylesheet is located. Note: this path MUST be relative as it
- is used as a realtive URI from within the stylesheet -->
- <param name="cvslogfile" expression="../../../../../${target.xdoc.dir}/cvslog/cvslog.xml"/>
+ <!-- Location of the xdoc directory relative to where the
+ stylesheet is located. Note: this path MUST be relative as it
+ is used as a relative URI from within the stylesheet -->
+ <param name="xdocdir" expression="../../../../../${target.xdoc.dir}"/>
+
+ <!-- Location of the sitemap.xml file relative to xdocdir -->
+ <param name="sitefile" expression="sitemap.xml"/>
+
+ <!-- Location of the cvslog.xml file relative to xdocdir -->
+ <param name="cvslogfile" expression="cvslog/cvslog.xml"/>
</style>
1.70 +7 -0 jakarta-cactus/documentation/docs/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/changes.xml,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- changes.xml 3 Jan 2003 14:12:13 -0000 1.69
+++ changes.xml 8 Jan 2003 14:04:03 -0000 1.70
@@ -57,6 +57,13 @@
</devs>
<release version="1.5" date="- in CVS">
+ <action dev="VMA" type="update">
+ Modified the build process to generate the Cactus web site by
+ removing the use of Stylebook and replacing it with an XSL
+ stylesheet. In addition, added several new features: support for
+ subdirectories, support for dynamic menu items and sitemap
+ generation.
+ </action>
<action dev="JRU" type="add">
First release of the Eclipse plugin. See the
<link href="eclipse_plugin.html">Eclipse Plugin documentation</link>
1.3 +0 -16 jakarta-cactus/documentation/docs/xdocs/mailinglist.xml
Index: mailinglist.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/mailinglist.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mailinglist.xml 3 Jan 2003 13:41:01 -0000 1.2
+++ mailinglist.xml 8 Jan 2003 14:04:03 -0000 1.3
@@ -51,22 +51,6 @@
<note>
The same applies for the dev mailing list; replace "user" by "dev".
</note>
- <note>
- The creation of the Cactus dev mailing-list happened on the
- 15th of September 2001. Pior to that date dev messages were posted
- to the cactus-user mailing-list (and even for some time after that
- date!).
- </note>
- <note>
- The creation of the Cactus user mailing list happened on the
- 5th of July 2001. Prior to that date all messages were posted on the
- <code>jakarta-commons</code> mailing list (and even for some time
- after that date!). You can check the archives of
- <code>jakarta-commons</code>
- <link href="http://www.mail-archive.com/jakarta-commons%40jakarta.apache.org/">
- here</link>.
- </note>
-
</s1>
</body>
1.9 +7 -4 jakarta-cactus/documentation/docs/xdocs/features.xml
Index: features.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/features.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- features.xml 3 Jan 2003 13:41:01 -0000 1.8
+++ features.xml 8 Jan 2003 14:04:03 -0000 1.9
@@ -56,7 +56,7 @@
Cactus provides a good middle ground in term of test granularity :
too fine-grained tests are hard to write (like mock objects tests
that completely simulates the domain objects and focus exclusively
- on unit testing your logic code) and need complementary tests. Too
+ on unit testing your code logic) and need complementary tests. Too
coarse-grained tests (like functional tests) are not enough to
easily uncover bugs and work in a iterative development process
where tests are run very often to ensure everything is working. We
@@ -120,7 +120,7 @@
Whether an HTTP Session will be created or not on the server side,
</li>
<li>
- BASIC Authentication parameters,
+ BASIC and Form-based Authentication parameters,
</li>
<li>
Send any data as POST data
@@ -189,6 +189,9 @@
<li>
Enhydra 3.1 (Servlet API 2.2)
</li>
+ <li>
+ JBoss/Jetty 3.x (Servlet API 2.3)
+ </li>
</ul>
</li>
<li>
@@ -230,8 +233,8 @@
</link> for HTTP connections.
</li>
<li>
- Support for BASIC authentication. You can test code that uses the
- Servlet security API (see the
+ Support for BASIC and Form-based authentication methods. You can test
+ code that uses the Servlet security API (see the
<link href="howto_security.html">Security Howto</link>).
</li>
<li>
1.1 jakarta-cactus/documentation/docs/xdocs/sitemap.xml
Index: sitemap.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Site Map</title>
<authors>
<author name="Vincent Massol" email="vmassol@apache.org"/>
</authors>
</properties>
<body>
<sitemap>
<page id="index" source="index.xml" name="What is Cactus?">
Describes what is the Cactus framework, defines several types of
unit tests and explains what are those best achieved with Cactus.
</page>
<page id="news" source="news.xml"/>
<page id="changes" source="changes.xml"/>
<page id="features" source="features.xml"/>
<page id="goals" source="goals.xml"/>
<page id="todo" source="todo.xml"/>
<page id="contributors" source="contributors.xml"/>
<page id="contributing" source="contributing.xml"/>
<page id="users" source="users.xml"/>
<page id="testedon" source="testedon.xml"/>
<page id="license" source="license.xml"/>
<page id="downloads" source="downloads.xml"/>
<page id="how_it_works" source="how_it_works.xml"/>
<page id="how_it_works_uml" source="how_it_works_uml.xml"/>
<page id="getting_started" source="getting_started.xml"/>
<page id="mockobjects" source="mockobjects.xml"/>
<page id="javadoc" source="javadoc.xml"/>
<page id="javadoc_12" source="javadoc_12.xml"/>
<page id="javadoc_13" source="javadoc_13.xml"/>
<page id="faq" source="faq.xml"/>
<page id="eclipse_plugin" source="eclipse_plugin.xml"/>
<page id="howto_classpath" source="howto_classpath.xml"/>
<page id="howto_config" source="howto_config.xml"/>
<page id="howto_migration" source="howto_migration.xml"/>
<page id="howto_testcase" source="howto_testcase.xml"/>
<page id="howto_testcase_servlet" source="howto_testcase_servlet.xml"/>
<page id="howto_testcase_jsp" source="howto_testcase_jsp.xml"/>
<page id="howto_testcase_filter" source="howto_testcase_filter.xml"/>
<page id="howto_jsp" source="howto_jsp.xml"/>
<page id="howto_runner" source="howto_runner.xml"/>
<page id="howto_security" source="howto_security.xml"/>
<page id="howto_ant" source="howto_ant.xml"/>
<page id="howto_ant_cactus" source="howto_ant_cactus.xml"/>
<page id="howto_ant_install" source="howto_ant_install.xml"/>
<page id="howto_ant_primter" source="howto_ant_primer.xml"/>
<page id="howto_httpunit" source="howto_httpunit.xml"/>
<page id="howto_sample" source="howto_sample.xml"/>
<page id="howto_ejb" source="howto_ejb.xml"/>
<page id="howto_ejb_j2eeri" source="howto_ejb_j2eeri.xml"/>
<page id="howto_ide" source="howto_ide.xml"/>
<page id="howto_ide_vajava_wte" source="howto_ide_vajava_wte.xml"/>
<page id="howto_ide_vajava_tomcat" source="howto_ide_vajava_tomcat.xml"/>
<page id="howto_ide_jbuilder4" source="howto_ide_jbuilder4.xml"/>
<page id="howto_ide_jbuilder5" source="howto_ide_jbuilder5.xml"/>
<page id="howto_tomcat" source="howto_tomcat.xml"/>
<page id="howto_junitee" source="howto_junitee.xml"/>
<page id="mailinglist" source="mailinglist.xml"/>
<page id="cactusname" source="cactusname.xml"/>
<page id="logos" source="logos.xml"/>
<page id="resources" source="resources.xml"/>
<page id="coverage" source="coverage.xml"/>
<page id="coverage_12" source="coverage_12.xml"/>
<page id="coverage_13" source="coverage_13.xml"/>
<page id="coverage_empty" source="coverage_empty.xml"/>
<page id="webalizer" source="webalizer.xml"/>
<page id="coding_conventions" source="coding_conventions.xml"/>
<page id="build_result" source="build_result.xml"/>
<page id="release_checklist" source="release_checklist.xml"/>
<page id="howto_build" source="howto_build.xml"/>
<page id="bug_database" type="external"
href="http://jakarta.apache.org/site/bugs.html"/>
<page id="stats" type="external"
href="http://jakarta.apache.org/cactus/stats/index.html"/>
<page id="cvs" type="external"
href="http://jakarta.apache.org/site/cvsindex.html"/>
<page id="korean" type="external"
href="http://jakarta.apache-korea.org/cactus/index.html"/>
<page id="japanese" type="external"
href="http://www.ingrid.org/jajakarta/cactus/"/>
</sitemap>
</body>
</document>
1.11 +287 -58 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/document2html.xsl
Index: document2html.xsl
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/document2html.xsl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- document2html.xsl 3 Jan 2003 19:28:52 -0000 1.10
+++ document2html.xsl 8 Jan 2003 14:04:03 -0000 1.11
@@ -6,14 +6,8 @@
<!-- ====================================================================== -->
<!-- TODOS:
- - remove all color references and expose them as variables. Second
- step is to use CSS
- - handle xdocs located in sub-directories (issue is with the
- relative path to the images). Solution: add "url" attribute to
- the <document> tag.
- - add an XSL param that is the absolute path
- from this stylesheet to the xdoc root. This is to compute the
- location of per-directory navigation.xml files
+ - finish removing all style references and put them in the CSS. Only use
+ CSS features that are standard across browsers (it is possible?). VMA
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
@@ -22,9 +16,14 @@
<xsl:param name="title" select="''"/>
<xsl:param name="copyright" select="''"/>
- <!-- Location of the navigation.xml file, which describes the web site meta
- data such as the menu items, etc -->
- <xsl:param name="navfile" select="''"/>
+ <!-- Location of the xdoc directory relative to where this stylesheet is
+ located. Note: this path MUST be relative as it is used as a relative
+ URI from within this stylesheet -->
+ <xsl:param name="xdocdir" select="''"/>
+
+ <!-- Location of the sitemap.xml file, which describes the web site
+ resources -->
+ <xsl:param name="sitefile" select="''"/>
<!-- Location of the cvslog.xml file which contains the CVS changelog
items for the last 15 days web site changes -->
@@ -45,9 +44,8 @@
<!-- Output method -->
<xsl:output method="html" indent="no"/>
-
+
<!-- Defined variables -->
- <xsl:variable name="body-bg" select="'#ffffff'"/>
<xsl:variable name="body-fg" select="'#000000'"/>
<xsl:variable name="body-link" select="'#023264'"/>
<xsl:variable name="banner-bg" select="'#023264'"/>
@@ -56,7 +54,19 @@
<!-- Read the menu definitions. They are located in a file named
navigation.xml placed at the same level as the xdoc files.
The path we specify is relative to where this stylesheet is located -->
- <xsl:variable name="navigation" select="document($navfile)/navigation"/>
+ <!--xsl:variable name="navigation"
+ select="document(concat($xdocdir,'/',$navfile))/navigation"/-->
+
+ <!-- Read the resource definitions. They are located in a file named
+ sitemap.xml placed at the same level as the xdoc files.
+ The path we specify is relative to where this stylesheet is located -->
+ <xsl:variable name="sitemap"
+ select="document(concat($xdocdir,'/',$sitefile))/document/body/sitemap"/>
+
+ <!-- The current document being processed. Note: This is needed for the
+ "get-base-directory" template as it can be called with another
+ document context (the $navigation one) -->
+ <xsl:variable name="document" select="/document"/>
<!-- ==================================================================== -->
<!-- Document section -->
@@ -68,6 +78,14 @@
<head>
+ <!-- CSS imports -->
+ <link rel="stylesheet" type="text/css">
+ <xsl:attribute name="href">
+ <xsl:call-template name="get-base-directory"/>
+ <xsl:text>css/apache.css</xsl:text>
+ </xsl:attribute>
+ </link>
+
<!-- Add the authors as a meta tag -->
<meta name="author">
<xsl:attribute name="content">
@@ -83,8 +101,7 @@
</head>
- <body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}"
- alink="{$body-link}" vlink="{$body-link}">
+ <body>
<!-- ============================================================== -->
<!-- Top level header -->
@@ -97,7 +114,7 @@
<td valign="top" align="left">
<a href="http://jakarta.apache.org/">
<img hspace="0" vspace="0" border="0">
- <xsl:attribute name="src">images/jakarta-logo.gif</xsl:attribute>
+ <xsl:attribute name="src"><xsl:call-template name="get-base-directory"/>images/jakarta-logo.gif</xsl:attribute>
</img>
</a>
</td>
@@ -108,7 +125,7 @@
<xsl:attribute name="alt">
<xsl:call-template name="get-title"/>
</xsl:attribute>
- <xsl:attribute name="src">images/logocactus.gif</xsl:attribute>
+ <xsl:attribute name="src"><xsl:call-template name="get-base-directory"/>images/logocactus.gif</xsl:attribute>
</img>
</a>
</td>
@@ -142,6 +159,7 @@
<xsl:text> | </xsl:text>
<a>
<xsl:attribute name="href">
+ <xsl:call-template name="get-base-directory"/>
<xsl:choose>
<xsl:when test="contains($project.version,'dev')">
<xsl:text>..</xsl:text>
@@ -162,7 +180,7 @@
<br/>
<font face="arial,helvetica,sanserif">
- <xsl:apply-templates select="$navigation"/>
+ <xsl:call-template name="apply-navigation"/>
</font>
</td>
@@ -216,28 +234,51 @@
<!-- Menu elements: "menu/menu-item/separator" elements -->
<!-- ==================================================================== -->
- <xsl:template match="menu/item">
+ <xsl:template match="menu//item">
+
+ <xsl:variable name="curid" select="@id"/>
+ <xsl:variable name="cursite" select="$sitemap//page[@id=$curid]"/>
+
+ <xsl:variable name="level" select="count(ancestor::item)+1"/>
<xsl:choose>
- <xsl:when test="@type='external'">
- <li>
- <font size="-1">
- <a href="{@href}" target="{@id}"><xsl:value-of select="@label"/></a>
+ <xsl:when test="$cursite/@type='external'">
+ <div id="menu">
+ <font size="-{$level}">
+ <a href="{$cursite/@href}" target="{@id}">
+ <xsl:value-of select="@label"/>
+ </a>
</font>
- </li>
+ <xsl:apply-templates/>
+ </div>
</xsl:when>
- <xsl:when test="not(@type) or @type!='hidden'">
- <li>
+ <xsl:when test="not($cursite/@type) or $cursite/@type!='hidden'">
+ <div id="menu">
<a>
- <xsl:attribute name="href"><xsl:value-of
- select="substring(@source,0,string-length(@source)-3)"/>.html</xsl:attribute>
- <font size="-1"><xsl:value-of select="@label"/></font>
- </a>
- </li>
+ <xsl:attribute name="href">
+ <xsl:call-template name="get-base-directory"/>
+ <xsl:value-of select="substring($cursite/@source,0,string-length($cursite/@source)-3)"/>
+ <xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <font size="-{$level}">
+ <!-- Use the label from the sitemap if none has been defined
+ in the navigation file -->
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$cursite/@name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </font>
+ <xsl:apply-templates/>
+ </a>
+ </div>
</xsl:when>
<xsl:otherwise><!-- hidden --></xsl:otherwise>
</xsl:choose>
-
+
</xsl:template>
<xsl:template match="separator">
@@ -250,7 +291,46 @@
<font size="+1" color="#000000"><xsl:value-of select="@label"/></font>
<br/>
<font size="-1"><xsl:apply-templates/></font>
- <br/>
+ </xsl:template>
+
+ <!-- ==================================================================== -->
+ <!-- Sitemap elements: "sitemap/page" elements -->
+ <!-- ==================================================================== -->
+ <xsl:template match="sitemap">
+
+ <!-- s1 -->
+ <xsl:call-template name="section">
+ <xsl:with-param name="width">100%</xsl:with-param>
+ <xsl:with-param name="font-size">+1</xsl:with-param>
+ <xsl:with-param name="name"><xsl:text>Site Map</xsl:text></xsl:with-param>
+ </xsl:call-template>
+
+ </xsl:template>
+
+ <xsl:template match="sitemap/page">
+ <xsl:if test="not(@type) or @type!='external'">
+ <li>
+ <!-- link -->
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="substring(@source,0,string-length(@source)-3)"/>
+ <xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="@name">
+ <xsl:value-of select="@name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@id"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:if test="text()">
+ <xsl:text>:</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:if>
+ </li>
+ </xsl:if>
</xsl:template>
<!-- ==================================================================== -->
@@ -367,13 +447,9 @@
<!-- ==================================================================== -->
<xsl:template match="source">
- <div align="center">
- <table border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td><pre><xsl:apply-templates/></pre></td>
- </tr>
- </table>
- </div>
+ <div id="source">
+ <pre><xsl:apply-templates/></pre>
+ </div>
</xsl:template>
<!-- ==================================================================== -->
@@ -415,8 +491,13 @@
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tr>
<td width="28" valign="top">
- <img src="images/note.gif" width="28" height="29" vspace="0"
- hspace="0" border="0" alt="Note"/>
+ <img width="28" height="29" vspace="0"
+ hspace="0" border="0" alt="Note">
+ <xsl:attribute name="src">
+ <xsl:call-template name="get-base-directory"/>
+ <xsl:text>images/note.gif</xsl:text>
+ </xsl:attribute>
+ </img>
</td>
<td valign="top">
<font size="-1" face="arial,helvetica,sanserif" color="{$body-fg}">
@@ -512,23 +593,42 @@
<p align="center">
<xsl:choose>
<xsl:when test="@width">
- <img src="{@src}" alt="{@alt}" width="{@width}" height="{@height}"
- border="0" vspace="4" hspace="4"/>
+ <img alt="{@alt}" width="{@width}" height="{@height}"
+ border="0" vspace="4" hspace="4">
+ <xsl:attribute name="src">
+ <xsl:call-template name="get-base-directory"/>
+ <xsl:value-of select="@src"/>
+ </xsl:attribute>
+ </img>
</xsl:when>
<xsl:otherwise>
- <img src="{@src}" alt="{@alt}" border="0" vspace="4" hspace="4"/>
+ <img alt="{@alt}" border="0" vspace="4" hspace="4">
+ <xsl:attribute name="src">
+ <xsl:call-template name="get-base-directory"/>
+ <xsl:value-of select="@src"/>
+ </xsl:attribute>
+ </img>
</xsl:otherwise>
</xsl:choose>
</p>
</xsl:template>
<xsl:template match="img">
- <img src="{@src}" alt="{@alt}" border="0" vspace="4" hspace="4"
- align="right"/>
+ <img alt="{@alt}" border="0" vspace="4" hspace="4" align="right">
+ <xsl:attribute name="src">
+ <xsl:call-template name="get-base-directory"/>
+ <xsl:value-of select="@src"/>
+ </xsl:attribute>
+ </img>
</xsl:template>
<xsl:template match="icon">
- <img src="{@src}" alt="{@alt}" border="0" align="absmiddle"/>
+ <img alt="{@alt}" border="0" align="absmiddle">
+ <xsl:attribute name="src">
+ <xsl:call-template name="get-base-directory"/>
+ <xsl:value-of select="@src"/>
+ </xsl:attribute>
+ </img>
</xsl:template>
<!-- ==================================================================== -->
@@ -536,19 +636,47 @@
<!-- ==================================================================== -->
<xsl:template match="a">
- <a href="{@href}"><xsl:apply-templates/></a>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:if test="substring(@href,0,5)!='http'">
+ <xsl:call-template name="get-base-directory"/>
+ </xsl:if>
+ <xsl:value-of select="@href"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
</xsl:template>
<xsl:template match="link">
- <a href="{@href}"><xsl:apply-templates/></a>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:if test="substring(@href,0,5)!='http'">
+ <xsl:call-template name="get-base-directory"/>
+ </xsl:if>
+ <xsl:value-of select="@href"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
</xsl:template>
<xsl:template match="jump">
- <a href="{@href}#{@anchor}"><xsl:apply-templates/></a>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="@href"/>
+ <xsl:text>#</xsl:text>
+ <xsl:value-of select="@anchor"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
</xsl:template>
<xsl:template match="fork">
- <a href="{@href}" target="_blank"><xsl:apply-templates/></a>
+ <a target="_blank">
+ <xsl:attribute name="href">
+ <xsl:value-of select="@href"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
</xsl:template>
<xsl:template match="anchor">
@@ -612,7 +740,14 @@
<xsl:template match="release/action">
<li>
<!-- icon -->
- <img src="images/{@type}.jpg" alt="{@type}" border="0" align="absmiddle"/>
+ <img alt="{@type}" border="0" align="absmiddle">
+ <xsl:attribute name="src">
+ <xsl:call-template name="get-base-directory"/>
+ <xsl:text>images/</xsl:text>
+ <xsl:value-of select="@type"/>
+ <xsl:text>.jpg</xsl:text>
+ </xsl:attribute>
+ </img>
<xsl:apply-templates/>
<xsl:text>(</xsl:text><xsl:value-of select="@dev"/><xsl:text>)</xsl:text>
@@ -652,7 +787,8 @@
<xsl:with-param name="name"><xsl:value-of select="@title"/></xsl:with-param>
</xsl:call-template>
- <xsl:variable name="cvslog" select="document($cvslogfile)/changelog"/>
+ <xsl:variable name="cvslog"
+ select="document(concat($xdocdir,'/',$cvslogfile))/changelog"/>
<xsl:choose>
<xsl:when test="$cvslog/entry">
@@ -686,9 +822,13 @@
<td bgcolor="#a0ddf0" colspan="{@colspan}" rowspan="{@rowspan}" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
<xsl:for-each select="file">
- <link href="{concat(substring-before(name, '.'),'.html')}">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="get-base-directory"/>
+ <xsl:value-of select="concat(substring-before(name, '.'),'.html')"/>
+ </xsl:attribute>
<xsl:value-of select="substring-before(name, '.')"/>
- </link>
+ </a>
<xsl:if test="position()!=last()">
<xsl:text>, </xsl:text>
</xsl:if>
@@ -781,6 +921,37 @@
</xsl:template>
<!-- ==================================================================== -->
+ <!-- Apply the navigation file -->
+ <!-- Note: The navigation.xml files must exist but can be left empty, i.e -->
+ <!-- containing only <navigation/>. In which case, the top level menu is -->
+ <!-- used. -->
+ <!-- ==================================================================== -->
+ <xsl:template name="apply-navigation">
+
+ <!-- Per directory navigation file -->
+ <xsl:variable name="basedir">
+ <xsl:call-template name="get-directory">
+ <xsl:with-param name="file">
+ <xsl:call-template name="get-source"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="perdirnav"
+ select="document(concat($xdocdir,'/',$basedir,'/navigation.xml'))/navigation"/>
+
+ <xsl:choose>
+ <xsl:when test="$perdirnav/menu">
+ <xsl:apply-templates select="$perdirnav"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates
+ select="document(concat($xdocdir,'/navigation.xml'))/navigation"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:template>
+
+ <!-- ==================================================================== -->
<!-- Return the document title -->
<!-- ==================================================================== -->
<xsl:template name="get-title">
@@ -791,6 +962,64 @@
<xsl:otherwise>
<xsl:value-of select="$title"/>
</xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- ==================================================================== -->
+ <!-- Extract directory -->
+ <!-- ==================================================================== -->
+
+ <xsl:template name="get-directory">
+ <xsl:param name="file"/>
+ <xsl:choose>
+ <xsl:when test="contains( $file, '/' )">
+ <xsl:variable name="dir" select="substring-before($file, '/')" />
+ <xsl:variable name="remainder" select="substring-after($file, '/')" />
+ <xsl:variable name="path">
+ <xsl:call-template name="get-directory">
+ <xsl:with-param name="file" select="$remainder"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="concat($dir,$path)"/>
+ </xsl:when>
+ <xsl:otherwise/>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- ==================================================================== -->
+ <!-- Get current processed file source path -->
+ <!-- ==================================================================== -->
+
+ <xsl:template name="get-source">
+ <xsl:variable name="curid" select="$document/@id"/>
+ <xsl:value-of select="$sitemap//page[@id=$curid]/@source"/>
+ </xsl:template>
+
+ <!-- ==================================================================== -->
+ <!-- Compute base directory -->
+ <!-- ==================================================================== -->
+
+ <xsl:template name="get-base-directory">
+ <xsl:call-template name="get-base-directory-internal">
+ <xsl:with-param name="file">
+ <xsl:call-template name="get-source"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="get-base-directory-internal">
+ <xsl:param name="file"/>
+ <xsl:choose>
+ <xsl:when test="contains( $file, '/' )">
+ <xsl:variable name="remainder" select="substring-after($file, '/')" />
+ <xsl:variable name="path">
+ <xsl:call-template name="get-base-directory-internal">
+ <xsl:with-param name="file" select="$remainder"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="concat('../',$path)"/>
+ </xsl:when>
+ <xsl:otherwise>./</xsl:otherwise>
</xsl:choose>
</xsl:template>
1.1 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/css/apache.css
Index: apache.css
===================================================================
body {
background: #fffff;
color: #00000;
}
a:link, a:visited {
color: #023264;
}
div#source {
background-color: #fff;
color: #000;
border-right: 1px solid #888;
border-left: 1px solid #888;
border-top: 1px solid #888;
border-bottom: 1px solid #888;
margin-right: 7px;
margin-left: 7px;
margin-top: 1em;
}
div#source pre {
margin-right: 7px;
margin-left: 7px;
}
div#menu {
margin-left: 7px;
margin-top: 3px;
margin-bottom: 3px;
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>