Author: brett
Date: Tue Jan 25 14:34:35 2005
New Revision: 126436

URL: http://svn.apache.org/viewcvs?view=rev&rev=126436
Log:
upgrade to dom4j 1.5.2

site.jsl is having some problems - I have cleaned up but more work is needed to 
get the site going

Modified:
   maven/maven-1/core/trunk/project.xml
   maven/maven-1/plugins/trunk/xdoc/project.xml
   maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl

Modified: maven/maven-1/core/trunk/project.xml
Url: 
http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/project.xml?view=diff&rev=126436&p1=maven/maven-1/core/trunk/project.xml&r1=126435&p2=maven/maven-1/core/trunk/project.xml&r2=126436
==============================================================================
--- maven/maven-1/core/trunk/project.xml        (original)
+++ maven/maven-1/core/trunk/project.xml        Tue Jan 25 14:34:35 2005
@@ -453,15 +453,14 @@
   <!-- Need to mark these as compile-time/run-time -->
 
   <dependencies>
-    <!-- leave dom4j as the first entry or the tests fail -->
-<!-- TODO: still the case? -->
     <dependency>
       <id>dom4j</id>
-      <version>1.4-dev-8</version>
+      <version>1.5.2</version>
       <url>http://www.dom4j.org/</url>
-      <properties>
-        <description>ouch</description>
-      </properties>
+    </dependency>
+    <dependency>
+      <id>jaxen</id>
+      <version>1.1-beta-4</version>
     </dependency>
     <dependency>
       <id>ant</id>
@@ -735,10 +734,6 @@
       <version>1.0</version>
       <url>http://xml.apache.org/commons/components/which/index.html</url>
     </dependency>
-    <!-- this is a dependency, but as the classes ship with ant, bootstrap will
-     fail with linkage errors if it's included and the junit tests are not
-     forked
-    -->
 
     <dependency>
       <id>xml-apis</id>

Modified: maven/maven-1/plugins/trunk/xdoc/project.xml
Url: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/project.xml?view=diff&rev=126436&p1=maven/maven-1/plugins/trunk/xdoc/project.xml&r1=126435&p2=maven/maven-1/plugins/trunk/xdoc/project.xml&r2=126436
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/project.xml        (original)
+++ maven/maven-1/plugins/trunk/xdoc/project.xml        Tue Jan 25 14:34:35 2005
@@ -149,7 +149,12 @@
     <dependency>
       <groupId>dom4j</groupId>
       <artifactId>dom4j</artifactId>
-      <version>1.4-dev-8</version>
+      <version>1.5.2</version>
+    </dependency>
+    <dependency>
+      <groupId>jaxen</groupId>
+      <artifactId>jaxen</artifactId>
+      <version>1.1-beta-4</version>
     </dependency>
     <dependency>
       <groupId>commons-jelly</groupId>
@@ -159,17 +164,17 @@
     <dependency>
       <groupId>commons-jelly</groupId>
       <artifactId>commons-jelly-tags-jsl</artifactId>
-      <version>20030211.143151</version>
+      <version>1.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>commons-jelly</groupId>
       <artifactId>commons-jelly-tags-log</artifactId>
-      <version>20030211.142821</version>
+      <version>1.0</version>
     </dependency>
     <dependency>
       <groupId>commons-jelly</groupId>
       <artifactId>commons-jelly-tags-velocity</artifactId>
-      <version>20030303.205659</version>
+      <version>1.0</version>
     </dependency>
     <dependency>
       <groupId>commons-jelly</groupId>
@@ -192,6 +197,7 @@
       <artifactId>maven-model</artifactId>
       <version>3.0.0-SNAPSHOT</version>
     </dependency>
+    <!-- TODO: upgrade? -->
     <dependency>
       <groupId>velocity</groupId>
       <artifactId>velocity</artifactId>

Modified: maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl
Url: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl?view=diff&rev=126436&p1=maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl&r1=126435&p2=maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl&r2=126436
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl      
(original)
+++ maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl      Tue Jan 
25 14:34:35 2005
@@ -29,17 +29,20 @@
   xmlns:x="jelly:xml"
   xmlns:doc="doc"
   xmlns:maven="jelly:maven"
