dion 2002/12/13 08:02:02
Modified: src/plugins-build/xdoc site.jsl
Log:
Add goals and glossary templates
Revision Changes Path
1.12 +67 -15 jakarta-turbine-maven/src/plugins-build/xdoc/site.jsl
Index: site.jsl
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/xdoc/site.jsl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- site.jsl 12 Dec 2002 13:22:46 -0000 1.11
+++ site.jsl 13 Dec 2002 16:02:02 -0000 1.12
@@ -10,7 +10,7 @@
xmlns:x="jelly:xml"
xmlns:jslXdoc="jslXdoc"
xmlns="dummy">
- <jsl:template match="document" trim="no">
+ <jsl:template match="document">
<x:doctype name="html"
publicId="-//CollabNet//DTD XHTML 1.0 Transitional//EN"
@@ -31,19 +31,13 @@
@import url(${tigrisCss});
@import url(${mavenCss});
]]></style>
- <j:set var="jsLinks" encode="false">
- <link rel='stylesheet' type='text/css'
href='${relativePath}/style/ns4_only.css' media='screen' />
- <link rel='stylesheet' type='text/css'
href='${relativePath}/style/maven_ns4_only.css' media='screen'/>
- </j:set>
-
- <script type="text/javascript"><![CDATA[
+ <x:element name="script">
+ <x:attribute name="type">text/javascript</x:attribute>
if (document.layers) {
- document.writeln("
- <link rel='stylesheet' type='text/css'
href='${relativePath}/style/ns4_only.css' media='screen' />
- <link rel='stylesheet' type='text/css'
href='${relativePath}/style/maven_ns4_only.css' media='screen'/>
- ");
+ document.writeln('<link rel="stylesheet" type="text/css"
href="${relativePath}/style/ns4_only.css" media="screen" /><link rel="stylesheet"
type="text/css" href="${relativePath}/style/maven_ns4_only.css" media="screen"/>');
}
- ]]></script>
+ </x:element>
+
<link rel="stylesheet" type="text/css"
href="${relativePath}/style/print.css" media="print" />
<x:forEach var="author" select="./properties/author">
<meta name="author" value="${author.text}"/>
@@ -226,13 +220,13 @@
<div id="bodycol">
<!-- Insert MAIN body here -->
<div class="app">
-<m:echo>Processing sections <x:expr select="body/section/@name"/></m:echo>
<!-- FIXME really shouldn't use $doc, but jelly loses it's context again -->
<jsl:applyTemplates select="$doc/document/body/section" />
<jsl:applyTemplates select="$doc/document/body/glossary" />
<jsl:applyTemplates select="$doc/document/body/release" />
<jsl:applyTemplates select="$doc/document/body/changelog" />
<jsl:applyTemplates select="$doc/document/body/taskList" />
+ <jsl:applyTemplates select="$doc/document/body/goals" />
</div>
</div>
</td>
@@ -352,7 +346,7 @@
<x:attribute name="class">${rowMode}</x:attribute>
- <!-- copy attributes -->
+ <!-- copy attributes FIXME: Shouldn't this only be colspan|rowspan? -->
<x:forEach select="@*">
<x:set var="attr" value="."/>
<x:attribute name="${attr.name}">${attr.text}</x:attribute>
@@ -362,8 +356,66 @@
</x:element>
</jsl:template>
+ <!--************************-->
+ <!-- glossary documentation -->
+ <!--************************-->
+ <jsl:template match="glossary">
+ <jsl:applyTemplates select="glossary-entries/glossary-entry" />
+ </jsl:template>
+
+ <jsl:template match="glossary-entry">
+ <strong><x:expr select="name" /></strong>
+ <br/>
+ <x:expr select="definition" />
+ <p/>
+ </jsl:template>
+
+ <!--************************-->
+ <!-- goals documentation -->
+ <!--************************-->
+ <jsl:template match="goals">
+ <!-- reset row alternation -->
+ <j:set var="rowMode" value="" />
+ <div class="h3">
+ <h3><a name="Goals">Goals</a></h3>
+ <table>
+ <tr><th>Goal</th><th>Description</th></tr>
+ <jsl:applyTemplates select="goal"/>
+ </table>
+ </div>
+ </jsl:template>
+
+ <!-- a goal -->
+ <jsl:template match="goal">
+ <!-- FIXME: this is copied from tr - there must be a way of
+ calling templates in jsl? -->
+ <x:element name="tr">
+
+ <j:choose>
+ <j:when test="${rowMode == 'a'}">
+ <j:set var="rowMode" value="b"/>
+ </j:when>
+ <j:otherwise>
+ <j:set var="rowMode" value="a"/>
+ </j:otherwise>
+ </j:choose>
+
+ <x:attribute name="class">${rowMode}</x:attribute>
+
+ <!-- copy attributes -->
+ <x:forEach select="@*">
+ <x:set var="attr" value="."/>
+ <x:attribute name="${attr.name}">${attr.text}</x:attribute>
+ </x:forEach>
+ <j:set var="_goalName"><x:expr select="./name" /></j:set>
+ <td><a name="${_goalName}">${_goalName}</a></td>
+ <td><jsl:applyTemplates select="description" /></td>
+ </x:element>
+ </jsl:template>
+
+
<!-- copy any other elements through -->
- <jsl:template match="*">
+ <jsl:template match="*" trim="no">
<jsl:copy>
<jsl:applyTemplates />
</jsl:copy>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>