You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2014/02/16 14:04:47 UTC

svn commit: r1568757 [3/3] - in /poi: site/src/documentation/content/xdocs/ site/src/documentation/content/xdocs/dtd/ site/src/documentation/resources/stylesheets/ trunk/

Added: poi/site/src/documentation/resources/stylesheets/changes2document.xsl
URL: http://svn.apache.org/viewvc/poi/site/src/documentation/resources/stylesheets/changes2document.xsl?rev=1568757&view=auto
==============================================================================
--- poi/site/src/documentation/resources/stylesheets/changes2document.xsl (added)
+++ poi/site/src/documentation/resources/stylesheets/changes2document.xsl Sun Feb 16 13:04:47 2014
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0">
+
+ <xsl:import href="copyover.xsl"/>
+ 
+ <xsl:param name="bugtracking-url"/>
+
+ <!-- FIXME (JJP):  bugzilla is hardwired -->
+ <xsl:variable name="bugzilla">http://issues.apache.org/bugzilla/</xsl:variable>
+ <xsl:variable name="buglist" select="concat($bugzilla, 'buglist.cgi?bug_id=')"/>
+
+ <xsl:template match="/">
+  <xsl:apply-templates select="//changes"/>
+ </xsl:template>
+ 
+ <xsl:template match="changes">
+  <document>
+   <header>
+    <title>History of Changes</title>
+   </header>
+   <body>
+    <p><link href="changes.rss"><img src="images/rss.png" alt="RSS"/></link></p>    
+    <xsl:apply-templates/>
+   </body>
+  </document>
+ </xsl:template>
+
+ <xsl:template match="release">
+  <section id="{@version}">
+   <title>Version <xsl:value-of select="@version"/> (<xsl:value-of select="@date"/>)</title>
+   <ul>
+    <xsl:apply-templates/>
+   </ul>
+  </section>
+ </xsl:template>
+
+ <xsl:template match="action">
+  <li>
+   <icon src="images/{@type}.jpg" alt="{@type}"/>
+
+   <xsl:text> </xsl:text>
+
+   <xsl:if test="@fixes-bug">
+    <xsl:choose>
+     <xsl:when test="contains(@fixes-bug, ',')">
+      <link href="{$buglist}{translate(normalize-space(@fixes-bug),' ','')}">
+       <xsl:text></xsl:text><xsl:value-of select="normalize-space(@fixes-bug)"/>
+      </link>
+     </xsl:when>
+     <xsl:otherwise>
+      <link href="{$bugtracking-url}{@fixes-bug}">
+       <xsl:text></xsl:text><xsl:value-of select="@fixes-bug"/>
+      </link>
+     </xsl:otherwise>
+    </xsl:choose>
+    <xsl:text> - </xsl:text>
+   </xsl:if>
+
+   <xsl:apply-templates/>
+
+   <xsl:if test="@due-to and @due-to!=''">
+    <xsl:text> Thanks to </xsl:text>
+    <xsl:choose>
+     <xsl:when test="@due-to-email and @due-to-email!=''">
+      <link href="mailto:{@due-to-email}">
+       <xsl:value-of select="@due-to"/>
+      </link>
+     </xsl:when>
+     <xsl:otherwise>
+      <xsl:value-of select="@due-to"/>
+     </xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>.</xsl:text>
+   </xsl:if>
+
+  </li>
+ </xsl:template>
+
+</xsl:stylesheet>

Added: poi/site/src/documentation/resources/stylesheets/changes2rss.xsl
URL: http://svn.apache.org/viewvc/poi/site/src/documentation/resources/stylesheets/changes2rss.xsl?rev=1568757&view=auto
==============================================================================
--- poi/site/src/documentation/resources/stylesheets/changes2rss.xsl (added)
+++ poi/site/src/documentation/resources/stylesheets/changes2rss.xsl Sun Feb 16 13:04:47 2014
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <xsl:param name="config-file">../../skinconf.xml</xsl:param>
+    <xsl:variable name="config" select="document($config-file)/skinconfig" />
+    <xsl:variable name="changes-url" select="concat($config/project-url, 'changes.html')" />
+
+    <xsl:template match="changes">
+        <rss version="0.91">
+            <channel>
+                <title>
+                    <xsl:value-of select="$config/project-name" />
+                    <xsl:text> Changes</xsl:text>
+                </title>
+
+                <link>
+                    <xsl:value-of select="$changes-url" />
+                </link>
+
+                <description>
+                    <xsl:value-of select="$config/project-name" />
+                    <xsl:text> Changes</xsl:text>
+                </description>
+
+                <language>en-us</language>
+
+                <xsl:apply-templates select="release[1]/action"/> 
+            </channel>
+        </rss>
+    </xsl:template>
+
+    <xsl:template match="action">
+        <item>
+            <title>
+                <xsl:value-of select="@context" />
+                <xsl:text> </xsl:text>
+                <xsl:value-of select="@type" />
+
+                <xsl:if test="@fixes-bug">
+                    <xsl:text>(bug </xsl:text>
+                    <xsl:value-of select="@fixes-bug" />
+                    <xsl:text>)</xsl:text>
+                </xsl:if>
+
+            </title>
+
+            <link>
+                <xsl:value-of select="$changes-url" />
+            </link>
+
+            <description>
+                <xsl:value-of select="@context" />
+                <xsl:text> </xsl:text>
+                <xsl:value-of select="@type" />
+                <xsl:text> by </xsl:text>
+                <xsl:value-of select="//devs/person[@id=current()/@dev]/@name" />
+                <xsl:if test="@fixes-bug">
+                    <xsl:text> (bug </xsl:text>
+                    <xsl:value-of select="@fixes-bug" />
+                    <xsl:text>)</xsl:text>
+                </xsl:if>
+                <xsl:text> - </xsl:text>
+                <xsl:value-of select="." />
+                <xsl:if test="@due-to">
+                    <xsl:text> Thanks to </xsl:text>
+                    <xsl:value-of select="@due-to" />
+                    <xsl:text>.</xsl:text>
+                </xsl:if>
+            </description>
+        </item>
+    </xsl:template>
+</xsl:stylesheet>
+

Modified: poi/trunk/forrest.properties
URL: http://svn.apache.org/viewvc/poi/trunk/forrest.properties?rev=1568757&r1=1568756&r2=1568757&view=diff
==============================================================================
--- poi/trunk/forrest.properties (original)
+++ poi/trunk/forrest.properties Sun Feb 16 13:04:47 2014
@@ -14,6 +14,8 @@ forrest.echo=true 
 #project.skin=krysalis-site
 project.skin=poi-site
 
+project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
+
 ##############
 # layout properties
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org