kaz 02/03/01 03:37:41
Modified: src/templates/build build-docs.xml default.properties
xdocs/stylesheets dependencies.dvsl developer-list.dvsl
index.dvsl mail-lists.dvsl
Removed: xdocs/stylesheets maven.dvsl
Log:
The auto-generated documentation is no longer transformed to HTML
directly. It is now transformed to a valid xdoc and stored in the
${gen.docs} directory (target/generated-xdocs).
There are a few motivations for this change:
- Previously, HTML formatting was located in each of the auto-generated
doc stylesheets. In addition, maven.dvsl was almost an exact copy of
site.dvsl. Thus, changes in formatting of one's site has to occur in
multiple stylesheets. With this change, all formatting for a site is
maintained in only one location (site.dvsl).
- User documentation stored in the xdocs directory will no longer be
clobbered by our auto-generated docs because they are stored in a
separate directory. However, this still does not resolve conflicts
between the HTML docs that are eventually generated.
- I needed an easy way to convert jdepend.xsl to a DVSL stylesheet that
blended in with the rest of the site. By creating a valid xdoc, I
was able to take advantage of site.dvsl instead of re-inventing the
wheel. (I'll be checking this change in later).
As a result of this change I made the following changes:
- I rewrote the DVSL stylesheets for each auto-generated page so that
they generate xdocs instead of HTML. These xdocs are stored in a
separate directory from the user's xdocs.
- Modified cvs-change-log target to also leverage the new ${gen.docs}
directory.
- Added another DVSL task in the target that transforms the user's xdocs
to HTML. This new task transforms the auto-generated xdocs to HTML.
All xdoc -> HTML transforms are isolated in one Ant target.
- Deleted maven.dvsl as its not needed anymore and was mostly redundant.
Revision Changes Path
1.20 +67 -55 jakarta-turbine-maven/src/templates/build/build-docs.xml
Index: build-docs.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-docs.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- build-docs.xml 26 Feb 2002 05:27:54 -0000 1.19
+++ build-docs.xml 1 Mar 2002 11:37:41 -0000 1.20
@@ -8,7 +8,7 @@
<target
name="docs"
- depends="init,jdepend-metrics,cvs-change-log,docs:site,docs:index,
docs:mail-lists, docs:developer-list,docs:dependencies"
+ depends="init, jdepend-metrics, cvs-change-log, generate-xdocs, docs:site"
description="o Generate html project documentation xdoc sources">
</target>
@@ -18,32 +18,6 @@
<ant antfile="build-metrics.xml" target="jdepend-xml"/>
</target>
- <target
- name="docs:index"
- description="o Generates front page">
-
- <taskdef
- name="dvsl"
- classname="org.apache.tools.dvsl.DVSLTask">
-
- <classpath>
- <path refid="classpath"/>
- </classpath>
- </taskdef>
-
- <!-- Make sure the target directory -->
- <mkdir dir="${docs.dest}"/>
-
- <dvsl
- basedir="."
- destdir="${docs.dest}/"
- extension=".html"
- style="${docs.src}/stylesheets/index.dvsl"
- in="project.xml"
- out="${docs.dest}/index.html"
- />
- </target>
-
<!-- ================================================================== -->
<!-- C R O S S R E F E R E N C E S O U R C E S -->
<!-- ================================================================== -->
@@ -72,10 +46,13 @@
name="cvs-change-log"
depends="init">
+ <!-- Make sure the target directory -->
+ <mkdir dir="${gen.docs}"/>
+
<change-log
projectDescriptor="project.xml"
baseDir="src"
- output="xdocs/changelog.xml"
+ output="${gen.docs}/changelog.xml"
days="5"
/>
@@ -86,6 +63,35 @@
<!-- ================================================================== -->
<target
+ name="generate-xdocs"
+ depends="init, docs:index, docs:mail-lists, docs:developer-list,
docs:dependencies"
+ description="o Generates xdocs for site based on project descriptor" />
+
+ <target
+ name="docs:index"
+ description="o Generates front page">
+
+ <taskdef
+ name="dvsl"
+ classname="org.apache.tools.dvsl.DVSLTask">
+
+ <classpath>
+ <path refid="classpath"/>
+ </classpath>
+ </taskdef>
+
+ <!-- Make sure the target directory -->
+ <mkdir dir="${gen.docs}"/>
+
+ <dvsl
+ basedir="."
+ style="${docs.src}/stylesheets/index.dvsl"
+ in="project.xml"
+ out="${gen.docs}/index.xml"
+ />
+ </target>
+
+ <target
name="docs:mail-lists"
description="o Generate html project documentation xdoc sources">
@@ -96,16 +102,14 @@
</taskdef>
<!-- Make sure the target directory -->
- <mkdir dir="${docs.dest}"/>
+ <mkdir dir="${gen.docs}"/>
- <dvsl
- basedir="."
- destdir="${docs.dest}/"
- extension=".html"
- style="${docs.src}/stylesheets/mail-lists.dvsl"
- in="project.xml"
- out="${docs.dest}/mail-lists.html"
- />
+ <dvsl
+ basedir="."
+ style="${docs.src}/stylesheets/mail-lists.dvsl"
+ in="project.xml"
+ out="${gen.docs}/mail-lists.xml"
+ />
</target>
<target
@@ -119,16 +123,14 @@
</taskdef>
<!-- Make sure the target directory -->
- <mkdir dir="${docs.dest}"/>
+ <mkdir dir="${gen.docs}"/>
- <dvsl
- basedir="."
- destdir="${docs.dest}/"
- extension=".html"
- style="${docs.src}/stylesheets/developer-list.dvsl"
- in="project.xml"
- out="${docs.dest}/developer-list.html"
- />
+ <dvsl
+ basedir="."
+ style="${docs.src}/stylesheets/developer-list.dvsl"
+ in="project.xml"
+ out="${gen.docs}/developer-list.xml"
+ />
</target>
<target
@@ -142,16 +144,14 @@
</taskdef>
<!-- Make sure the target directory -->
- <mkdir dir="${docs.dest}"/>
+ <mkdir dir="${gen.docs}"/>
- <dvsl
- basedir="."
- destdir="${docs.dest}/"
- extension=".html"
- style="${docs.src}/stylesheets/dependencies.dvsl"
- in="project.xml"
- out="${docs.dest}/dependencies.html"
- />
+ <dvsl
+ basedir="."
+ style="${docs.src}/stylesheets/dependencies.dvsl"
+ in="project.xml"
+ out="${gen.docs}/dependencies.xml"
+ />
</target>
<!-- ================================================================== -->
@@ -172,6 +172,18 @@
<!-- Make sure the target directory -->
<mkdir dir="${docs.dest}"/>
+ <!-- Transform the auto-generated xdocs first -->
+ <dvsl
+ basedir="${gen.docs}"
+ destdir="${docs.dest}/"
+ extension=".html"
+ force="true"
+ toolboxfile="${docs.src}/toolbox.props"
+ style="${docs.src}/stylesheets/site.dvsl"
+ excludes="**/project.xml,**/template.xml"
+ includes="**/*.xml"
+ />
+ <!-- Then transform user supplied xdocs next -->
<dvsl
basedir="${docs.src}"
destdir="${docs.dest}/"
1.6 +1 -0 jakarta-turbine-maven/src/templates/build/default.properties
Index: default.properties
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/default.properties,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- default.properties 23 Feb 2002 15:46:36 -0000 1.5
+++ default.properties 1 Mar 2002 11:37:41 -0000 1.6
@@ -27,6 +27,7 @@
docs.src = ${basedir}/xdocs
docs.dest = ${basedir}/docs
+gen.docs = ${build.dir}/generated-xdocs
# These names will actually be based on the versioning document
# that morgan checked into jakarta-site2 the other day.
1.2 +29 -27 jakarta-turbine-maven/xdocs/stylesheets/dependencies.dvsl
Index: dependencies.dvsl
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/xdocs/stylesheets/dependencies.dvsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dependencies.dvsl 20 Feb 2002 04:05:08 -0000 1.1
+++ dependencies.dvsl 1 Mar 2002 11:37:41 -0000 1.2
@@ -2,37 +2,39 @@
dependency page generator
- version : $Id: dependencies.dvsl,v 1.1 2002/02/20 04:05:08 geirm Exp $
+ version : $Id: dependencies.dvsl,v 1.2 2002/03/01 11:37:41 kaz Exp $
-->
-#macro( doBody $document )
-<p>
-These are the dependencies required by the project :
-</p>
+#match ("dependencies")
+<?xml version="1.0"?>
+<document>
-<table>
-<tr>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- Name</th>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- Type</th>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- Version</th>
-</tr>
-$context.applyTemplates( $document, "dependencies/dependency" )
-</table>
+ <properties>
+ <title>Dependencies</title>
+ </properties>
+ <body>
+ <section name="Dependencies">
+ <p>
+ These are the dependencies required by the project :
+ </p>
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Version</th>
+ </tr>
+$context.applyTemplates()
+ </table>
+ </section>
+ </body>
+</document>
#end
-#match( "dependency" )
-<tr>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- $node.name.value()</td>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- $node.type.value()</td>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- $node.version.value()</td>
-</tr>
+#match ("dependency")
+ <tr>
+ <td>$node.name.value()</td>
+ <td>$node.type.value()</td>
+ <td>$node.version.value()</td>
+ </tr>
#end
-
-#parse( "xdocs/stylesheets/maven.dvsl" )
1.2 +29 -27 jakarta-turbine-maven/xdocs/stylesheets/developer-list.dvsl
Index: developer-list.dvsl
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/xdocs/stylesheets/developer-list.dvsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- developer-list.dvsl 20 Feb 2002 04:05:08 -0000 1.1
+++ developer-list.dvsl 1 Mar 2002 11:37:41 -0000 1.2
@@ -2,37 +2,39 @@
developer list page generator
- version : $Id: developer-list.dvsl,v 1.1 2002/02/20 04:05:08 geirm Exp $
+ version : $Id: developer-list.dvsl,v 1.2 2002/03/01 11:37:41 kaz Exp $
-->
-#macro( doBody $document )
-<p>
-Here are the developers on the project :
-</p>
+#match ("developers")
+<?xml version="1.0"?>
+<document>
-<table>
-<tr>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- Name</th>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- E-Mail</th>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- Organization</th>
-</tr>
-$context.applyTemplates( $document, "developers/developer" )
-</table>
+ <properties>
+ <title>Developers</title>
+ </properties>
+ <body>
+ <section name="Developers">
+ <p>
+ Here are the developers on the project:
+ </p>
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Organization</th>
+ <th>Email</th>
+ </tr>
+$context.applyTemplates()
+ </table>
+ </section>
+ </body>
+</document>
#end
-#match( "developer" )
-<tr>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- $node.name.value()</td>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- <a href="mailto:$node.email.value()">$node.email.value()</a></td>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- $node.organization.value()</td>
-</tr>
+#match ("developer")
+ <tr>
+ <td>$node.name.value()</td>
+ <td><a href="mailto:$node.email.value()">$node.email.value()</a></td>
+ <td>$node.organization.value()</td>
+ </tr>
#end
-
-#parse( "xdocs/stylesheets/maven.dvsl" )
1.2 +17 -5 jakarta-turbine-maven/xdocs/stylesheets/index.dvsl
Index: index.dvsl
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/xdocs/stylesheets/index.dvsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.dvsl 20 Feb 2002 08:11:14 -0000 1.1
+++ index.dvsl 1 Mar 2002 11:37:41 -0000 1.2
@@ -2,11 +2,23 @@
front page generator
- version : $Id: index.dvsl,v 1.1 2002/02/20 08:11:14 jvanzyl Exp $
+ version : $Id: index.dvsl,v 1.2 2002/03/01 11:37:41 kaz Exp $
-->
-#macro( doBody $document )
-$context.applyTemplates( $document, "description" )
-#end
+#match ("project")
+<?xml version="1.0"?>
+<document>
+
+ <properties>
+ <title>$node.valueOf('id')</title>
+ </properties>
-#parse( "xdocs/stylesheets/maven.dvsl" )
+ <body>
+ <section name="$node.valueOf('id')">
+ <p>
+ $node.copy($node.get('description').children())
+ </p>
+ </section>
+ </body>
+</document>
+#end
1.3 +31 -31 jakarta-turbine-maven/xdocs/stylesheets/mail-lists.dvsl
Index: mail-lists.dvsl
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/xdocs/stylesheets/mail-lists.dvsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mail-lists.dvsl 23 Feb 2002 17:49:35 -0000 1.2
+++ mail-lists.dvsl 1 Mar 2002 11:37:41 -0000 1.3
@@ -2,41 +2,41 @@
mail list page generator
- version : $Id: mail-lists.dvsl,v 1.2 2002/02/23 17:49:35 kaz Exp $
+ version : $Id: mail-lists.dvsl,v 1.3 2002/03/01 11:37:41 kaz Exp $
-->
-#macro( doBody $document )
-<p>
-Here are the email lists for the project :
-</p>
+#match ("mailingLists")
+<?xml version="1.0"?>
+<document>
-<table>
-<tr>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- List Name</th>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- Subscribe Link</th>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- Unsubscribe Link</th>
- <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- Archive Link</th>
-</tr>
-$context.applyTemplates( $document, "mailingLists/*" )
-</table>
+ <properties>
+ <title>Mailing Lists</title>
+ </properties>
+ <body>
+ <section name="Mailing Lists">
+ <p>
+ Here are the email lists for the project:
+ </p>
+ <table>
+ <tr>
+ <th>List Name</th>
+ <th>Subscribe</th>
+ <th>Unsubscribe</th>
+ <th>Archive</th>
+ </tr>
+$context.applyTemplates()
+ </table>
+ </section>
+ </body>
+</document>
#end
-#match( "mailingList" )
-<tr>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- $node.name.value()</td>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- <a href="mailto:$node.subscribe.value()">Subscribe</a></td>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- <a href="mailto:$node.unsubscribe.value()">Unsubscribe</a></td>
- <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
- <a href="$node.archive.value()">Archive</a></td>
-</tr>
+#match ("mailingList")
+ <tr>
+ <td>$node.name.value()</td>
+ <td><a href="mailto:$node.subscribe.value()">Subscribe</a></td>
+ <td><a href="mailto:$node.unsubscribe.value()">Unsubscribe</a></td>
+ <td><a href="$node.archive.value()">Archive</a></td>
+ </tr>
#end
-
-#parse( "xdocs/stylesheets/maven.dvsl" )
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>