Added: xmlbeans/site/src/documentation/resources/stylesheets/status2document.xsl
URL: 
http://svn.apache.org/viewvc/xmlbeans/site/src/documentation/resources/stylesheets/status2document.xsl?rev=1835346&view=auto
==============================================================================
--- xmlbeans/site/src/documentation/resources/stylesheets/status2document.xsl 
(added)
+++ xmlbeans/site/src/documentation/resources/stylesheets/status2document.xsl 
Sun Jul  8 10:12:46 2018
@@ -0,0 +1,191 @@
+<?xml version="1.0"?>
+<!--
+   ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+        version="1.0">
+
+    <xsl:param 
name="bugtracking-url">https://issues.apache.org/jira/</xsl:param>
+    <!-- FIXME : Get the Github URL from properties -->
+    <xsl:variable name="github-url" 
select="'https://github.com/apache/xmlbeans'"/>
+
+    <xsl:variable name="bugdetails" select="concat($bugtracking-url, 
'browse/')"/>
+    <xsl:variable name="buglist" select="concat($bugtracking-url, 
'issues/?jql=issuekey%20in%20(')"/>
+
+    <xsl:template match="link">
+        <!-- FIXME! This doesn't work for href or name. Use the externally 
defined link->a transform if possible -->
+        <link href="{@href}"><xsl:apply-templates/></link>
+    </xsl:template>
+
+    <!-- usage: <bug num="12345"/> or <bug num="12345,12346"/> or <bug 
num="github-12"/> -->
+    <xsl:template match="bug">
+        <xsl:choose>
+            <xsl:when test="contains(@num, ',')">
+                <link href="{$buglist}{translate(normalize-space(@num),' 
','')})">
+                    <xsl:text></xsl:text><xsl:value-of 
select="normalize-space( translate(@num, ',', ' ') )"/>
+                </link>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:choose>
+                    <xsl:when test="contains(@num, 'github-')">
+                        <link 
href="{$github-url}/pull/{translate(@num,'github-','')}">
+                            <xsl:text></xsl:text><xsl:value-of select="@num"/>
+                        </link>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <link href="{$bugdetails}{@num}">
+                            <xsl:text></xsl:text><xsl:value-of select="@num"/>
+                        </link>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template match="devs"/>
+
+    <xsl:template match="changes">
+        <document>
+            <header>
+                <title>History of Changes</title>
+            </header>
+            <body>
+                <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>
+            <xsl:apply-templates/>
+        </section>
+    </xsl:template>
+
+    <xsl:template match="summary">
+        <section>
+            <title>Summary</title>
+            <ul> <!-- create a new list for each noteable change in the 
summary -->
+                <xsl:apply-templates/> <!-- summary-item's -->
+            </ul>
+        </section>
+    </xsl:template>
+
+    <xsl:template match="summary-item">
+        <li>
+            <xsl:apply-templates/>
+        </li>
+    </xsl:template>
+
+    <xsl:template match="actions">
+        <section><title>Changes</title>
+            <table>
+                <colgroup>
+                    <col width="100"/>
+                    <col width="200"/>
+                    <col/>
+                </colgroup>
+                <thead>
+                    <tr>
+                        <th>Type</th>
+                        <th>Bug</th>
+                        <th>Description</th>
+                    </tr>
+                </thead>
+
+                <tbody>
+                    <!-- TODO: sort actions by type -->
+                    <xsl:apply-templates/> <!-- action's -->
+                </tbody>
+
+            </table>
+        </section>
+    </xsl:template>
+
+    <xsl:template match="action">
+        <tr>
+
+            <td style="text-align: center;">
+                <icon src="images/{@type}.png" alt="{@type}" title="{@type}"/>
+            </td>
+
+            <td>
+                <!-- TODO: duplicate code. replace with the <xsl:template 
match="bug"/> defined above -->
+                <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( translate(@fixes-bug, ',', ' ') )"/>
+                            </link>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:choose>
+                                <xsl:when test="contains(@fixes-bug, 
'github-')">
+                                    <link 
href="{$github-url}/pull/{translate(@fixes-bug,'github-','')}">
+                                        <xsl:text></xsl:text><xsl:value-of 
select="@fixes-bug"/>
+                                    </link>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <link href="{$bugdetails}{@fixes-bug}">
+                                        <xsl:text></xsl:text><xsl:value-of 
select="@fixes-bug"/>
+                                    </link>
+                                </xsl:otherwise>
+                            </xsl:choose>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:if>
+            </td>
+
+            <td>
+
+                <!-- description: bold any backwards-breaking changes -->
+                <xsl:choose>
+                    <xsl:when test="@breaks-compatibility">
+                        <b>
+                            <xsl:apply-templates/>
+                            <xsl:text> (breaks backwards 
compatibility)</xsl:text>
+                        </b>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:apply-templates/>
+                    </xsl:otherwise>
+                </xsl:choose>
+
+                <!-- thanks -->
+                <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>
+            </td>
+
+        </tr>
+    </xsl:template>
+
+</xsl:stylesheet>

