incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r615017 - in /incubator/public/trunk: audit/summary-txt.xsl audit/summary-web.xsl build.xml
Date Thu, 24 Jan 2008 21:45:28 GMT
Author: rdonkin
Date: Thu Jan 24 13:45:26 2008
New Revision: 615017

URL: http://svn.apache.org/viewvc?rev=615017&view=rev
Log:
Transform results using Ant

Added:
    incubator/public/trunk/audit/summary-txt.xsl
    incubator/public/trunk/audit/summary-web.xsl
Modified:
    incubator/public/trunk/build.xml

Added: incubator/public/trunk/audit/summary-txt.xsl
URL: http://svn.apache.org/viewvc/incubator/public/trunk/audit/summary-txt.xsl?rev=615017&view=auto
==============================================================================
--- incubator/public/trunk/audit/summary-txt.xsl (added)
+++ incubator/public/trunk/audit/summary-txt.xsl Thu Jan 24 13:45:26 2008
@@ -0,0 +1,35 @@
+<?xml version='1.0'?>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method='text' encoding='iso-8859-1' />
+
+  <xsl:template match='changes'>
+Audit Report: <xsl:value-of select='@from' /> -> <xsl:value-of select='@to' />
+======================================
+<xsl:choose>
+  <xsl:when test='count(descendant::added/document) + count(descendant::modified/document)
+ count(descendant::missing/document) > 0 '>
+ * <xsl:value-of select='count(descendant::added/document)'/> files were added
+ * <xsl:value-of select='count(descendant::modified/document)'/> files were modified
+ * <xsl:value-of select='count(descendant::missing/document)'/> files were deleted
+ 
+For details see http://incubator.apache.org/audit/changes-<xsl:value-of select='@to' />.html
+ </xsl:when>
+  <xsl:otherwise>
+Move along! Nothing to see here!
+  </xsl:otherwise>
+</xsl:choose>
+  </xsl:template>
+</xsl:stylesheet>

Added: incubator/public/trunk/audit/summary-web.xsl
URL: http://svn.apache.org/viewvc/incubator/public/trunk/audit/summary-web.xsl?rev=615017&view=auto
==============================================================================
--- incubator/public/trunk/audit/summary-web.xsl (added)
+++ incubator/public/trunk/audit/summary-web.xsl Thu Jan 24 13:45:26 2008
@@ -0,0 +1,137 @@
+<?xml version='1.0'?>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method='xml' indent='yes' encoding='UTF-8' />
+
+  <xsl:template match='changes'>
+    <xsl:comment>
+      Licensed under the Apache License, Version 2.0 (the "License");
+      you may not use this file except in compliance with the License.
+      You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+      Unless required by applicable law or agreed to in writing,
+      software distributed under the License is distributed on an "AS
+      IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+      express or implied. See the License for the specific language
+      governing permissions and limitations under the License.
+    </xsl:comment>
+    <document>
+      <properties>
+        <title>
+          Audit Report For
+          <xsl:value-of select='@to' />
+        </title>
+        <atom
+          url="http://mail-archives.apache.org/mod_mbox/incubator-general/?format=atom">
+          general@incubator.apache.org Archives
+        </atom>
+        <link href="http://purl.org/DC/elements/1.0/" rel="schema.DC" />
+      </properties>
+      <body>
+        <section id='Overview'>
+          <title>Overview</title>
+          <p>
+            This report audits the changes made from
+            <xsl:value-of select='@from' />
+            till
+            <xsl:value-of select='@to' />
+            in:
+          </p>
+          <ul>
+            <li>
+              <a href='http://www.apache.org/dist/incubator'>
+                www.apache.org/dist/incubator
+              </a>
+            </li>
+            <li>
+              <a href='http://archive.apache.org/dist/incubator'>
+                archive.apache.org/dist/incubator
+              </a>
+            </li>
+          </ul>
+        </section>
+        <section id='summary'><title>Summary</title>
+          <ul>
+          <li><xsl:value-of select='count(descendant::added/document)'/> files
were <a href='#added'>added</a></li>
+          <li><xsl:value-of select='count(descendant::modified/document)'/> files
were <a href='#modified'>modified</a></li>
+          <li><xsl:value-of select='count(descendant::missing/document)'/> files
were <a href='#deleted'>deleted</a></li>
+          </ul>
+        </section>
+        <section id='details'><title>Details</title>
+          <section id='added'><title>Modified</title>
+            <ul>
+              <xsl:for-each select='modified/document'>
+                <xsl:sort
+                  select="@dir"
+                  data-type = "text"
+                  order = "ascending"
+                  case-order = "lower-first"/>
+                <xsl:sort
+                  select="@name"
+                  data-type = "text"
+                  order = "ascending"
+                  case-order = "lower-first"/>
+                <li>
+                <strong><xsl:value-of select="@name"/></strong> in <xsl:value-of
select="@dir"/>
+                </li>
+              </xsl:for-each>
+            </ul>
+          </section>
+          <section id='added'><title>Added</title>
+            <ul>
+              <xsl:for-each select='added/document'>
+                <xsl:sort
+                  select="@dir"
+                  data-type = "text"
+                  order = "ascending"
+                    case-order = "lower-first"/>
+                <xsl:sort
+                  select="@name"
+                  data-type = "text"
+                  order = "ascending"
+                  case-order = "lower-first"/>
+                <li>
+                <strong><xsl:value-of select="@name"/></strong> in <xsl:value-of
select="@dir"/>
+                </li>
+              </xsl:for-each>
+            </ul>
+          </section>
+          <section id='deleted'><title>Deleted</title>
+            <ul>
+              <xsl:for-each select='missing/document'>
+              <xsl:sort
+                  select="@dir"
+                  data-type = "text"
+                  order = "ascending"
+                  case-order = "lower-first"/>
+             <xsl:sort
+                  select="@name"
+                  data-type = "text"
+                  order = "ascending"
+                  case-order = "lower-first"/>
+                <li>
+                <strong><xsl:value-of select="@name"/></strong> in <xsl:value-of
select="@dir"/>
+                </li>
+              </xsl:for-each>
+            </ul>
+          </section>
+        </section>
+      </body>
+    </document>
+  </xsl:template>
+</xsl:stylesheet>

Modified: incubator/public/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/public/trunk/build.xml?rev=615017&r1=615016&r2=615017&view=diff
==============================================================================
--- incubator/public/trunk/build.xml (original)
+++ incubator/public/trunk/build.xml Thu Jan 24 13:45:26 2008
@@ -66,4 +66,27 @@
     <target name="fix">    
         <fixcrlf srcdir="${docs.dest}" includes="**/*.html"/> 
     </target>    
+	
+	<!--
+Audit Tasks
+===========
+	-->
+
+	<target name='audit-reports' description='Generates web report'>
+		<tstamp>
+		    <format property="ISO_TODAY" pattern="yyyy-MM-dd" locale="en,GMT"/>
+		</tstamp>
+		<echo>${ISO_TODAY}</echo>
+		<delete file="site-author/audit/changes-${ISO_TODAY}.txt"/>
+		<xslt 
+			style="audit/summary-txt.xsl" 
+			in='audit/changes-${ISO_TODAY}.xml'
+			out='site-author/audit/changes-${ISO_TODAY}.txt'></xslt>
+		<delete file="site-author/audit/changes-${ISO_TODAY}.xml"/>
+		<xslt 
+			style="audit/summary-web.xsl" 
+			in='audit/changes-${ISO_TODAY}.xml'
+			out='site-author/audit/changes-${ISO_TODAY}.xml'></xslt>
+		<antcall target="docs"></antcall>
+	</target>
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message