-  xmlns="dummy"
-  trim="true">
+  xmlns:ant="jelly:ant"
+  xmlns="dummy">
+
   <jsl:template match="document" trim="true">
+    <x:doctype name="html" publicId="-//W3C//DTD XHTML 1.0 Transitional//EN" 
systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
     <j:useBean var="navbean" class="org.apache.maven.NavBean"/>
     <j:set var="location" value="${outFile.substring(destdir.length())}"/>
     <util:replace var="location" oldChar="\" newChar="/" value="${location}"/>
     <!-- Stores location for publish date / version -->
     <j:set var="date">${maven.xdoc.date}</j:set>
     <j:setProperties object="${navbean}" document="${doc}" 
location="${location}"/>
+    <x:set var="templateContext" select="." />
 
-    <x:doctype name="html" publicId="-//W3C//DTD XHTML 1.0 Transitional//EN" 
systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
     <html>
       <head>
         <j:set var="docTitle"><x:expr select="./properties/title"/></j:set>
@@ -49,7 +52,7 @@
         <x:if select="not($nav/title)">
           <title>${pom.name} - ${docTitle}</title>
         </x:if>
-        
+
         <j:set var="themeUrl" value="${maven.xdoc.theme.url}"/>
         <util:file var="projectCssFile" 
name="${maven.docs.src}/style/project.css"/>
         
@@ -73,191 +76,287 @@
           <meta name="author" content="${author.text}"/>
           <meta name="email" content="${author.attribute('email').value}"/>
         </x:forEach>
-        
-        <jsl:applyTemplates select="$doc/document/head/*"/>
-        
+
+        <jsl:applyTemplates select="head/*" />
       </head>
+      <jsl:applyTemplates select="$templateContext" />
+    </html>
+  </jsl:template>
 
-      <x:element name="body"><j:whitespace trim="true">
-        <x:attribute name="class">composite</x:attribute>
-        <x:forEach var="attr" select="$doc/document/body/@*">
-          <x:attribute name="${attr.name}">${attr.value}</x:attribute>
-        </x:forEach>
-        </j:whitespace>
+  <!-- Skip properties -->
+  <jsl:template match="properties" />
 
-        <div id="banner">
-          <!-- organization logo -->
-          <j:set var="logo" value="${pom.organization.logo}"/>
-          <j:if test="${!empty(logo)}">
-            <!-- set url to org or project url -->
-            <j:set var="url" value="${pom.organization.url}"/>
-            <j:if test="${!empty(url)}">
-              <j:set var="home" value="${pom.organization.url}"/>
-            </j:if>
-            <j:if test="${empty(url)}">
-              <j:set var="home" value="${pom.url}"/>
-            </j:if>
-            <!-- set home to relative or complete -->
-            <j:if test="${!home.startsWith('http://') and 
!home.startsWith('https://')}">
-              <j:set var="home" value="${relativePath}${home}"/>
-            </j:if>
+  <!-- Skip head repeat -->
+  <jsl:template match="head" />
 
-            <!-- set image to relative or complete -->
-            <j:set var="image" value="${pom.organization.logo}"/>
-            <j:if test="${!image.startsWith('http://') and 
!image.startsWith('https://')}">
-              <j:set var="image" value="${relativePath}${image}"/>
-            </j:if>
-            <a href="${home}" id="organizationLogo">
-              <img src="${image}" alt="${pom.organization.name}" />
-            </a>
+  <jsl:template match="body" trim="true">
+    <x:set var="templateContext" select="." />
+    <x:element name="body"><j:whitespace trim="true">
+      <x:attribute name="class">composite</x:attribute>
+      <x:forEach var="attr" select="@*">
+        <x:attribute name="${attr.name}">${attr.value}</x:attribute>
+      </x:forEach>
+      </j:whitespace>
+      <div id="banner">
+        <!-- organization logo -->
+        <j:set var="logo" value="${pom.organization.logo}"/>
+        <j:if test="${!empty(logo)}">
+          <!-- set url to org or project url -->
+          <j:set var="url" value="${pom.organization.url}"/>
+          <j:if test="${!empty(url)}">
+            <j:set var="home" value="${pom.organization.url}"/>
           </j:if>