Modified: xmlbeans/site/src/documentation/sitemap.xmap
URL: 
http://svn.apache.org/viewvc/xmlbeans/site/src/documentation/sitemap.xmap?rev=1835346&r1=1835345&r2=1835346&view=diff
==============================================================================
--- xmlbeans/site/src/documentation/sitemap.xmap (original)
+++ xmlbeans/site/src/documentation/sitemap.xmap Sun Jul  8 10:12:46 2018
@@ -19,8 +19,8 @@
   <map:components>
     <map:actions>
       <map:action logger="sitemap.action.sourcetype" name="sourcetype" 
src="org.apache.forrest.sourcetype.SourceTypeAction">
-        <sourcetype name="hello-v1.0">
-          <document-declaration public-id="-//Acme//DTD Hello Document 
V1.0//EN" />
+        <sourcetype name="status-poi">
+          <document-declaration public-id="-//APACHE//DTD Changes POI//EN" />
         </sourcetype>
       </map:action>
     </map:actions>
@@ -33,9 +33,9 @@
       <map:act type="sourcetype" src="{src}">
         <map:select type="parameter">
           <map:parameter name="parameter-selector-test" value="{sourcetype}" />
-          <map:when test="hello-v1.0">
+          <map:when test="status-poi">
             <map:generate src="{properties:content.xdocs}{../../1}.xml" />
-            <map:transform 
src="{properties:resources.stylesheets}/hello2document.xsl" />
+            <map:transform 
src="{properties:resources.stylesheets}/status2document.xsl" />
             <map:serialize type="xml-document"/>
           </map:when>
         </map:select>
@@ -77,6 +77,12 @@
        </map:select>
       </map:match>
 
+      <map:match pattern="status.xml">
+        <map:call resource="transform-to-document">
+          <map:parameter name="src" value="{properties:content.xdocs}{1}.xml" 
/>
+        </map:call>
+      </map:match>
+
       <map:match pattern="**.xml">
         <map:call resource="transform-to-document">
           <map:parameter name="src" value="{properties:content.xdocs}{1}.xml" 
/>

Modified: xmlbeans/site/src/documentation/skinconf.xml
URL: 
http://svn.apache.org/viewvc/xmlbeans/site/src/documentation/skinconf.xml?rev=1835346&r1=1835345&r2=1835346&view=diff
==============================================================================
--- xmlbeans/site/src/documentation/skinconf.xml (original)
+++ xmlbeans/site/src/documentation/skinconf.xml Sun Jul  8 10:12:46 2018
@@ -118,9 +118,9 @@ which will be used to configure the chos
   @location ("page","menu","page,menu", "none")
    Where to show the TOC.
   -->
-  <toc max-depth="2" min-sections="1" location="page"/>
+  <toc max-depth="2" min-sections="1" location="none"/>
 <!-- Heading types can be clean|underlined|boxed  -->
-  <headings type="underlined"/>
+  <headings type="boxed"/>
 <!-- The optional feedback element will be used to construct a
     feedback link in the footer with the page pathname appended:
     <a href="@href">{@to}</a>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to