incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1384943 - in /incubator/easyant/core/trunk/src/main: java/org/apache/easyant/core/report/XMLEasyAntReportWriter.java java/org/apache/easyant/tasks/PluginReport.java resources/org/apache/easyant/core/report/easyant-report.xsl
Date Fri, 14 Sep 2012 21:54:54 GMT
Author: jlboudart
Date: Fri Sep 14 21:54:54 2012
New Revision: 1384943

URL: http://svn.apache.org/viewvc?rev=1384943&view=rev
Log:
Update plugin documentation skin

Modified:
    incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/XMLEasyAntReportWriter.java
    incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java
    incubator/easyant/core/trunk/src/main/resources/org/apache/easyant/core/report/easyant-report.xsl

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/XMLEasyAntReportWriter.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/XMLEasyAntReportWriter.java?rev=1384943&r1=1384942&r2=1384943&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/XMLEasyAntReportWriter.java (original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/XMLEasyAntReportWriter.java Fri Sep 14 21:54:54 2012
@@ -89,6 +89,9 @@ public class XMLEasyAntReportWriter {
         }
         out.println("\t\tconf=\"" + XMLHelper.escape(report.getConfiguration()) + "\"");
         out.println("\t\tdate=\"" + Ivy.DATE_FORMAT.format(report.getDate()) + "\"/>");
+        out.println("\t<description>");
+        out.println(report.getModuleDescriptor().getDescription());
+        out.println("\t</description>");
         out.println("\t<configurations>");
         StringBuffer sb = new StringBuffer();
         for (Configuration configuration : easyAntReport.getModuleDescriptor().getConfigurations()) {

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java?rev=1384943&r1=1384942&r2=1384943&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java (original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java Fri Sep 14 21:54:54 2012
@@ -128,10 +128,10 @@ public class PluginReport extends Abstra
 
     public void execute() throws BuildException {
         IvySettings settings = getEasyAntIvyInstance().getSettings();
-        if (moduleIvy == null || ! moduleIvy.exists()) {
+        if (moduleIvy == null || !moduleIvy.exists()) {
             throw new BuildException("moduleIvy attribute is not set or is not a file");
         }
-        if (sourceDirectory == null || !  sourceDirectory.exists()) {
+        if (sourceDirectory == null || !sourceDirectory.exists()) {
             throw new BuildException("sourceDirectory attribute is not set or doesn't exists");
         }
         conf = getProperty(conf, settings, "ivy.resolved.configurations");
@@ -175,7 +175,7 @@ public class PluginReport extends Abstra
             XMLEasyAntReportWriter writer = new XMLEasyAntReportWriter();
             writer.output(easyantReport, stream);
             stream.close();
-            genStyled(reportFile, getReportStylePath(),easyantReport);
+            genStyled(reportFile, getReportStylePath(), easyantReport);
         } catch (Exception e) {
             throw new BuildException("impossible to generate report: " + e, e);
         }
@@ -192,17 +192,18 @@ public class PluginReport extends Abstra
         // style should be a file (and not an url)
         // so we have to copy it from classpath to cache
         ResolutionCacheManager cacheMgr = getEasyAntIvyInstance().getResolutionCacheManager();
-        File style = new File(cacheMgr.getResolutionCacheRoot(), "ivy-report.xsl");
+        File style = new File(cacheMgr.getResolutionCacheRoot(), "easyant-report.xsl");
         if (!style.exists()) {
-            Message.debug("copying ivy-report.xsl to " + style.getAbsolutePath());
-            FileUtil.copy(XMLEasyAntReportWriter.class.getResourceAsStream("ivy-report.xsl"), style, null);
+            Message.debug("copying easyant-report.xsl to " + style.getAbsolutePath());
+            FileUtil.copy(XMLEasyAntReportWriter.class.getResourceAsStream("easyant-report.xsl"), style, null);
         }
         return style;
     }
 
     private String getOutputPattern(ModuleRevisionId moduleRevisionId, String conf, String ext) {
-        return IvyPatternHelper.substitute(outputpattern, moduleRevisionId.getOrganisation(), moduleRevisionId.getName(),
-                moduleRevisionId.getRevision(), "", "", ext, conf, moduleRevisionId.getQualifiedExtraAttributes(), null);
+        return IvyPatternHelper.substitute(outputpattern, moduleRevisionId.getOrganisation(),
+                moduleRevisionId.getName(), moduleRevisionId.getRevision(), "", "", ext, conf,
+                moduleRevisionId.getQualifiedExtraAttributes(), null);
     }
 
     private void genStyled(File reportFile, File style, EasyAntReport easyantReport) throws IOException {

Modified: incubator/easyant/core/trunk/src/main/resources/org/apache/easyant/core/report/easyant-report.xsl
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/resources/org/apache/easyant/core/report/easyant-report.xsl?rev=1384943&r1=1384942&r2=1384943&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/resources/org/apache/easyant/core/report/easyant-report.xsl (original)
+++ incubator/easyant/core/trunk/src/main/resources/org/apache/easyant/core/report/easyant-report.xsl Fri Sep 14 21:54:54 2012
@@ -18,7 +18,6 @@
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ea="antlib:org.apache.easyant">
 
-    <xsl:param name="confs" select="/easyant-report/info/@confs" />
     <xsl:param name="extension" select="'xml'" />
 
 
@@ -26,7 +25,8 @@
     <xsl:variable name="mymod" select="/easyant-report/info/@module" />
     <xsl:variable name="myconf" select="/easyant-report/info/@conf" />
 
-    <xsl:variable name="modules" select="/easyant-report/dependencies/module" />
+    <xsl:variable name="modules"
+        select="/easyant-report/dependencies/module" />
     <xsl:variable name="conflicts" select="$modules[count(revision) > 1]" />
 
     <xsl:variable name="revisions" select="$modules/revision" />
@@ -41,6 +41,7 @@
     <xsl:variable name="faileds" select="$artifacts[@status='failed']" />
     <xsl:variable name="artifactsok" select="$artifacts[@status!='failed']" />
 
+    <xsl:variable name="configurations" select="/easyant-report/configurations" />
     <xsl:variable name="easyant" select="/easyant-report/easyant" />
     <xsl:variable name="targets" select="$easyant/targets" />
     <xsl:variable name="extensionPoints" select="$easyant/extension-points" />
@@ -82,8 +83,10 @@
                         <xsl:call-template name="called">
                             <xsl:with-param name="callstack"
                                 select="concat($org, string('/'), $mod)" />
-                            <xsl:with-param name="indent" select="string('')" />
-                            <xsl:with-param name="revision" select=".." />
+                            <xsl:with-param name="indent"
+                                select="string('')" />
+                            <xsl:with-param name="revision"
+                                select=".." />
                         </xsl:call-template>
                     </xsl:for-each>
                 </tbody>
@@ -106,7 +109,8 @@
             <td>
                 <xsl:element name="a">
                     <xsl:attribute name="href">#<xsl:value-of
-                        select="$organisation" />-<xsl:value-of select="$module" /></xsl:attribute>
+                        select="$organisation" />-<xsl:value-of
+                        select="$module" /></xsl:attribute>
                     <xsl:value-of select="concat($indent, ' ')" />
                     <xsl:value-of select="$module" />
                     by
@@ -116,7 +120,8 @@
             <td>
                 <xsl:element name="a">
                     <xsl:attribute name="href">#<xsl:value-of
-                        select="$organisation" />-<xsl:value-of select="$module" />-<xsl:value-of
+                        select="$organisation" />-<xsl:value-of
+                        select="$module" />-<xsl:value-of
                         select="$rev" /></xsl:attribute>
                     <xsl:value-of select="$rev" />
                 </xsl:element>
@@ -132,7 +137,8 @@
             </td>
             <td align="center">
                 <xsl:call-template name="licenses">
-                    <xsl:with-param name="revision" select="$revision" />
+                    <xsl:with-param name="revision"
+                        select="$revision" />
                 </xsl:call-template>
             </td>
             <td align="center">
@@ -142,7 +148,8 @@
             </td>
             <td align="center">
                 <xsl:call-template name="icons">
-                    <xsl:with-param name="revision" select="$revision" />
+                    <xsl:with-param name="revision"
+                        select="$revision" />
                 </xsl:call-template>
             </td>
         </tr>
@@ -156,7 +163,8 @@
                             select="concat($callstack, string('#'), $organisation, string('/'), $module)" />
                         <xsl:with-param name="indent"
                             select="concat($indent, string('---'))" />
-                        <xsl:with-param name="revision" select=".." />
+                        <xsl:with-param name="revision"
+                            select=".." />
                     </xsl:call-template>
                 </xsl:for-each>
             </xsl:if>
@@ -184,12 +192,12 @@
     <xsl:template name="icons">
         <xsl:param name="revision" />
         <xsl:if test="$revision/@searched = 'true'">
-            <img src="http://ant.apache.org/ivy/images/searched.gif" alt="searched"
-                title="required a search in repository" />
+            <img src="http://ant.apache.org/ivy/images/searched.gif"
+                alt="searched" title="required a search in repository" />
         </xsl:if>
         <xsl:if test="$revision/@downloaded = 'true'">
-            <img src="http://ant.apache.org/ivy/images/downloaded.gif" alt="downloaded"
-                title="downloaded from repository" />
+            <img src="http://ant.apache.org/ivy/images/downloaded.gif"
+                alt="downloaded" title="downloaded from repository" />
         </xsl:if>
         <xsl:if test="$revision/@evicted">
             <xsl:element name="img">
@@ -218,7 +226,8 @@
             <td>
                 <xsl:element name="a">
                     <xsl:attribute name="href">#<xsl:value-of
-                        select="$organisation" />-<xsl:value-of select="$module" /></xsl:attribute>
+                        select="$organisation" />-<xsl:value-of
+                        select="$module" /></xsl:attribute>
                     <xsl:value-of select="$module" />
                     by
                     <xsl:value-of select="$organisation" />
@@ -227,7 +236,8 @@
             <td>
                 <xsl:element name="a">
                     <xsl:attribute name="href">#<xsl:value-of
-                        select="$organisation" />-<xsl:value-of select="$module" />-<xsl:value-of
+                        select="$organisation" />-<xsl:value-of
+                        select="$module" />-<xsl:value-of
                         select="$revision" /></xsl:attribute>
                     <xsl:value-of select="$revision" />
                 </xsl:element>
@@ -238,556 +248,482 @@
         </tr>
     </xsl:template>
 
-    <xsl:template name="confs">
-        <xsl:param name="configurations" />
-
-        <xsl:if test="contains($configurations, ',')">
-            <xsl:call-template name="conf">
-                <xsl:with-param name="conf"
-                    select="normalize-space(substring-before($configurations,','))" />
-            </xsl:call-template>
-            <xsl:call-template name="confs">
-                <xsl:with-param name="configurations"
-                    select="substring-after($configurations,',')" />
-            </xsl:call-template>
-        </xsl:if>
-        <xsl:if test="not(contains($configurations, ','))">
-            <xsl:call-template name="conf">
-                <xsl:with-param name="conf"
-                    select="normalize-space($configurations)" />
-            </xsl:call-template>
-        </xsl:if>
-    </xsl:template>
-
-    <xsl:template name="conf">
-        <xsl:param name="conf" />
-
-        <li>
-            <xsl:element name="a">
-                <xsl:if test="$conf = $myconf">
-                    <xsl:attribute name="class">active</xsl:attribute>
-                </xsl:if>
-                <xsl:attribute name="href"><xsl:value-of select="$myorg" />-<xsl:value-of
-                    select="$mymod" />-<xsl:value-of select="$conf" />.<xsl:value-of
-                    select="$extension" /></xsl:attribute>
-                <xsl:value-of select="$conf" />
-            </xsl:element>
-        </li>
-    </xsl:template>
-
-    <xsl:template name="date">
-        <xsl:param name="date" />
-
-        <xsl:value-of select="substring($date,1,4)" />
-        -
-        <xsl:value-of select="substring($date,5,2)" />
-        -
-        <xsl:value-of select="substring($date,7,2)" />
-        <xsl:value-of select="' '" />
-        <xsl:value-of select="substring($date,9,2)" />
-        :
-        <xsl:value-of select="substring($date,11,2)" />
-        :
-        <xsl:value-of select="substring($date,13)" />
+    <xsl:template match="configurations">
+        <h2>Ivy Configurations</h2>
+        <table>
+            <thead>
+                <tr>
+                    <th>name</th>
+                    <th>description</th>
+                    <th>extends</th>
+                    <th>visibility</th>
+                    <th>deprecated</th>
+                </tr>
+            </thead>
+            <tbody>
+                <xsl-foreach select="configuration">
+                    <tr>
+                        <td>
+                            <xsl:value-of select="configuration/@name" />
+                        </td>
+                        <td>
+                            <xsl:value-of select="configuration/@description" />
+                        </td>
+                        <td>
+                            <xsl:value-of select="configuration/@extends" />
+                        </td>
+                        <td>
+                            <xsl:value-of select="configuration/@visibility" />
+                        </td>
+                        <td>
+                            <xsl:value-of select="configuration/@deprecated" />
+                        </td>
+                    </tr>
+                </xsl-foreach>
+            </tbody>
+        </table>
     </xsl:template>
 
-
     <xsl:template match="/easyant-report">
 
         <html>
             <head>
                 <title>
-                    Ivy report ::
+                    EasyAnt report ::
                     <xsl:value-of select="info/@module" />
                     by
                     <xsl:value-of select="info/@organisation" />
-                    ::
-                    <xsl:value-of select="info/@conf" />
                 </title>
                 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
                 <meta http-equiv="content-language" content="en" />
                 <meta name="robots" content="index,follow" />
-                <link rel="stylesheet" type="text/css" href="easyant-report.css" />
+                <link rel="stylesheet" type="text/css"
+                    href="http://incubator.apache.org/easyant/style/style.css" />
             </head>
             <body>
-                <div id="logo">
-                    <a href="http://ant.apache.org/ivy/">
-                        <img src="http://ant.apache.org/ivy/logo.png" />
-                    </a>
-                </div>
-                <h1>
-                    <xsl:element name="a">
-                        <xsl:attribute name="name"><xsl:value-of
-                            select="info/@organisation" />-<xsl:value-of select="info/@module" /></xsl:attribute>
-                    </xsl:element>
-                    <span id="module">
-                        <xsl:value-of select="info/@module" />
-                    </span>
-                    by
-                    <span id="organisation">
-                        <xsl:value-of select="info/@organisation" />
-                    </span>
-                </h1>
-                <div id="date">
-                    resolved on
-                    <xsl:call-template name="date">
-                        <xsl:with-param name="date" select="info/@date" />
-                    </xsl:call-template>
-                </div>
-                <ul id="confmenu">
-                    <xsl:call-template name="confs">
-                        <xsl:with-param name="configurations" select="$confs" />
-                    </xsl:call-template>
-                </ul>
-
+                <div id="header" />
                 <div id="content">
-                    <xsl:apply-templates select="easyant" />
-
-                    <h2>Dependencies Stats</h2>
-                    <table class="header">
-                        <tr>
-                            <td class="title">Modules</td>
-                            <td class="value">
-                                <xsl:value-of select="count($modules)" />
-                            </td>
-                        </tr>
-                        <tr>
-                            <td class="title">Revisions</td>
-                            <td class="value">
-                                <xsl:value-of select="count($revisions)" />
-                                (
-                                <xsl:value-of select="count($searcheds)" />
-                                searched
-                                <img src="http://ant.apache.org/ivy/images/searched.gif"
-                                    alt="searched"
-                                    title="module revisions which required a search with a dependency resolver to be resolved" />
-                                ,
-                                <xsl:value-of select="count($downloadeds)" />
-                                downloaded
-                                <img src="http://ant.apache.org/ivy/images/downloaded.gif"
-                                    alt="downloaded"
-                                    title="module revisions for which ivy file was downloaded by dependency resolver" />
-                                ,
-                                <xsl:value-of select="count($evicteds)" />
-                                evicted
-                                <img src="http://ant.apache.org/ivy/images/evicted.gif" alt="evicted"
-                                    title="module revisions which were evicted by others" />
-                                ,
-                                <xsl:value-of select="count($errors)" />
-                                errors
-                                <img src="http://ant.apache.org/ivy/images/error.gif" alt="error"
-                                    title="module revisions on which error occured" />
-                                )
-                            </td>
-                        </tr>
-                        <tr>
-                            <td class="title">Artifacts</td>
-                            <td class="value">
-                                <xsl:value-of select="count($artifacts)" />
-                                (
-                                <xsl:value-of select="count($dlartifacts)" />
-                                downloaded,
-                                <xsl:value-of select="count($faileds)" />
-                                failed)
-                            </td>
-                        </tr>
-                        <tr>
-                            <td class="title">Artifacts size</td>
-                            <td class="value">
-                                <xsl:value-of select="round(sum($artifacts/@size) div 1024)" />
-                                kB
-                                (
-                                <xsl:value-of select="round(sum($dlartifacts/@size) div 1024)" />
-                                kB downloaded,
-                                <xsl:value-of select="round(sum($cacheartifacts/@size) div 1024)" />
-                                kB in cache)
-                            </td>
-                        </tr>
-                    </table>
-
-                    <xsl:if test="count($errors) > 0">
-                        <h2>Errors</h2>
-                        <table class="errors">
-                            <thead>
-                                <tr>
-                                    <th>Module</th>
-                                    <th>Revision</th>
-                                    <th>Error</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                <xsl:for-each select="$errors">
-                                    <xsl:call-template name="error">
-                                        <xsl:with-param name="organisation" select="../@organisation" />
-                                        <xsl:with-param name="module" select="../@name" />
-                                        <xsl:with-param name="revision" select="@name" />
-                                        <xsl:with-param name="error" select="@error" />
-                                    </xsl:call-template>
-                                </xsl:for-each>
-                            </tbody>
-                        </table>
-                    </xsl:if>
-
-                    <xsl:if test="count($conflicts) > 0">
-                        <h2>Conflicts</h2>
-                        <table class="conflicts">
-                            <thead>
-                                <tr>
-                                    <th>Module</th>
-                                    <th>Selected</th>
-                                    <th>Evicted</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                <xsl:for-each select="$conflicts">
-                                    <tr>
-                                        <td>
-                                            <xsl:element name="a">
-                                                <xsl:attribute name="href">#<xsl:value-of
-                                                    select="@organisation" />-<xsl:value-of
-                                                    select="@name" /></xsl:attribute>
-                                                <xsl:value-of select="@name" />
-                                                by
-                                                <xsl:value-of select="@organisation" />
-                                            </xsl:element>
-                                        </td>
-                                        <td>
-                                            <xsl:for-each select="revision[not(@evicted)]">
-                                                <xsl:element name="a">
-                                                    <xsl:attribute name="href">#<xsl:value-of
-                                                        select="../@organisation" />-<xsl:value-of
-                                                        select="../@name" />-<xsl:value-of select="@name" /></xsl:attribute>
-                                                    <xsl:value-of select="@name" />
-                                                </xsl:element>
-                                                <xsl:text> </xsl:text>
-                                            </xsl:for-each>
-                                        </td>
-                                        <td>
-                                            <xsl:for-each select="revision[@evicted]">
-                                                <xsl:element name="a">
-                                                    <xsl:attribute name="href">#<xsl:value-of
-                                                        select="../@organisation" />-<xsl:value-of
-                                                        select="../@name" />-<xsl:value-of select="@name" /></xsl:attribute>
-                                                    <xsl:value-of select="@name" />
-                                                    <xsl:text> </xsl:text>
-                                                    <xsl:value-of select="@evicted-reason" />
-                                                </xsl:element>
-                                                <xsl:text> </xsl:text>
-                                            </xsl:for-each>
-                                        </td>
-                                    </tr>
-                                </xsl:for-each>
-                            </tbody>
-                        </table>
-                    </xsl:if>
-
-                    <h2>Dependencies Overview</h2>
-                    <xsl:call-template name="calling">
-                        <xsl:with-param name="org" select="info/@organisation" />
-                        <xsl:with-param name="mod" select="info/@module" />
-                        <xsl:with-param name="rev" select="info/@revision" />
-                    </xsl:call-template>
+                    <h1>
+                        <xsl:element name="a">
+                            <xsl:attribute name="name"><xsl:value-of
+                                select="info/@organisation" />-<xsl:value-of
+                                select="info/@module" /></xsl:attribute>
+                        </xsl:element>
+                        <span id="module">
+                            <xsl:value-of select="info/@module" />
+                        </span>
+                        by
+                        <span id="organisation">
+                            <xsl:value-of select="info/@organisation" />
+                        </span>
+                    </h1>
+
+                    <h1>Description</h1>
+                    <xsl:value-of select="description" />
+
+                    <h1>Example</h1>
+                    <div id="example">
+                        <pre>
+                            <xsl:text>&lt;ea:plugin organisation="</xsl:text>
+                            <xsl:value-of select="info/@organisation" />
+                            <xsl:text>" module="</xsl:text>
+                            <xsl:value-of select="info/@module" />
+                            <xsl:text>" revision="</xsl:text>
+                            <xsl:value-of select="info/@revision" />
+                            <xsl:text>"/&gt;</xsl:text>
+                        </pre>
+                        <div class="note">
+                            Organisation attribute is optional. If not specified default one will be
+                            used.
+                    </div>
+                        <pre>
+                            <xsl:text>&lt;ea:plugin module="</xsl:text>
+                            <xsl:value-of select="info/@module" />
+                            <xsl:text>" revision="</xsl:text>
+                            <xsl:value-of select="info/@revision" />
+                            <xsl:text>"/&gt;</xsl:text>
+                        </pre>
+                    </div>
+
+                    <div id="details">
+                        <xsl:apply-templates select="easyant" />
+                        <xsl:apply-templates select="configurations" />
+
+                        <h2>Dependencies Overview</h2>
+                        <xsl:call-template name="calling">
+                            <xsl:with-param name="org"
+                                select="info/@organisation" />
+                            <xsl:with-param name="mod"
+                                select="info/@module" />
+                            <xsl:with-param name="rev"
+                                select="info/@revision" />
+                        </xsl:call-template>
 
-                    <h2>Details</h2>
-                    <xsl:for-each select="$modules">
-                        <h3>
-                            <xsl:element name="a">
-                                <xsl:attribute name="name"><xsl:value-of
-                                    select="@organisation" />-<xsl:value-of select="@name" /></xsl:attribute>
-                            </xsl:element>
-                            <xsl:value-of select="@name" />
-                            by
-                            <xsl:value-of select="@organisation" />
-                        </h3>
-                        <xsl:for-each select="revision">
-                            <h4>
+                        <h2>Details</h2>
+                        <xsl:for-each select="$modules">
+                            <h3>
                                 <xsl:element name="a">
                                     <xsl:attribute name="name"><xsl:value-of
-                                        select="../@organisation" />-<xsl:value-of
-                                        select="../@name" />-<xsl:value-of select="@name" /></xsl:attribute>
+                                        select="@organisation" />-<xsl:value-of
+                                        select="@name" /></xsl:attribute>
                                 </xsl:element>
-                                Revision:
                                 <xsl:value-of select="@name" />
-                                <span style="padding-left:15px;">
-                                    <xsl:call-template name="icons">
-                                        <xsl:with-param name="revision" select="." />
-                                    </xsl:call-template>
-                                </span>
-                            </h4>
-                            <h5>Description</h5>
-                            <xsl:copy-of select="description"/>
-                            <table class="header">
-                                <xsl:if test="@homepage">
+                                by
+                                <xsl:value-of select="@organisation" />
+                            </h3>
+                            <xsl:for-each select="revision">
+                                <h4>
+                                    <xsl:element name="a">
+                                        <xsl:attribute
+                                            name="name"><xsl:value-of
+                                            select="../@organisation" />-<xsl:value-of
+                                            select="../@name" />-<xsl:value-of
+                                            select="@name" /></xsl:attribute>
+                                    </xsl:element>
+                                    Revision:
+                                    <xsl:value-of select="@name" />
+                                    <span style="padding-left:15px;">
+                                        <xsl:call-template
+                                            name="icons">
+                                            <xsl:with-param
+                                                name="revision" select="." />
+                                        </xsl:call-template>
+                                    </span>
+                                </h4>
+                                <h5>Description</h5>
+                                <xsl:copy-of select="description" />
+                                <table class="header">
+                                    <xsl:if test="@homepage">
+                                        <tr>
+                                            <td class="title">Home Page</td>
+                                            <td class="value">
+                                                <xsl:element
+                                                    name="a">
+                                                    <xsl:attribute
+                                                        name="href"><xsl:value-of
+                                                        select="@homepage" /></xsl:attribute>
+                                                    <xsl:value-of
+                                                        select="@homepage" />
+                                                </xsl:element>
+                                            </td>
+                                        </tr>
+                                    </xsl:if>
                                     <tr>
-                                        <td class="title">Home Page</td>
+                                        <td class="title">Status</td>
                                         <td class="value">
-                                            <xsl:element name="a">
-                                                <xsl:attribute name="href"><xsl:value-of
-                                                    select="@homepage" /></xsl:attribute>
-                                                <xsl:value-of select="@homepage" />
-                                            </xsl:element>
+                                            <xsl:value-of
+                                                select="@status" />
                                         </td>
                                     </tr>
-                                </xsl:if>
-                                <tr>
-                                    <td class="title">Status</td>
-                                    <td class="value">
-                                        <xsl:value-of select="@status" />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td class="title">Publication</td>
-                                    <td class="value">
-                                        <xsl:value-of select="@pubdate" />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td class="title">Resolver</td>
-                                    <td class="value">
-                                        <xsl:value-of select="@resolver" />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td class="title">Configurations</td>
-                                    <td class="value">
-                                        <xsl:value-of select="@conf" />
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td class="title">Artifacts size</td>
-                                    <td class="value">
-                                        <xsl:value-of select="round(sum(artifacts/artifact/@size) div 1024)" />
-                                        kB
-                                        (
-                                        <xsl:value-of
-                                            select="round(sum(artifacts/artifact[@status='successful']/@size) div 1024)" />
-                                        kB downloaded,
-                                        <xsl:value-of
-                                            select="round(sum(artifacts/artifact[@status='no']/@size) div 1024)" />
-                                        kB in cache)
-                                    </td>
-                                </tr>
-                                <xsl:if test="count(license) > 0">
                                     <tr>
-                                        <td class="title">Licenses</td>
+                                        <td class="title">Publication</td>
                                         <td class="value">
-                                            <xsl:call-template name="licenses">
-                                                <xsl:with-param name="revision" select="." />
-                                            </xsl:call-template>
+                                            <xsl:value-of
+                                                select="@pubdate" />
                                         </td>
                                     </tr>
-                                </xsl:if>
-                                <xsl:if test="@evicted">
                                     <tr>
-                                        <td class="title">Evicted by</td>
+                                        <td class="title">Resolver</td>
                                         <td class="value">
-                                            <b>
-                                                <xsl:for-each select="evicted-by">
-                                                    <xsl:value-of select="@rev" />
-                                                    <xsl:text> </xsl:text>
-                                                </xsl:for-each>
-                                            </b>
-                                            <xsl:text> </xsl:text>
-                                            <b>
-                                                <xsl:value-of select="@evicted-reason" />
-                                            </b>
-                                            in
-                                            <b>
-                                                <xsl:value-of select="@evicted" />
-                                            </b>
-                                            conflict manager
+                                            <xsl:value-of
+                                                select="@resolver" />
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td class="title">Configurations</td>
+                                        <td class="value">
+                                            <xsl:value-of
+                                                select="@conf" />
                                         </td>
                                     </tr>
-                                </xsl:if>
-                            </table>
-                            <h5>Required by</h5>
-                            <table>
-                                <thead>
                                     <tr>
-                                        <th>Organisation</th>
-                                        <th>Name</th>
-                                        <th>Revision</th>
-                                        <th>In Configurations</th>
-                                        <th>Asked Revision</th>
+                                        <td class="title">Artifacts size</td>
+                                        <td class="value">
+                                            <xsl:value-of
+                                                select="round(sum(artifacts/artifact/@size) div 1024)" />
+                                            kB
+                                            (
+                                            <xsl:value-of
+                                                select="round(sum(artifacts/artifact[@status='successful']/@size) div 1024)" />
+                                            kB downloaded,
+                                            <xsl:value-of
+                                                select="round(sum(artifacts/artifact[@status='no']/@size) div 1024)" />
+                                            kB in cache)
+                                        </td>
                                     </tr>
-                                </thead>
-                                <tbody>
-                                    <xsl:for-each select="caller">
+                                    <xsl:if test="count(license) > 0">
                                         <tr>
-                                            <td>
-                                                <xsl:value-of select="@organisation" />
-                                            </td>
-                                            <td>
-                                                <xsl:element name="a">
-                                                    <xsl:attribute name="href">#<xsl:value-of
-                                                        select="@organisation" />-<xsl:value-of
-                                                        select="@name" /></xsl:attribute>
-                                                    <xsl:value-of select="@name" />
-                                                </xsl:element>
+                                            <td class="title">Licenses</td>
+                                            <td class="value">
+                                                <xsl:call-template
+                                                    name="licenses">
+                                                    <xsl:with-param
+                                                        name="revision"
+                                                        select="." />
+                                                </xsl:call-template>
                                             </td>
-                                            <td>
-                                                <xsl:value-of select="@callerrev" />
-                                            </td>
-                                            <td>
-                                                <xsl:value-of select="@conf" />
-                                            </td>
-                                            <td>
-                                                <xsl:value-of select="@rev" />
+                                        </tr>
+                                    </xsl:if>
+                                    <xsl:if test="@evicted">
+                                        <tr>
+                                            <td class="title">Evicted by</td>
+                                            <td class="value">
+                                                <b>
+                                                    <xsl:for-each
+                                                        select="evicted-by">
+                                                        <xsl:value-of
+                                                            select="@rev" />
+                                                        <xsl:text> </xsl:text>
+                                                    </xsl:for-each>
+                                                </b>
+                                                <xsl:text> </xsl:text>
+                                                <b>
+                                                    <xsl:value-of
+                                                        select="@evicted-reason" />
+                                                </b>
+                                                in
+                                                <b>
+                                                    <xsl:value-of
+                                                        select="@evicted" />
+                                                </b>
+                                                conflict manager
                                             </td>
                                         </tr>
-                                    </xsl:for-each>
-                                </tbody>
-                            </table>
-                            <xsl:if test="not(@evicted)">
-
-                                <h5>Dependencies</h5>
-                                <xsl:call-template name="calling">
-                                    <xsl:with-param name="org" select="../@organisation" />
-                                    <xsl:with-param name="mod" select="../@name" />
-                                    <xsl:with-param name="rev" select="@name" />
-                                </xsl:call-template>
-                                <h5>Artifacts</h5>
-                                <xsl:if test="count(artifacts/artifact) = 0">
-                                    <table>
+                                    </xsl:if>
+                                </table>
+                                <h5>Required by</h5>
+                                <table>
+                                    <thead>
                                         <tr>
-                                            <td>
-                                                No artifact
-        </td>
+                                            <th>Organisation</th>
+                                            <th>Name</th>
+                                            <th>Revision</th>
+                                            <th>In Configurations</th>
+                                            <th>Asked Revision</th>
                                         </tr>
-                                    </table>
-                                </xsl:if>
-                                <xsl:if test="count(artifacts/artifact) > 0">
-                                    <table>
-                                        <thead>
+                                    </thead>
+                                    <tbody>
+                                        <xsl:for-each
+                                            select="caller">
                                             <tr>
-                                                <th>Name</th>
-                                                <th>Type</th>
-                                                <th>Ext</th>
-                                                <th>Download</th>
-                                                <th>Size</th>
+                                                <td>
+                                                    <xsl:value-of
+                                                        select="@organisation" />
+                                                </td>
+                                                <td>
+                                                    <xsl:element
+                                                        name="a">
+                                                        <xsl:attribute
+                                                            name="href">#<xsl:value-of
+                                                            select="@organisation" />-<xsl:value-of
+                                                            select="@name" /></xsl:attribute>
+                                                        <xsl:value-of
+                                                            select="@name" />
+                                                    </xsl:element>
+                                                </td>
+                                                <td>
+                                                    <xsl:value-of
+                                                        select="@callerrev" />
+                                                </td>
+                                                <td>
+                                                    <xsl:value-of
+                                                        select="@conf" />
+                                                </td>
+                                                <td>
+                                                    <xsl:value-of
+                                                        select="@rev" />
+                                                </td>
                                             </tr>
-                                        </thead>
-                                        <tbody>
-                                            <xsl:for-each select="artifacts/artifact">
+                                        </xsl:for-each>
+                                    </tbody>
+                                </table>
+                                <xsl:if test="not(@evicted)">
+
+                                    <h5>Dependencies</h5>
+                                    <xsl:call-template
+                                        name="calling">
+                                        <xsl:with-param
+                                            name="org" select="../@organisation" />
+                                        <xsl:with-param
+                                            name="mod" select="../@name" />
+                                        <xsl:with-param
+                                            name="rev" select="@name" />
+                                    </xsl:call-template>
+                                    <h5>Artifacts</h5>
+                                    <xsl:if
+                                        test="count(artifacts/artifact) = 0">
+                                        <table>
+                                            <tr>
+                                                <td>No artifact</td>
+                                            </tr>
+                                        </table>
+                                    </xsl:if>
+                                    <xsl:if
+                                        test="count(artifacts/artifact) > 0">
+                                        <table>
+                                            <thead>
                                                 <tr>
-                                                    <td>
-                                                        <xsl:value-of select="@name" />
-                                                    </td>
-                                                    <td>
-                                                        <xsl:value-of select="@type" />
-                                                    </td>
-                                                    <td>
-                                                        <xsl:value-of select="@ext" />
-                                                    </td>
-                                                    <td align="center">
-                                                        <xsl:value-of select="@status" />
-                                                    </td>
-                                                    <td align="center">
-                                                        <xsl:value-of select="round(number(@size) div 1024)" />
-                                                        kB
-                                                    </td>
+                                                    <th>Name</th>
+                                                    <th>Type</th>
+                                                    <th>Ext</th>
+                                                    <th>Download</th>
+                                                    <th>Size</th>
                                                 </tr>
-                                            </xsl:for-each>
-                                        </tbody>
-                                    </table>
-                                </xsl:if>
+                                            </thead>
+                                            <tbody>
+                                                <xsl:for-each
+                                                    select="artifacts/artifact">
+                                                    <tr>
+                                                        <td>
+                                                            <xsl:value-of
+                                                                select="@name" />
+                                                        </td>
+                                                        <td>
+                                                            <xsl:value-of
+                                                                select="@type" />
+                                                        </td>
+                                                        <td>
+                                                            <xsl:value-of
+                                                                select="@ext" />
+                                                        </td>
+                                                        <td align="center">
+                                                            <xsl:value-of
+                                                                select="@status" />
+                                                        </td>
+                                                        <td align="center">
+                                                            <xsl:value-of
+                                                                select="round(number(@size) div 1024)" />
+                                                            kB
+                                                        </td>
+                                                    </tr>
+                                                </xsl:for-each>
+                                            </tbody>
+                                        </table>
+                                    </xsl:if>
 
-                            </xsl:if>
-                            <xsl:apply-templates select="easyant" />
+                                </xsl:if>
+                                <xsl:apply-templates
+                                    select="easyant" />
+                            </xsl:for-each>
                         </xsl:for-each>
-                    </xsl:for-each>
+                    </div>
                 </div>
             </body>
         </html>
     </xsl:template>
 
     <xsl:template match="easyant">
-        <h2>Available targets</h2>
-        <table>
-            <thead>
-                <tr>
-                    <th>target name</th>
-                    <th>description</th>
-                    <th>extension point</th>
-                    <th>depends</th>
-                </tr>
-            </thead>
-            <tbody>
-                <xsl:apply-templates select="targets/target" />
-            </tbody>
-        </table>
+        <xsl:if test="count(targets/target) > 0">
+            <h2>Available targets</h2>
+            <table>
+                <thead>
+                    <tr>
+                        <th>target name</th>
+                        <th>description</th>
+                        <th>extension point</th>
+                        <th>depends</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <xsl:apply-templates select="targets/target" />
+                </tbody>
+            </table>
+        </xsl:if>
 
-        <h2>Available extension points</h2>
-        <table>
-            <thead>
-                <tr>
-                    <th>target name</th>
-                    <th>description</th>
-                    <th>depends</th>
-                </tr>
-            </thead>
-            <tbody>
-                <xsl:apply-templates select="extension-points/extension-point" />
-            </tbody>
-        </table>
+        <xsl:if test="count(extension-points/extension-point) > 0">
+            <h2>Available extension points</h2>
+            <table>
+                <thead>
+                    <tr>
+                        <th>target name</th>
+                        <th>description</th>
+                        <th>depends</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <xsl:apply-templates
+                        select="extension-points/extension-point" />
+                </tbody>
+            </table>
+        </xsl:if>
 
-        <h2>Imported module</h2>
-        <table>
-            <thead>
-                <tr>
-                    <th>Module revision id</th>
-                    <th>Import type</th>
-                    <th>prefix</th>
-                </tr>
-            </thead>
-            <tbody>
-                <xsl:apply-templates select="imports/import" />
-            </tbody>
-        </table>
-        
-        <h2>Module parameters</h2>
-        <h3>Properties</h3>
-        <table>
-            <thead>
-                <tr>
-                    <th>property</th>
-                    <th>description</th>
-                    <th>required</th>
-                    <th>default value</th>
-                </tr>
-            </thead>
-            <tbody>
-                <xsl:for-each select="properties/property">
+        <xsl:if test="count(imports/import) > 0">
+            <h2>Imported module</h2>
+            <table>
+                <thead>
                     <tr>
-                        <td><xsl:value-of select="@name"/></td>
-                        <td><xsl:value-of select="@description"/></td>
-                        <td><xsl:value-of select="@required"/></td>
-                        <td><xsl:value-of select="@default"/></td>
+                        <th>Module revision id</th>
+                        <th>Import type</th>
+                        <th>prefix</th>
                     </tr>
-                </xsl:for-each>
-            </tbody>
-        </table>
-        
-        <h3>Paths</h3>
-        <table>
-            <thead>
-                <tr>
-                    <th>path</th>
-                    <th>description</th>
-                    <th>required</th>
-                </tr>
-            </thead>
-            <tbody>
-                <xsl:for-each select="parameters/path">
+                </thead>
+                <tbody>
+                    <xsl:apply-templates select="imports/import" />
+                </tbody>
+            </table>
+        </xsl:if>
+
+        <xsl:if test="count(properties/property) > 0">
+            <h2>Module parameters</h2>
+            <h3>Properties</h3>
+            <table>
+                <thead>
                     <tr>
-                        <td><xsl:value-of select="@name"/></td>
-                        <td><xsl:value-of select="@description"/></td>
-                        <td><xsl:value-of select="@required"/></td>
+                        <th>property</th>
+                        <th>description</th>
+                        <th>required</th>
+                        <th>default value</th>
                     </tr>
-                </xsl:for-each>
-            </tbody>
-        </table>
-        
+                </thead>
+                <tbody>
+                    <xsl:for-each select="properties/property">
+                        <tr>
+                            <td>
+                                <xsl:value-of select="@name" />
+                            </td>
+                            <td>
+                                <xsl:value-of select="@description" />
+                            </td>
+                            <td>
+                                <xsl:value-of select="@required" />
+                            </td>
+                            <td>
+                                <xsl:value-of select="@default" />
+                            </td>
+                        </tr>
+                    </xsl:for-each>
+                </tbody>
+            </table>
+        </xsl:if>
+
+        <xsl:if test="count(parameters/parameter) > 0">
+            <h3>Paths</h3>
+            <table>
+                <thead>
+                    <tr>
+                        <th>path</th>
+                        <th>description</th>
+                        <th>required</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <xsl:for-each select="parameters/path">
+                        <tr>
+                            <td>
+                                <xsl:value-of select="@name" />
+                            </td>
+                            <td>
+                                <xsl:value-of select="@description" />
+                            </td>
+                            <td>
+                                <xsl:value-of select="@required" />
+                            </td>
+                        </tr>
+                    </xsl:for-each>
+                </tbody>
+            </table>
+        </xsl:if>
+
     </xsl:template>
 
     <xsl:template match="target">
@@ -807,7 +743,7 @@
         </tr>
     </xsl:template>
 
-    <xsl:template match="phases/phase">
+    <xsl:template match="extension-points/extension-point">
         <tr>
             <td>
                 <xsl:value-of select="@name" />
@@ -828,9 +764,13 @@
                 <xsl:element name="a">
                     <xsl:attribute name="href"><xsl:value-of
                         select="@name" /><xsl:text>.html</xsl:text></xsl:attribute>
-                    <xsl:value-of select="@organisation" />#<xsl:value-of select="@name" />;<xsl:value-of select="@revision" />
+                    <xsl:value-of select="@organisation" />
+                    #
+                    <xsl:value-of select="@name" />
+                    ;
+                    <xsl:value-of select="@revision" />
                 </xsl:element>
-                
+
             </td>
             <td>
                 <xsl:value-of select="@type" />



Mime
View raw message