-
-          <!-- set project to relative or complete -->
-          <j:set var="home" value="${pom.url}"/>
+          <j:if test="${empty(url)}">
+            <j:set var="home" value="${pom.url}"/>
+          </j:if>
+          <!-- set home to relative or complete -->
           <j:if test="${!home.startsWith('http://') and 
!home.startsWith('https://')}">
             <j:set var="home" value="${relativePath}${home}"/>
           </j:if>
 
-          <!-- project logo and link -->
-          <j:set var="logo" value="${pom.logo}"/>
-          <j:if test="${logo != null and logo != ''}">
-            <!-- set image to relative or complete -->
-            <j:set var="image" value="${pom.logo}"/>
-            <j:if test="${!image.startsWith('http://') and 
!image.startsWith('https://')}">
-              <j:set var="image" value="${relativePath}${image}"/>
-            </j:if>
-
-            <a href="${home}" id="projectLogo">
-              <img src="${image}" alt="${pom.name}"/>
-            </a>
+          <!-- set image to relative or complete -->
+          <j:set var="image" value="${pom.organization.logo}"/>
+          <j:if test="${!image.startsWith('http://') and 
!image.startsWith('https://')}">
+            <j:set var="image" value="${relativePath}${image}"/>
           </j:if>
-          <j:if test="${logo == null or logo == ''}">
-            <a href="${home}" id="projectLogo">
-              <span>${pom.name}</span>
-            </a>
+          <a href="${home}" id="organizationLogo">
+            <img src="${image}" alt="${pom.organization.name}" />
+          </a>
+        </j:if>
+
+        <!-- set project to relative or complete -->
+        <j:set var="home" value="${pom.url}"/>
+        <j:if test="${!home.startsWith('http://') and 
!home.startsWith('https://')}">
+          <j:set var="home" value="${relativePath}${home}"/>
+        </j:if>
+
+        <!-- project logo and link -->
+        <j:set var="logo" value="${pom.logo}"/>
+        <j:if test="${logo != null and logo != ''}">
+          <!-- set image to relative or complete -->
+          <j:set var="image" value="${pom.logo}"/>
+          <j:if test="${!image.startsWith('http://') and 
!image.startsWith('https://')}">
+            <j:set var="image" value="${relativePath}${image}"/>
           </j:if>
-          <div class="clear"><hr /></div>
-        </div>
 
-        <div id="breadcrumbs">
-          <maven:property var="version" name="maven.xdoc.version" 
defaultValue="${pom.currentVersion}"/>
-          <j:if test="${date == 'left'}">
-            <div class="xleft">
-              Last published: ${build.date}
-              <j:if test="${!empty(version)}">
-                <j:if test="${!(maven.xdoc.crumb.separator == '')}">
-                  <span class="separator">${maven.xdoc.crumb.separator}</span>
-                </j:if>
-                Doc for ${version}
+          <a href="${home}" id="projectLogo">
+            <img src="${image}" alt="${pom.name}"/>
+          </a>
+        </j:if>
+        <j:if test="${logo == null or logo == ''}">
+          <a href="${home}" id="projectLogo">
+            <span>${pom.name}</span>
+          </a>
+        </j:if>
+        <div class="clear"><hr /></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <maven:property var="version" name="maven.xdoc.version" 
defaultValue="${pom.currentVersion}"/>
+        <j:if test="${date == 'left'}">
+          <div class="xleft">
+            Last published: ${build.date}
+            <j:if test="${!empty(version)}">
+              <j:if test="${!(maven.xdoc.crumb.separator == '')}">
+                <span class="separator">${maven.xdoc.crumb.separator}</span>
               </j:if>
-            </div>
-          </j:if>
-          <div class="xright">
-            <j:if test="${date == 'right'}">
-              Last published: ${build.date}
-              <j:if test="${!empty(version)}">
-                <j:if test="${!(maven.xdoc.crumb.separator == '')}">
-                  <span class="separator">${maven.xdoc.crumb.separator}</span>
-                </j:if>
-                Doc for ${version}
+              Doc for ${version}
+            </j:if>
+          </div>
+        </j:if>
+        <div class="xright">
+          <j:if test="${date == 'right'}">
+            Last published: ${build.date}
+            <j:if test="${!empty(version)}">
+              <j:if test="${!(maven.xdoc.crumb.separator == '')}">
+                <span class="separator">${maven.xdoc.crumb.separator}</span>
               </j:if>
