hammant 2003/03/16 13:12:35
Modified: demo build.xml
demo/src/xdocs demo-altrmi-helloworld.xml
demo-helloworld.xml demo-lifecycle.xml index.xml
Added: demo/src/xdocs/css ns4_only.css print.css site.css
tigris.css
demo/src/xdocs/images header.gif
demo/src/xdocs/stylesheets changes.vsl docs.vsl project.xml
templates.vm velocity.properties
Removed: demo/src/xdocs demo-soaphelloworld.xml
Log:
start of rework of Demo xdocs
Revision Changes Path
1.82 +84 -14 avalon-apps/demo/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/avalon-apps/demo/build.xml,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- build.xml 1 Mar 2003 16:32:52 -0000 1.81
+++ build.xml 16 Mar 2003 21:12:34 -0000 1.82
@@ -38,6 +38,7 @@
<property name="context.dir" value="../../avalon/src/documentation"/>
<property name="xdocs.dir" value="${src.dir}/xdocs"/>
<property name="tools.dir" location="../../avalon/tools"/>
+ <property name="docs.dir" value="${build.dir}/docs"/>
<property name="altrmi.ver" value="0.9.1"/>
@@ -51,14 +52,10 @@
</fileset>
</path>
+ <property name="avalon-site.dir" value="../../avalon-site"/>
+
<path id="tools.class.path">
- <path refid="project.class.path"/>
- <pathelement location="${xerces.jar}"/>
- <pathelement location="${xalan.jar}"/>
- <pathelement location="${tools.jar}"/>
- <fileset dir="${tools.dir}/lib">
- <exclude name="ant.jar"/>
- </fileset>
+ <fileset dir="${avalon-site.dir}/lib"/>
</path>
<taskdef name="sar" classname="org.apache.avalon.phoenix.tools.tasks.Sar">
@@ -505,9 +502,6 @@
DOCUMENTATION GENERATION
==========================================================================================
-->
- <!-- Creates all docs -->
- <target name="docs" depends="html-docs, javadocs" description="generates all
the documentation"/>
-
<!-- copy docs to site dir -->
<target name="site" depends="docs" description=" Places docs ready for hosting
on website">
<mkdir dir="../site/build/docs/apps/${dir-name}"/>
@@ -539,8 +533,84 @@
</javadoc>
</target>
- <target name="html-docs" description="generates the xdocs-based documentation">
- <!-- we call the build.xml target common to all of avalon-apps. This builds
our html site -->
- <ant antfile="${basedir}/../cocoonbuild.xml"/>
- </target>
+
+ <target name="anakia-avail">
+ <available classname="org.apache.velocity.anakia.AnakiaTask"
+ property="AnakiaTask.present">
+ <classpath refid="tools.class.path"/>
+ </available>
+ </target>
+
+ <target name="anakia-check" depends="anakia-avail" unless="AnakiaTask.present">
+ <echo>
+ AnakiaTask is not present! Please check to make sure that
+ velocity.jar is in your classpath. The easiest way to build
+ the documentation is to checkout avalon-site CVS and specify
+ avalon-site.dir property.
+
+ You can also run the build target import-avalon-site, to do
+ this automatically.
+ </echo>
+ </target>
+
+ <target name="docs" depends="anakia-check" description="Generate documentation
and website">
+ <taskdef name="anakia"
+ classname="org.apache.velocity.anakia.AnakiaTask">
+ <classpath refid="tools.class.path"/>
+ </taskdef>
+
+ <anakia basedir="${xdocs.dir}"
+ destdir="${docs.dir}"
+ style="docs.vsl"
+ projectfile="stylesheets/project.xml"
+ includes="**/*.xml"
+ excludes="stylesheets/**, changes.xml, announcement.xml"
+ velocitypropertiesfile="src/xdocs/stylesheets/velocity.properties"
+ />
+
+ <anakia basedir="${xdocs.dir}"
+ destdir="${docs.dir}"
+ style="changes.vsl"
+ projectfile="stylesheets/project.xml"
+ includes="changes.xml"
+ velocitypropertiesfile="${xdocs.dir}/stylesheets/velocity.properties"
+ />
+
+ <copy todir="${docs.dir}" filtering="off">
+ <fileset dir="${xdocs.dir}">
+ <include name="**/images/**"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ <include name="**/*.png"/>
+ <include name="**/*.css"/>
+ <include name="**/*.js"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Update the www directory -->
+ <target name="site-docs" depends="docs" description="Build docs for jakarta site">
+
+ <mkdir dir="${www.dir}"/>
+
+ <!-- delete all old documents but keep CVS directories -->
+ <!-- note that by doing an include the defaultexcludes (CVS dirs) will be kept
-->
+ <delete>
+ <fileset dir="${www.dir}">
+ <include name="**"/>
+ </fileset>
+ </delete>
+
+ <mkdir dir="${www.dir}"/>
+
+ <copy todir="${www.dir}">
+ <fileset dir="${docs.dir}" />
+ </copy>
+
+ <copy todir="${www.dir}/api">
+ <fileset dir="${build.javadocs}" />
+ </copy>
+
+ </target>
+
</project>
1.6 +20 -20 avalon-apps/demo/src/xdocs/demo-altrmi-helloworld.xml
Index: demo-altrmi-helloworld.xml
===================================================================
RCS file: /home/cvs/avalon-apps/demo/src/xdocs/demo-altrmi-helloworld.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- demo-altrmi-helloworld.xml 1 Mar 2003 16:32:53 -0000 1.5
+++ demo-altrmi-helloworld.xml 16 Mar 2003 21:12:34 -0000 1.6
@@ -3,26 +3,26 @@
<!DOCTYPE document SYSTEM "dtd/document-v10.dtd">
<document>
- <header>
+ <properties>
<title>Avalon Applications / AltRMI HelloWorld Demo</title>
<subtitle>The 'Hello World' Example Application</subtitle>
- <authors>
- <person name="Paul Hammant" email="[EMAIL PROTECTED]"/>
- </authors>
- </header>
+
+ <author email="[EMAIL PROTECTED]">Paul Hammant</author>
+
+ </properties>
<body>
- <s1 title="Introduction">
+ <section name="Introduction">
<p>
This demo reuses the Helloworld component, and retrofits remote capability.
It does this with the autopublisher tool from the Cornerstone project.
</p>
- </s1>
- <s1 title="Autopublishing">
+ </section>
+ <section name="Autopublishing">
<p>
The following shows how the HelloWorld demo block depends on
ConnectionManager from cornerstone. These
two blocks packaged as a server application (.SAR file) are loaded and
launched by Phoenix, itself sitting on top of Avalon's framework.
</p>
- </s1>
- <s1 title="Relevant source modules">
+ </section>
+ <section name="Relevant source modules">
<p>
The HelloWorld demo compiles as part of the build process for cornerstone.
The important modules that contribute to the demo are listed here. All are within the
src directory
</p>
@@ -37,15 +37,15 @@
<strong>conf\avalon-altrmidemo-config.xml</strong> This contains the
configuration for the resulting server archive (sar) file.
</li>
</ol>
- </s1>
- <s1 title="Java Source">
- <s2 title="AltrmiHelloWorldServerTester.java">
+ </section>
+ <section name="Java Source">
+ <section name="AltrmiHelloWorldServerTester.java">
<p>
This forms part of an executable jar that allows you to remotely change
the HelloWorld demo block.
</p>
- </s2>
- </s1>
- <s1 title="avalon-altrmidemo-assembly xml">
+ </section>
+ </section>
+ <section name="avalon-altrmidemo-assembly xml">
<p>
The file is renamed as part of the build process to assembly.xml, and only
has a separate name here to aid development. The bulk of the contents of the file
pertain to other blocks including the HelloWorld one. Here's the section that's for
autopublishing
</p>
@@ -70,8 +70,8 @@
<p>
Autopublisher needs an authenicator (the default), and a publisher
(SocketStreamPublisher).
</p>
- </s1>
- <s1 title="avalon-demo-config xml">
+ </section>
+ <section name="avalon-demo-config xml">
<p>
The file is renamed as part of the build process to config.xml, and only has
a separate name here to aid development. Again here is the pertinent section:
</p>
@@ -105,7 +105,7 @@
<p>
The autopublisher and publisher configuration are here.
</p>
- </s1>
+ </section>
</body>
<footer>
<legal>
1.8 +27 -27 avalon-apps/demo/src/xdocs/demo-helloworld.xml
Index: demo-helloworld.xml
===================================================================
RCS file: /home/cvs/avalon-apps/demo/src/xdocs/demo-helloworld.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- demo-helloworld.xml 27 Oct 2002 14:57:04 -0000 1.7
+++ demo-helloworld.xml 16 Mar 2003 21:12:34 -0000 1.8
@@ -3,26 +3,26 @@
<!DOCTYPE document SYSTEM "dtd/document-v10.dtd">
<document>
- <header>
+ <properties>
<title>Avalon Applications / HelloWorld Demo</title>
<subtitle>The 'Hello World' Example Application</subtitle>
- <authors>
- <person name="Paul Hammant" email="[EMAIL PROTECTED]"/>
- </authors>
- </header>
+
+ <author email="[EMAIL PROTECTED]">Paul Hammant</author>
+
+ </properties>
<body>
- <s1 title="Introduction">
+ <section name="Introduction">
<p>
The 'Hello World' demo server component is a socket listener app that
replies 'Hello World' to client applications that open the port. The reply is in HTML
form so can be viewed by a Browser. The HTTP headers are missing, but it still works.
Telnet is another client that can view the message.
</p>
- </s1>
- <s1 title="Architecture">
+ </section>
+ <section name="Architecture">
<p>
The following shows how the HelloWorld demo block depends on
ConnectionManager from cornerstone. These
two blocks packaged as a server application (.SAR file) are loaded and
launched by Phoenix, itself sitting on top of Avalon's framework.
</p>
- </s1>
- <s1 title="Relevant source modules">
+ </section>
+ <section name="Relevant source modules">
<p>
The HelloWorld demo compiles as part of the build process for avalon-apps
demo. The important modules that contribute to the demo are listed here. All are
within the src directory
</p>
@@ -37,25 +37,25 @@
<strong>conf\avalon-demo-config.xml</strong> This contains the
configuration for the resulting server archive (sar) file.
</li>
</ol>
- </s1>
- <s1 title="Java Source">
- <s2 title="HelloWorldHandler.java">
+ </section>
+ <section name="Java Source">
+ <section name="HelloWorldHandler.java">
<p>
Instantiated and dispatched by the impl once per socket request that
comes in.
</p>
- </s2>
- <s2 title="HelloWorldServer.java">
+ </section>
+ <section name="HelloWorldServer.java">
<p>
The interface that's the contract for the Server block. As it happens
HelloWorld is not that resusable. If it were "ObjectDataBase.java" many server apps
could use it through this interface. The interface could set more useful things that
the greeting ("Hello", "Bonjour" etc.)
</p>
- </s2>
- <s2 title="HelloWorldServerImpl.java">
+ </section>
+ <section name="HelloWorldServerImpl.java">
<p>
This like all impls implements an interface. Which interface is rather
obvious in this case. It's a standard pattern that uses other blocks (SocketManager
and ConnectionManager) to do the hard work of listening on a port, pooling threads and
connections and organizing socket invokations in a queue and multi app friendly way.
</p>
- </s2>
- </s1>
- <s1 title="avalon-demo-assembly xml">
+ </section>
+ </section>
+ <section name="avalon-demo-assembly xml">
<p>
The file is renamed as part of the build process to assembly.xml, and only
has a separate name here to aid development. The bulk of the contents of the file
pertain to other blocks including ones that HelloWorld is dependant upon. Here's the
section that's for HelloWorld
</p>
@@ -63,7 +63,7 @@
(text snipped)
<block
class="org.apache.avalon.apps.demos.helloworldserver.HelloWorldServerImpl"
name="helloworldserver" >
- <provide name="sockets2"
role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
+ <provide name="socketsection"
role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
<provide name="connections"
role="org.apache.avalon.cornerstone.services.connection.ConnectionManager" />
</block>
@@ -72,8 +72,8 @@
<p>
Of the block element, listed attributes are the instatiatable class
implementing the HelloWorld interface (not mentioned itself in this assembly xml), the
display name of the block, and two services that HelloWorld needs.
</p>
- </s1>
- <s1 title="avalon-altrmidemo-config xml">
+ </section>
+ <section name="avalon-altrmidemo-config xml">
<p>
The file is renamed as part of the build process to config.xml, and only has
a separate name here to aid development. Again here is the pertinent section:
</p>
@@ -94,15 +94,15 @@
<p>
If you had configuration for an app, you'd specify it here in with element
and attribute names that are invented for the application.
</p>
- </s1>
- <s1 title="Starting your own server project">
+ </section>
+ <section name="Starting your own server project">
<p>
Familiarity with Ant and it's build script would be a good place to start.
After learning how Cornerstone compiles and jars the demos would be a good second
step. Thirdly, as I've done before, take the demos out of Cornerstone, delete classes
and xml not relating to the HelloWorld server and rename from HelloWorld to whatever
suits you. I import into the lib dir avalon-cornerstone-compilation-0.x.jar to allow
things that use it to compile. I also import cornerstone-0.x.bar to the same place to
allow it's inclusion in the sar file being made. The build xml file even contains a
target that allow you to install the freshly made sar file into a nearby Avalon
installation - "build install", though for development you'll initially only be
running "build" and "build clean".
</p>
<p>
As a secondary process, it would be handy to learn xdocs (the technology
that allows the creation of these book pages). You're copying cornerstone to be
(after some selective trimming) the foundation stone for new server app, so you might
as well take adavantage of all it's templates.. "build xdocs" and look in build/docs.
All the Apache java based projects do this and then copy that to the website. The
project I'm involved with <link href="http://www.jesktop.org">Jesktop</link> does too.
</p>
- </s1>
+ </section>
</body>
<footer>
<legal>
1.2 +10 -10 avalon-apps/demo/src/xdocs/demo-lifecycle.xml
Index: demo-lifecycle.xml
===================================================================
RCS file: /home/cvs/avalon-apps/demo/src/xdocs/demo-lifecycle.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- demo-lifecycle.xml 27 Oct 2002 14:57:04 -0000 1.1
+++ demo-lifecycle.xml 16 Mar 2003 21:12:34 -0000 1.2
@@ -3,23 +3,23 @@
<!DOCTYPE document SYSTEM "dtd/document-v10.dtd">
<document>
- <header>
+ <properties>
<title>Avalon Applications / Lifecycle Demo</title>
<subtitle>The 'Lifecycle' Demo Application</subtitle>
- <authors>
- <person name="Paul Hammant" email="[EMAIL PROTECTED]"/>
- </authors>
- </header>
+
+ <author email="[EMAIL PROTECTED]">Paul Hammant</author>
+
+ </properties>
<body>
- <s1 title="Introduction">
+ <section name="Introduction">
<p>
The lifecycle demo shows only the calling of the lifecycle methods under
Phoenix control. This app has meaning when you consider the <link
href="http://jakarta.apache.org/avalon/framework/reference-the-lifecycle.html">lifecycle</link>
page.
</p>
<p>
Do not forget that the lifecycle methods are optional. You cann implement
all of them, as this demo does, some or none of them.
</p>
- </s1>
- <s1 title="Output">
+ </section>
+ <section name="Output">
<p>
This is the output that appears in the Console that Phoenix was called from:
</p>
@@ -48,7 +48,7 @@
LifecycleDemo2Impl.dispose() Called
LifecycleDemo1Impl.stop() called.
LifecycleDemo1Impl.dispose() Called </source>
- </s1>
+ </section>
</body>
<footer>
<legal>
1.5 +11 -13 avalon-apps/demo/src/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/avalon-apps/demo/src/xdocs/index.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- index.xml 27 Oct 2002 14:57:04 -0000 1.4
+++ index.xml 16 Mar 2003 21:12:34 -0000 1.5
@@ -1,26 +1,24 @@
<?xml version="1.0"?>
-<!DOCTYPE document SYSTEM "dtd/document-v10.dtd">
-
<document>
- <header>
+ <properties>
<title>Avalon Applications / Demo Overview</title>
<subtitle>Introduction</subtitle>
- <authors>
- <person name="Avalon Documentation Team" email="[EMAIL PROTECTED]"/>
- </authors>
- </header>
+
+ <author email="[EMAIL PROTECTED]">Avalon Documentation Team</author>
+
+ </properties>
<body>
- <s1 title="Introduction">
+ <section name="Introduction">
<p>
Demos are a few very simple demos for Phoenix. See the left margin of this
page.
</p>
- </s1>
+ </section>
</body>
- <footer>
+ <!--
<legal>
- Copyright (c) @year@ The Jakarta Apache Project All rights reserved.
+ Copyright (c) @year@ The Avalon Apache Project All rights reserved.
$Revision$ $Date$
</legal>
- </footer>
+ -->
</document>
1.1 avalon-apps/demo/src/xdocs/css/ns4_only.css
Index: ns4_only.css
===================================================================
/* simple rules suitable for Netscape 4.x only; richer rules are in tigris.css. see
<http://style.tigris.org/> */
/* colors, backgrounds, borders, link indication */
body {
background: #fff;
color: #000;
}
#leftcol a:link, #leftcol a:visited {
color: blue;
}
a:active, a:hover, #leftcol a:active, #leftcol a:hover {
color: #f30;
}
#login a:link, #login a:visited {
color: white;
text-decoration: underline;
}
#banner a:active, #banner a:hover {
color: #f90;
}
#leftcol a, #breadcrumbs a {
text-decoration: none;
}
h2 .lastchild {
color: #777
}
.a td {
background: #ddd;
}
.b td {
background: #efefef;
}
.tabs td, .tabs th {
background-color: #ddd;
}
body .app th {
background-color: #bbb;
}
body .tabs th {
background-color: #888;
color: #fff;
}
body .app .axial th {
background-color: #ddd;
color: black
}
.tabs td {
background-color: #ddd;
}
.alert {
color: #c00;
}
.confirm {
color: green;
}
.info {
color: blue;
}
.selection {
background: #ffc;
}
#login {
color: #fff;
}
#helptext th {
background: #cc9;
}
#helptext td {
background: #ffc;
}
.tabs a {
text-decoration: none;
}
#navcolumn div strong {
color: #555;
}
#banner, #banner td {
background: #036;
color: #fff;
}
body #banner #login a {
color: white;
}
/* font and text properties, exclusive of link indication, alignment, text-indent */
body, div, p, th, td, li, dl, dd {
font-family: Lucida, Arial, Helvetica, sans-serif;
}
code, pre {
font-family: 'Andale Mono', Courier, monospace;
}
h2, h3, h4 {
font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif;
}
.selection {
font-weight: bold
}
#login .username {
font-weight: bold;
}
/* box properties (exclusive of borders), positioning, alignments, list types,
text-indent */
th, td {
text-align: left;
vertical-align: top
}
.right {
text-align: right;
}
.center {
text-align: center;
}
body .app .axial th {
text-align: right;
}
.app .axial td th {
text-align: left;
}
body td .stb {
margin-top: 1em;
text-indent: 0;
}
body td .mtb {
margin-top: 2em;
text-indent: 0;
}
dd {
margin-bottom: .67em;
}
#footer {
margin: 4px
}
#helptext {
margin-top: 1em
}
#helptext td div {
margin: .5em
}
.courtesylinks {
margin-top: 1em;
padding-top: 1em
}
#navcolumn div {
margin-bottom: .5em;
}
#navcolumn div div {
margin-top: .3em
}
#navcolumn div div {
padding-left: 1em;
}
#banner, #banner td {
vertical-align: middle;
}
body.docs, body.nonav {
margin: 1em
}
1.1 avalon-apps/demo/src/xdocs/css/print.css
Index: print.css
===================================================================
#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks {
display: none;
}
body.docs div.docs {
margin: 0 !important;
border: none !important
}
1.1 avalon-apps/demo/src/xdocs/css/site.css
Index: site.css
===================================================================
div#banner {
border-top: 1px solid #fff;
border-bottom: 1px solid #aaa;
}
#banner, #banner td {
background: #fff;
color: #036;
}
#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;
}
#source pre {
margin-right: 7px;
margin-left: 7px;
}
1.1 avalon-apps/demo/src/xdocs/css/tigris.css
Index: tigris.css
===================================================================
/* contains rules unsuitable for Netscape 4.x; simpler rules are in ns4_only.css.
see <http://style.tigris.org/> */
/* colors, backgrounds, borders, link indication */
body {
background: #fff;
color: #000;
}
.app h3, .app h4, .tabs td, .tabs th, .functnbar {
background-image: url(../images/nw_min.gif);
background-repeat: no-repeat;
}
#navcolumn div div, body.docs #toc li li {
background-image: url(../images/strich.gif);
background-repeat: no-repeat;
background-position: .5em .5em;
}
#navcolumn div div.heading {
background-image: none;
}
.app h3, .app h4 {
color: #fff;
}
.app h3 {
background-color: #036;
}
.app h4 {
background-color: #888;
}
.a td {
background: #ddd;
}
.b td {
background: #efefef;
}
table, th, td {
border: none
}
.mtb {
border-top: solid 1px #ddd;
}
div.colbar {
background: #bbb;
}
#banner {
border-top: 1px solid #369;
border-bottom: 1px solid #003;
}
div#helptext th {
border-bottom: 1px solid #996;
border-right: 1px solid #996;
}
div#helptext td {
border-bottom: 1px solid #cc9;
border-right: 1px solid #cc9;
}
.tabs th {
border-right: 1px solid #333;
background-color: #ddd;
color: #fff;
}
.tabs td {
background-color: #999;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
}
.tabs {
border-bottom: 6px #ddd solid;
}
.tabs th, .tabs th a:link, .tabs th a:visited {
color: #555;
}
.tabs td, .tabs td a:link, .tabs td a:visited {
color: #fff;
}
.tabs a {
text-decoration: none;
}
#navcolumn {
background: #eee;
border-right: 1px solid #aaa;
border-bottom: 1px solid #aaa;
}
#breadcrumbs {
border-bottom: 1px solid #aaa;
background-color: #ddd
}
#navcolumn, #breadcrumbs {
border-top: 1px solid #fff;
}
#rightcol div.www, #rightcol div.help {
border: 1px solid #ddd;
}
div#navcolumn div.focus {
border-top: 1px solid #aaa;
border-left: 1px solid #aaa;
background-color: #fff;
}
body.docs div.docs {
background: #fff;
border-left: 1px solid #ddd;
border-top: 1px solid #ddd;
}
body.docs {
background: #eee url(../images/help_logo.gif) top right no-repeat !important;
}
.docs h3, .docs h4 {
border-top: solid 1px #000;
}
#alerterrormessage {
background: url(../images/icon_alert.gif) top left no-repeat !important;
}
.functnbar {
background-color: #aaa;
}
.functnbar2, .functnbar3 {
background: #aaa url(../images/sw_min.gif) no-repeat bottom left;
}
.functnbar3 {
background-color: #ddd;
}
.functnbar, .functnbar2, .functnbar3 {
color: #000;
}
.functnbar a, .functnbar2 a, .functnbar3 a {
color: #000;
text-decoration: underline;
}
#topmodule {
background: #ddd;
border-top: 1px solid #fff;
border-bottom: 1px solid #aaa;
border-right: 1px solid #aaa;
}
#topmodule #issueid {
border-right: 1px solid #aaa;
}
a:link, #navcolumn a:visited, .app a:visited, .tasknav a:visited {
color: blue;
}
a:link.selfref, a:visited.selfref {
color: #555 !important;
text-decoration: none;
}
a:active, a:hover, #leftcol a:active, #leftcol a:hover {
color: #f30 !important;
}
#login a:link, #login a:visited {
color: white;
text-decoration: underline;
}
#banner a:active, #banner a:hover {
color: #f90 !important;
}
#leftcol a, #breadcrumbs a {
text-decoration: none;
}
#apphead h2 em {
color: #777;
}
a:link.selfref, a:visited.selfref {
color: #555 !important;
text-decoration: none;
}
.app th {
background-color: #bbb;
}
.axial th {
background-color: #ddd;
color: black
}
.alert {
color: #c00;
}
.confirm {
color: green;
}
.info {
color: blue;
}
.selection {
background: #ffc;
}
#login {
color: #fff;
}
#helptext th {
background: #cc9;
}
#helptext td {
background: #ffc;
}
#navcolumn div strong {
color: #000;
}
#banner, #banner td {
background: #036;
color: #fff;
}
body #banner #login a {
color: #fff;
}
h4 a:link, h4 a:visited {
text-decoration: underline;
color: #fff;
}
/* font and text properties, exclusive of link indication, alignment, text-indent */
body, th, td, input, select, textarea, h2 small {
font-family: Verdana, Helvetica, Arial, sans-serif;
}
code, pre {
font-family: 'Andale Mono', Courier, monospace;
}
html body, body th, body td, textarea, h2 small, .app h3, .app h4, #rightcol h3,
#bodycol pre, #bodycol code {
font-size: x-small;
voice-family: "\"}\"";
voice-family: inherit;
font-size: small
}
html>body, html>body th, html>body td, html>body input, html>body select, html>body
textarea, html>body h2 small, html>body .app h3, html>body .app h4, html>body
#rightcol h3, html>body #bodycol pre, html>body #bodycol code {
font-size: small
}
small, div#footer td, div#login, div.tabs th, div.tabs td, input, select, .paginate,
.functnbar, .functnbar2, .functnbar3, #breadcrumbs td, .courtesylinks, #rightcol
div.help, .colbar, .tasknav, body.docs div#toc, #leftcol {
font-size: x-small;
voice-family: "\"}\"";
voice-family: inherit;
font-size: x-small
}
html>body small, html>body div#footer td, html>body div#login, html>body div.tabs
th, html>body div.tabs td, html>body input, html>body select, html>body .paginate,
html>body .functnbar, html>body .functnbar2, html>body .functnbar3, html>body
#breadcrumbs td, html>body .courtesylinks, html>body #rightcol div.help, html>body
.colbar, html>body .tasknav, html>body.docs #toc, html>body #leftcol {
font-size: x-small
}
#bodycol h2 {
font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif;
font-size: 1.5em;
font-weight: normal;
}
.tabs td, .tabs th, dt, .tasknav .selfref, #login .username, .selection {
font-weight: bold
}
h4 {
font-size: 1em;
}
#apphead h2 em {
font-style: normal;
}
/* box properties (exclusive of borders), positioning, alignments, list types,
text-indent */
#bodycol h2 {
margin-top: .3em;
margin-bottom: .5em;
}
p, ul, ol, dl {
margin-top: .67em;
margin-bottom: .67em;
}
h3, h4 {
margin-bottom: 0;
}
form {
margin-top: 0;
margin-bottom: 0;
}
#bodycol {
padding-left: 12px;
padding-right: 12px;
width: 100%;
voice-family: "\"}\"";
voice-family: inherit;
width: auto;
}
html>body #bodycol {
width: auto;
}
.docs {
line-height: 1.4;
}
.app h3, .app h4 {
padding: 5px;
margin-right: 2px;
margin-left: 2px;
}
.h3 p, .h4 p, .h3 dt, .h4 dt {
margin-right: 7px;
margin-left: 7px;
}
.tasknav {
margin-bottom: 1.33em
}
div.colbar {
padding: 3px;
margin: 2px 2px 0;
}
.tabs {
margin-top: .67em;
margin-right: 2px;
margin-left: 2px;
}
#leftcol {
padding-bottom: .5em;
}
#breadcrumbs td {
vertical-align: middle;
padding: 2px 8px;
}
.tabs td, .tabs th {
padding: 3px 9px;
}
#rightcol div.www, #rightcol div.help {
padding: 0 .5em
}
#navcolumn {
margin: -8px -8px 0 -8px;
padding: 4px;
}
#navcolumn div {
padding-left: 5px
}
div#navcolumn div div {
margin-top: .3em;
margin-bottom: .3em;
}
div#navcolumn div.focus {
margin-top: -.1em;
padding: .2em 4px;
}
body.docs #toc {
position: absolute;
top: 15px;
left: 0px;
width: 120px;
padding: 0 20px 0 0
}
body.docs #toc ul, #toc ol {
margin-left: 0;
padding-left: 0;
}
body.docs #toc li {
margin-top: 7px;
padding-left: 10px;
list-style-type: none;
}
body.docs div.docs {
margin: 61px 0 0 150px;
padding: 1em 2em 1em 1em !important;
}
.docs p+p {
text-indent: 5%;
margin-top: -.67em
}
.docs h3, .docs h4 {
margin-bottom: .1em;
padding-top: .3em;
}
#alerterrormessage {
padding-left: 100px;
}
.functnbar, .functnbar2, .functnbar3 {
padding: 5px;
margin: .67em 2px;
}
#topmodule td {
vertical-align: middle;
padding: 2px 8px
}
body {
padding: 1em;
}
body.composite, body.docs {
margin: 0;
padding: 0;
}
th, td {
text-align: left;
vertical-align: top
}
.right {
text-align: right !important;
}
.center {
text-align: center !important;
}
.axial th {
text-align: right;
}
.app .axial td th {
text-align: left;
}
body td .stb {
margin-top: 1em;
text-indent: 0;
}
body td .mtb {
margin-top: 2em;
text-indent: 0;
}
dd {
margin-bottom: .67em;
}
#footer {
margin: 4px
}
#helptext {
margin-top: 1em
}
#helptext td div {
margin: .5em
}
.courtesylinks {
margin-top: 1em;
padding-top: 1em
}
#navcolumn div {
margin-bottom: .5em;
}
#navcolumn div div {
margin-top: .3em
}
#navcolumn div div {
padding-left: 1em;
}
#banner, #banner td {
vertical-align: middle;
}
1.1 avalon-apps/demo/src/xdocs/images/header.gif
<<Binary file>>
1.1 avalon-apps/demo/src/xdocs/stylesheets/changes.vsl
Index: changes.vsl
===================================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
#parse( "templates.vm" )
<!-- Content Stylesheet for Site -->
## Defined variables
#set ($bodybg = "#ffffff")
#set ($bodyfg = "#000000")
#set ($bodylink = "#525D76")
#set ($bannerbg = "#525D76")
#set ($bannerfg = "#ffffff")
#set ($subbannerbg = "#828DA6")
#set ($subbannerfg = "#ffffff")
#set ($tablethbg = "#039acc")
#set ($tabletdbg = "#a0ddf0")
#set ($pound = "#" )
<!-- start the processing -->
#changes()
<!-- end the processing -->
#macro (change $action)
<p>$action.getText() ($action.getAttributeValue("dev"))</p>
#end
#macro (changeset $release)
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="$subbannerbg">
<font color="$subbannerfg" face="arial,helvetica,sanserif">
<strong>
Revision $release.getAttributeValue("version")
($release.getAttributeValue("date"))
</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
<ul>
#foreach ($action in $release.getChildren("action"))
<li>#change ($action)</li>
#end
</ul>
</blockquote>
</td></tr>
</table>
</a>
#end
#macro (changes)
#header
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="$bannerbg">
<font color="$bannerfg" face="arial,helvetica,sanserif">
<strong>ChangeLog</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
#set ($releases = $root.getChildren("release"))
#foreach ( $release in $releases )
#changeset ($release)
#end
</blockquote>
</td></tr>
</table>
#footer
#end
1.1 avalon-apps/demo/src/xdocs/stylesheets/docs.vsl
Index: docs.vsl
===================================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
#parse ( "templates.vm" )
#macro(document)
#header()
#set($allSections = $root.getChild("body").getChildren("section"))
#foreach( $section in $allSections )
#section ($section)
#end
#footer()
#end
#macro ( subsection $subsection)
<div class="h4">
#if ( $subsection.getAttributeValue("anchor") )
#set ($anchor = $subsection.getAttributeValue("anchor"))
#else
#set ($anchor = $subsection.getAttributeValue("name"))
#end
<h4><a name="$anchor">$subsection.getAttributeValue("name")</a></h4>
#foreach ( $items in $subsection.getChildren() )
#copy($items)
#end
</div>
#end
#macro (section $section)
<div class="h3">
#if ( $section.getAttributeValue("anchor") )
#set ($anchor = $section.getAttributeValue("anchor"))
#else
#set ($anchor = $section.getAttributeValue("name"))
#end
<h3><a name="$anchor">$section.getAttributeValue("name")</a></h3>
#foreach ( $items in $section.getChildren() )
#if ($items.getName().equals("subsection"))
#subsection ($items)
#else
#copy($items)
#end
#end
</div>
#end
#parse ( "templates.vm" )
<!-- This is a generated file. Do not edit. -->
#document()
1.1 avalon-apps/demo/src/xdocs/stylesheets/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project href="http://avalon.apache.org/apps/apps/demo/"
name="Demo">
<title>Apache Avalon Apps - Demo</title>
<logo href="images/header.gif">Demo</logo>
<body>
<menu name="About">
<item name="Overview" href="/index.html"/>
<item name="API Docs" href="/api/"/>
<item name="Download"
href="http://jakarta.apache.org/builds/avalon-apps/"/>
</menu>
<menu name="Demo Components">
<item name="Hello World" href="/demo-helloworld.html"/>
<item name="Lifecycle Demo" href="/demo-lifecycle.html"/>
<item name="AltRMI Hello World" href="/demo-altrmi-helloworld.html"/>
</menu>
</body>
</project>
1.1 avalon-apps/demo/src/xdocs/stylesheets/templates.vm
Index: templates.vm
===================================================================
#macro (header)
<html>
<head>
<style type="text/css">
@import url("$relativePath/css/tigris.css");
@import url("$relativePath/css/site.css");
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
#set ($authors = $root.getChild("properties").getChildren("author"))
#foreach ( $au in $authors )
#metaauthor ( $au.getText() $au.getAttributeValue("email") )
#end
<title>$project.getChild("title").getText() -
$root.getChild("properties").getChild("title").getText()</title>
</head>
<body marginwidth="0" marginheight="0" class="composite">
<div id="banner">
<table border="0" cellspacing="0" cellpadding="8" width="100%">
<!-- TOP IMAGE -->
<tr>
<td>#getProjectImage()</td>
<td><div align="right" valign="bottom"><b><font
size="+3">$project.getChild("title").getText()</font></b></div></td>
</tr>
</table>
</div>
<table border="0" cellspacing="0" cellpadding="8" width="100%" id="main">
<tr valign="top">
<!-- LEFT SIDE NAVIGATION -->
<td id="leftcol" width="20%">
<div id="navcolumn">
#makeProject()
</div>
</td>
<td><div id="bodycol"><div class="app">
#end
#macro (footer)
</div>
#getAuthorList()
</div></td>
</tr>
</table>
<!-- FOOTER -->
<div id="footer">
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td>Copyright © 1999-2003, Apache Software Foundation</td>
</tr>
</table>
</div>
</body>
</html>
#end
#macro ( subsection $subsection)
<div class="h4">
#if ( $subsection.getAttributeValue("anchor") )
#set ($anchor = $subsection.getAttributeValue("anchor"))
#else
#set ($anchor = $subsection.getAttributeValue("name"))
#end
<h4><a name="$anchor">$subsection.getAttributeValue("name")</a></h4>
#foreach ( $items in $subsection.getChildren() )
#copy($items)
#end
</div>
#end
#macro (section $section)
<div class="h3">
#if ( $section.getAttributeValue("anchor") )
#set ($anchor = $section.getAttributeValue("anchor"))
#else
#set ($anchor = $section.getAttributeValue("name"))
#end
<h3><a name="$anchor">$section.getAttributeValue("name")</a></h3>
#foreach ( $items in $section.getChildren() )
#if ($items.getName().equals("subsection"))
#subsection ($items)
#else
#copy($items)
#end
#end
</div>
#end
#macro ( table $table)
#set ($rowcount = 1)
<table cellpadding="3" cellspacing="2" border="1" width="100%">
#foreach ( $items in $table.getChildren() )
#if ($items.getName().equals("tr"))
#tr ($items)
#end
#end
</table>
#end
#macro ( tr $tr)
#printRow ($rowcount)
#set ($rowcount = $rowcount + 1)
#foreach ( $items in $tr.getChildren() )
#if ($items.getName().equals("td"))
#td ($items)
#elseif ($items.getName().equals("th"))
#th ($items)
#end
#end
</tr>
#end
#macro (printRow $count)
#if ($count % 2 > 0)
<tr class="a">
#else
<tr class="b">
#end
#end
#macro ( td $value)
<td
#if ($value.getAttributeValue("colspan"))
#set ($colspan = $value.getAttributeValue("colspan"))
colspan="$!colspan"
#end
#if ($value.getAttributeValue("rowspan"))
#set ($rowspan = $value.getAttributeValue("rowspan"))
rowspan="$!rowspan"
#end
>
#if ($value.getText().length() != 0 || $value.hasChildren())
#copycontent($value)
#else
#end
</td>
#end
#macro ( th $value)
<th
#if ($value.getAttributeValue("colspan"))
#set ($colspan = $value.getAttributeValue("colspan"))
colspan="$!colspan"
#end
#if ($value.getAttributeValue("rowspan"))
#set ($rowspan = $value.getAttributeValue("rowspan"))
rowspan="$!rowspan"
#end
>
#if ($value.getText().length() != 0 || $value.hasChildren())
#copycontent($value)
#else
#end
</th>
#end
#macro ( anchor $name $value )
#if ($value.startsWith("http://"))
<a href="$value">$name</a>
#elseif ($value.startsWith("/site"))
<a href="http://jakarta.apache.org$value">$name</a>
#elseif ( $value.startsWith("/") )
<a href="$relativePath$value">$name</a>
#else
<a href="$value">$name</a>
#end
#end
#macro ( metaauthor $author $email )
<meta name="author" value="$author">
<meta name="email" value="$email">
#end
#macro ( image $value )
#if ($value.getAttributeValue("width"))
#set ($width=$value.getAttributeValue("width"))
#end
#if ($value.getAttributeValue("height"))
#set ($height=$value.getAttributeValue("height"))
#end
#if ($value.getAttributeValue("align"))
#set ($align=$value.getAttributeValue("align"))
#end
<img src="$relativePath$value.getAttributeValue("src")">
#end
#macro ( source $value)
<div id="source">
<pre>$escape.getText( $value.text.trim() )</pre>
</div>
#end
#macro ( makeProject )
#set ($menus = $project.getChild("body").getChildren("menu"))
#foreach ( $menu in $menus )
<div>
<strong>$menu.getAttributeValue("name")</strong>
#foreach ( $item in $menu.getChildren() )
#set ($name = $item.getAttributeValue("name"))
<div><small>#anchor($name $item.getAttributeValue("href"))</small></div>
#end
</div>
#end
#end
#macro (getProjectImage)
#if ($project.getChild("logo"))
<td align="left">
<a href="http://jakarta.apache.org"><img
src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/></a>
</td>
<td align="right">
#set ( $logoString = $project.getChild("logo").getAttributeValue("href") )
#if ( $logoString.startsWith("/") )
<a href="$project.getAttributeValue("href")"><img
src="$relativePath$logoString" alt="$project.getChild("logo").getText()"
border="0"/></a>
#else
<a href="$project.getAttributeValue("href")"><img
src="$relativePath/$logoString" alt="$project.getChild("logo").getText()"
border="0"/></a>
#end
</td>
#else
<td colspan="2">
<a href="http://jakarta.apache.org"><img
src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a>
</td>
#end
#end
#macro (copy $element)
#if ( $element.name == "a" )
#anchor ( $element.content $element.getAttributeValue( "href" ) )
#elseif ( $element.name == "img" )
#image ($element)
#elseif ( $element.name == "source" )
#source ($element)
#elseif ( $element.name == "table" )
#table ($element)
#elseif ( $element.name == "pre" )
<pre>$element.content</pre>
#elseif ( $element.name == "escaped" )
$element.text
#else
<$element.name
#foreach ( $attr in $element.attributes )
$attr.name="$attr.value"
#end
>#copycontent($element)</$element.name>
#end
#end
#macro (getAuthorList)
<div align="right" id="authors">
#set ($authors = $root.getChild("properties").getChildren("author"))
#foreach ( $au in $authors )
#if( $velocityCount == 1 )by #end
#if( $velocityCount != 1 ),#end <a
href="email:$au.getAttributeValue("email")">$au.getText()</a>
#end
</div>
#end
#macro (copycontent $element)
#if ( $element.children.size() > 0 )
#foreach ( $child in $element.content )
#if ( $child.class.name.endsWith( "Element" ) )
#copy( $child )
#else
$escape.getText( $child.getText() )
#end
#end
#else
$element.content
#end
#end
1.1 avalon-apps/demo/src/xdocs/stylesheets/velocity.properties
Index: velocity.properties
===================================================================
file.resource.loader.path=src/xdocs/stylesheets
# disable this for now velocimacro.library=templates.vm
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]