-              <x:if select="$nav/body/links">
-                <j:if test="${!(maven.xdoc.crumb.separator == '')}">
-                  <span class="separator">${maven.xdoc.crumb.separator}</span>
-                </j:if>
-              </x:if>
+              Doc for ${version}
             </j:if>
-            <!-- render links -->
             <x:if select="$nav/body/links">
-              <jsl:applyTemplates select="$nav/body/links"/>
+              <j:if test="${!(maven.xdoc.crumb.separator == '')}">
+                <span class="separator">${maven.xdoc.crumb.separator}</span>
+              </j:if>
             </x:if>
-          </div>
-          <div class="clear"><hr /></div>
+          </j:if>
+          <!-- render links -->
+          <x:if select="$nav/body/links">
+            <jsl:applyTemplates select="$nav/body/links" />
+          </x:if>
         </div>
+        <div class="clear"><hr /></div>
+      </div>
         
-        <!-- left column start -->
-        <div id="leftColumn">
-          <div id="navcolumn">
-            <j:if test="${date == 'navigation-top'}">
-              <div id="lastPublished">Last published: ${build.date}</div>
-            </j:if>
-            <x:if select="$nav">
-              <jsl:applyTemplates select="$nav/body/menu[not(@type) | 
@type='header'] | $nav/body/search"/>
-            </x:if>
-            <jsl:applyTemplates select="$projectNav/body/menu"/>
-            <!-- allows user to put menu items after standard reports -->
-            <x:if select="$nav">
-              <jsl:applyTemplates select="$nav/body/[EMAIL 
PROTECTED]'footer']"/>
-            </x:if>
-            <j:if test="${context.getVariable('maven.xdoc.legend') == 'true'}">
-              <div id="legend">
-                <h5>Legend</h5>
-                <ul>
-                  <li class="externalLink">External Link</li>
-                  <li class="newWindow">Opens in a new window</li>
-                </ul>
-              </div>
-            </j:if>
-            <!-- Standard Maven Navigation -->
-            <j:set var="fileName">${file}</j:set>
-            <j:set var="poweredbyimage">${maven.xdoc.poweredby.image}</j:set>
-            <j:set var="poweredbytitle">${maven.xdoc.poweredby.title}</j:set>
-            <j:set var="poweredbyurl" value="${maven.xdoc.poweredby.url}" />
-            <j:if test="${!empty(poweredbyimage)}">
-              <a id="poweredBy" href="${poweredbyurl}" 
title="${poweredbytitle}">
-                <img alt="${maven.xdoc.poweredby.title}" 
src="${relativePath}/images/logos/${poweredbyimage}" />
-              </a>
-            </j:if>
-            <j:if test="${date == 'navigation-bottom'}">
-              <div id="lastPublished">Last published: ${build.date}</div>
-            </j:if>
-          </div>
+      <!-- left column start -->
+      <div id="leftColumn">
+        <div id="navcolumn">
+          <j:if test="${date == 'navigation-top'}">
+            <div id="lastPublished">Last published: ${build.date}</div>
+          </j:if>
+          <x:if select="$nav">
+            <jsl:applyTemplates select="$nav/body/menu[not(@type) | 
@type='header'] | $nav/body/search"/>
+          </x:if>
+          <jsl:applyTemplates select="$projectNav/body/menu"/>
+          <!-- allows user to put menu items after standard reports -->
+          <x:if select="$nav">
+            <jsl:applyTemplates select="$nav/body/[EMAIL PROTECTED]'footer']"/>
+          </x:if>
+          <j:if test="${context.getVariable('maven.xdoc.legend') == 'true'}">
+            <div id="legend">
+              <h5>Legend</h5>
+              <ul>
+                <li class="externalLink">External Link</li>
+                <li class="newWindow">Opens in a new window</li>
+              </ul>
+            </div>
+          </j:if>
+          <!-- Standard Maven Navigation -->
+          <j:set var="fileName">${file}</j:set>
+          <j:set var="poweredbyimage">${maven.xdoc.poweredby.image}</j:set>
+          <j:set var="poweredbytitle">${maven.xdoc.poweredby.title}</j:set>
+          <j:set var="poweredbyurl" value="${maven.xdoc.poweredby.url}" />
+          <j:if test="${!empty(poweredbyimage)}">
+            <a id="poweredBy" href="${poweredbyurl}" title="${poweredbytitle}">
+              <img alt="${maven.xdoc.poweredby.title}" 
src="${relativePath}/images/logos/${poweredbyimage}" />
+            </a>
+          </j:if>
+          <j:if test="${date == 'navigation-bottom'}">
+            <div id="lastPublished">Last published: ${build.date}</div>
+          </j:if>
         </div>
-        <!-- left column end -->
+      </div>
+      <!-- left column end -->
               
-        <!-- body start -->
-        <div id="bodyColumn">
-          <div class="contentBox">
-            <!-- 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/release" />
-            <jsl:applyTemplates select="$doc/document/body/goals" />
-          </div>
+      <!-- body start -->
+      <div id="bodyColumn">
+        <div class="contentBox">
+          <jsl:applyTemplates select="$templateContext" />
         </div>
-        <div class="clear"><hr /></div>
-        <!-- body end -->
+      </div>
+      <div class="clear"><hr /></div>
+      <!-- body end -->
               
-        <!-- footer start -->    
-        <div id="footer">  
-          <jsl:applyTemplates select="$nav/body/footer"/>
-          <div class="xright">
-            <j:if test="${!empty(pom.organization.name)}">
-              <j:if test="${!empty(pom.inceptionYear)}">
-                <j:if test="${pom.inceptionYear == mavenCurrentYear}">
-                  &#169; ${mavenCurrentYear}, ${pom.organization.name}
-                </j:if>
-                <j:if test="${pom.inceptionYear != mavenCurrentYear}">
-                  &#169; ${pom.inceptionYear}-${mavenCurrentYear}, 
${pom.organization.name}
-                </j:if>
-              </j:if>
-              <j:if test="${empty(pom.inceptionYear)}">
+      <!-- footer start -->    
+      <div id="footer">  
+        <jsl:applyTemplates select="$nav/body/footer"/>
+        <div class="xright">
+          <j:if test="${!empty(pom.organization.name)}">
+            <j:if test="${!empty(pom.inceptionYear)}">
+              <j:if test="${pom.inceptionYear == mavenCurrentYear}">
                 &#169; ${mavenCurrentYear}, ${pom.organization.name}
               </j:if>
+              <j:if test="${pom.inceptionYear != mavenCurrentYear}">
+                &#169; ${pom.inceptionYear}-${mavenCurrentYear}, 
${pom.organization.name}
+              </j:if>
             </j:if>
-            <j:if test="${date == 'bottom'}">
-              &#169; - Last published: ${build.date}
+            <j:if test="${empty(pom.inceptionYear)}">
+              &#169; ${mavenCurrentYear}, ${pom.organization.name}
             </j:if>
-          </div>
-          <div class="clear"><hr /></div>
+          </j:if>
+          <j:if test="${date == 'bottom'}">
+            &#169; - Last published: ${build.date}
+          </j:if>
         </div>
-        <!-- footer end --> 
-      </x:element>
-    </html>
+        <div class="clear"><hr /></div>
+      </div>
+      <!-- footer end --> 
+    </x:element>
+  </jsl:template>
+        
+  <!-- process a documentation section -->
+  <jsl:template match="section" trim="true">
+    <div class="section">
+      <j:set var="_sectionName"><x:expr select="@name"/></j:set>
+      <!-- named anchors can't contain whitespaces -->
+      <j:set var="_anchorName"><doc:escapeNameToken 
value="${_sectionName}"/></j:set>
+      <j:if test="${!empty(_sectionName)}">
+          <a name="${_anchorName}"/><h2>${_sectionName}</h2>
+      </j:if>
+      <jsl:applyTemplates />
+    </div>
   </jsl:template>
 
-  <!-- process the properties of the doc -->
-  <jsl:template match="properties" trim="true">
-    <!-- stick head block here later -->
+  <jsl:template match="subsection" trim="true">
+    <div class="subsection">
+      <j:set var="_sectionName"><x:expr select="@name"/></j:set>
+      <!-- named anchors can't contain whitespaces -->
+      <j:set var="_anchorName"><doc:escapeNameToken 
value="${_sectionName}"/></j:set>
+      <j:if test="${!empty(_sectionName)}">
+          <a name="${_anchorName}"/><h3>${_sectionName}</h3>
+      </j:if>
+      <jsl:applyTemplates />
+    </div>
+  </jsl:template>
+
+  <jsl:template match="source" trim="false">
+<ant:echo>into source...</ant:echo>
+    <div class="source"><pre><jsl:applyTemplates /></pre></div>
+  </jsl:template>
+  
+  <jsl:template match="escapeXml" trim="false"><j:set 
var="escapedChunk"><jsl:applyTemplates/></j:set>${escapedChunk}</jsl:template>
+  
+  <jsl:template match="a" trim="true">
+    <x:element name="a" trim="true">
+      <x:forEach var="attr" select="@*">
+        <j:choose>
+          <j:when test="${attr.name == 'href'}">
+            <j:set var="href" value="${attr.value}" />
+            <j:choose>                 
+              <j:when test="${href.startsWith('#')}">
+                <x:attribute name="href">
+                  <doc:escapeNameToken value="${href}"/>
+                </x:attribute>
+              </j:when>
+              <j:when test="${href.startsWith('http://')}">
+                <x:attribute name="href">${href}</x:attribute>
+                <x:attribute name="class">externalLink</x:attribute>
+                <x:attribute name="title">External Link</x:attribute>
+              </j:when>                  
+              <j:otherwise>
+                <x:attribute name="href">${href}</x:attribute>
+              </j:otherwise>
+            </j:choose>
+          </j:when>
+          <j:when test="${attr.name == 'target'}">
+            <j:set var="target">${attr.value}</j:set>
+            <j:if test="${!empty(target) and target.equals('_blank')}">
+              <x:attribute name="class">newWindow</x:attribute>
+              <x:attribute name="title">New Window</x:attribute>
+            </j:if>              
+            <x:attribute name="target">${target}</x:attribute>
+          </j:when>
+          <j:when test="${attr.name == 'name'}">
+            <x:attribute name="name">
+              <doc:escapeNameToken value="${attr.value}"/>
+            </x:attribute>
+          </j:when>
+          <j:otherwise>
+            <x:attribute name="${attr.name}">${attr.value}</x:attribute>
+          </j:otherwise>
+        </j:choose>
+      </x:forEach>
+      <jsl:applyTemplates/>
+    </x:element>
+  </jsl:template>
+   
+  <!-- Process the breadcrumb navbar -->
+  <jsl:template match="links" trim="true">
+    <j:set var="linkCount" value="1"/>
+    <x:forEach var="link" select="item">
+      <j:set var="_img"><x:expr select="@img"/></j:set>
+      <j:set var="_name"><x:expr select="@name"/></j:set>
+      <j:set var="_link"><x:expr select="@href"/></j:set>
+      <j:set var="_target"><x:expr select="@target"/></j:set>
+      <j:whitespace trim="false">
+        <j:if test="${linkCount != 1}">
+          <j:if test="${!(maven.xdoc.crumb.separator == '')}">
+            <span class="separator">${maven.xdoc.crumb.separator}</span>
+          </j:if>
+        </j:if>
+        <doc:itemLink name="${_name}" link="${_link}" img="${_img}" 
target="${_target}"/>
+      </j:whitespace>
+      <j:set var="linkCount" value="${1+linkCount}"/>
+    </x:forEach>
   </jsl:template>
 
   <!-- Process a menu for the navigation bar -->
@@ -279,7 +378,7 @@
     </j:choose>
   </jsl:template>
 
-  <jsl:template match="item" trim="true">
+  <jsl:template match="menu/item" trim="true">
     <x:set var="item" select="."/>
     <x:set var="_name" select="string(@name)"/>
     <x:set var="_link" select="string(@href)"/>
@@ -307,26 +406,6 @@
     </li>
   </jsl:template>
 
-  <!-- Process the breadcrumb navbar -->
-  <jsl:template match="links" trim="true">
-    <j:set var="linkCount" value="1"/>
-    <x:forEach var="link" select="item">
-      <j:set var="_img"><x:expr select="@img"/></j:set>
-      <j:set var="_name"><x:expr select="@name"/></j:set>
-      <j:set var="_link"><x:expr select="@href"/></j:set>
-      <j:set var="_target"><x:expr select="@target"/></j:set>
-      <j:whitespace trim="false">
-        <j:if test="${linkCount != 1}">
-          <j:if test="${!(maven.xdoc.crumb.separator == '')}">
-            <span class="separator">${maven.xdoc.crumb.separator}</span>
-          </j:if>
-        </j:if>
-        <doc:itemLink name="${_name}" link="${_link}" img="${_img}" 
target="${_target}"/>
-      </j:whitespace>
-      <j:set var="linkCount" value="${1+linkCount}"/>
-    </x:forEach>
-  </jsl:template>
-
   <!-- Google site search -->
   <jsl:template match="search" trim="true">
     <!-- Search code: http://www.google.com/searchcode.html -->
@@ -352,37 +431,6 @@
     </div>
   </jsl:template>
 
-  <!-- process a documentation section -->
-  <jsl:template match="section" trim="true">
-    <div class="section">
-      <j:set var="_sectionName"><x:expr select="@name"/></j:set>
-      <!-- named anchors can't contain whitespaces -->
-      <j:set var="_anchorName"><doc:escapeNameToken 
value="${_sectionName}"/></j:set>
-      <j:if test="${!empty(_sectionName)}">
-          <a name="${_anchorName}"/><h2>${_sectionName}</h2>
-      </j:if>
-      <jsl:applyTemplates select="*"/>
-    </div>
-  </jsl:template>
-
-  <jsl:template match="subsection" trim="true">
-    <div class="subsection">
-      <j:set var="_sectionName"><x:expr select="@name"/></j:set>
-      <!-- named anchors can't contain whitespaces -->
-      <j:set var="_anchorName"><doc:escapeNameToken 
value="${_sectionName}"/></j:set>
-      <j:if test="${!empty(_sectionName)}">
-          <a name="${_anchorName}"/><h3>${_sectionName}</h3>
-      </j:if>
-      <jsl:applyTemplates select="*"/>
-    </div>
-  </jsl:template>
-
-  <jsl:template match="source" trim="false">
-    <div class="source"><pre><jsl:applyTemplates /></pre></div>
-  </jsl:template>
-  
-  <jsl:template match="escapeXml" trim="false"><j:set 
var="escapedChunk"><jsl:applyTemplates/></j:set>${escapedChunk}</jsl:template>
-  
   <!-- preserve whitespace in the following elements -->
   <jsl:template match="pre | script | style" trim="true">
     <x:set var="nodename" select="name()"/>
@@ -409,14 +457,14 @@
 
   <jsl:template match="footer" trim="true">
     <div class="xleft">
-      <jsl:applyTemplates select="*"/>
+      <jsl:applyTemplates />
     </div>
   </jsl:template>
 
   <jsl:template match="table" trim="true">
     <j:set var="rowcount" value="0"/>
     <table class="bodyTable">
-      <jsl:applyTemplates select="*"/>
+      <jsl:applyTemplates />
     </table>
   </jsl:template>
 
@@ -434,104 +482,57 @@
       <x:forEach var="attr" select="@*">
         <x:attribute name="${attr.name}">${attr.value}</x:attribute>
       </x:forEach>
-      <jsl:applyTemplates select="*"/>
+      <jsl:applyTemplates />
 </j:whitespace></x:element>
   </jsl:template>
 
-      <!--************************-->
-      <!-- goals documentation    -->
-      <!--************************-->
-      <jsl:template match="goals" trim="true">
-        <!-- reset row alternation -->
-        <j:set var="rowMode" value="" />
-        <div class="h3">
-          <a name="Goals"/><h3>Goals</h3>
-          <table class="bodyTable">
-            <thead>
-              <tr><th>Goal</th><th>Description</th></tr>
-            </thead>
-            <tbody>
-              <jsl:applyTemplates select="goal"/>
-            </tbody>
-          </table>
-        </div>
-      </jsl:template>
+  <!-- goals documentation    -->
+  <jsl:template match="goals" trim="true">
+    <!-- reset row alternation -->
+    <j:set var="rowMode" value="" />
+    <div class="h3">
+      <a name="Goals"/><h3>Goals</h3>
+      <table class="bodyTable">
+        <thead>
+          <tr><th>Goal</th><th>Description</th></tr>
+        </thead>
+        <tbody>
+          <jsl:applyTemplates select="goal"/>
+        </tbody>
+      </table>
+    </div>
+  </jsl:template>
       
-      <!-- a goal -->
-      <jsl:template match="goal" trim="true">
-        <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>
+  <!-- a goal -->
+  <jsl:template match="goal" trim="true">
+    <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:element name="tr"><j:whitespace trim="true">
-          <x:attribute name="class">${rowMode}</x:attribute>
-          <j:set var="_goalName"><x:expr select="./name" /></j:set>
-          <td style="width:20%"><a name="${_goalName}"/>${_goalName}</td>
-          <td ><jsl:applyTemplates select="description" /></td>
+    <x:element name="tr"><j:whitespace trim="true">
+      <x:attribute name="class">${rowMode}</x:attribute>
+      <j:set var="_goalName"><x:expr select="./name" /></j:set>
+      <td style="width:20%"><a name="${_goalName}"/>${_goalName}</td>
+      <td ><jsl:applyTemplates select="description" /></td>
 </j:whitespace></x:element>
-      </jsl:template>   
+  </jsl:template>   
       
-      <jsl:template match="description">
-        <jsl:applyTemplates trim="false"/>
-      </jsl:template>
-
-  <!-- remove the space at the end of parsed "a" anchors and fix local hrefs 
-->
-  <jsl:template match="a" trim="true">
-    <x:element name="a" trim="true">
-      <x:forEach var="attr" select="@*">
-        <j:choose>
-          <j:when test="${attr.name == 'href'}">
-            <j:set var="href" value="${attr.value}" />
-            <j:choose>                 
-              <j:when test="${href.startsWith('#')}">
-                <x:attribute name="href">
-                  <doc:escapeNameToken value="${href}"/>
-                </x:attribute>
-              </j:when>
-              <j:when test="${href.startsWith('http://')}">
-                <x:attribute name="href">${href}</x:attribute>
-                <x:attribute name="class">externalLink</x:attribute>
-                <x:attribute name="title">External Link</x:attribute>
-              </j:when>                  
-              <j:otherwise>
-                <x:attribute name="href">${href}</x:attribute>
-              </j:otherwise>
-            </j:choose>
-          </j:when>
-          <j:when test="${attr.name == 'target'}">
-            <j:set var="target">${attr.value}</j:set>
-            <j:if test="${!empty(target) and target.equals('_blank')}">
-              <x:attribute name="class">newWindow</x:attribute>
-              <x:attribute name="title">New Window</x:attribute>
-            </j:if>              
-            <x:attribute name="target">${target}</x:attribute>
-          </j:when>
-          <j:when test="${attr.name == 'name'}">
-            <x:attribute name="name">
-              <doc:escapeNameToken value="${attr.value}"/>
-            </x:attribute>
-          </j:when>
-          <j:otherwise>
-            <x:attribute name="${attr.name}">${attr.value}</x:attribute>
-          </j:otherwise>
-        </j:choose>
-      </x:forEach>
-      <jsl:applyTemplates/>
-    </x:element>
+  <jsl:template match="description">
+    <jsl:applyTemplates trim="false"/>
   </jsl:template>
-   
-  <!-- copy any other elements through -->
-  <jsl:template match="*" trim="false"><jsl:copy 
trim="false"><jsl:applyTemplates trim="false"/></jsl:copy></jsl:template>
-   
+
   <!-- element values don't pass through as text -->
   <jsl:template match="@*"/>
 
   <!-- CDATA and text nodes pass-thru -->
   <jsl:template match="text()"><x:expr select="."/></jsl:template>
 
+  <!-- copy any other elements through -->
+  <jsl:template match="*" trim="false"><jsl:copy 
trim="false"><jsl:applyTemplates trim="false"/></jsl:copy></jsl:template>
+   
 </jsl:stylesheet>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to