KTp/ReleaseProcess/XSL: Difference between revisions

From KDE Community Wiki
(Created page with "<nowiki> <?xml version="1.0"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes"/> <xsl:template match="...")
 
No edit summary
Line 1: Line 1:
<nowiki>
<pre>
<?xml version="1.0"?>
<?xml version="1.0"?>


Line 56: Line 56:
</xsl:stylesheet>
</xsl:stylesheet>


</nowiki>
</pre>

Revision as of 18:55, 25 March 2014

<?xml version="1.0"?>

<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>

<xsl:template match="/bugzilla">
    <xsl:call-template name="group">
        <xsl:with-param name="heading">Crash Fixes</xsl:with-param>
        <xsl:with-param name="category">crash</xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="group">
        <xsl:with-param name="heading">Critical Bug Fixes</xsl:with-param>
        <xsl:with-param name="category">critical</xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="group">
        <xsl:with-param name="heading">Bug Fixes</xsl:with-param>
        <xsl:with-param name="category">normal</xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="group">
        <xsl:with-param name="heading">New Features</xsl:with-param>
        <xsl:with-param name="category">wishlist</xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="group">
        <xsl:with-param name="heading">Tasks</xsl:with-param>
        <xsl:with-param name="category">task</xsl:with-param>
    </xsl:call-template>
</xsl:template>

<xsl:template name="group">
    <xsl:param name="heading"/>
    <xsl:param name="category"/>
<h2><xsl:value-of select="$heading"/></h2>
<ul>
<xsl:for-each select="bug">
    <xsl:if test="bug_severity = $category">
        <xsl:call-template name="bugsummary"/>
    </xsl:if>
</xsl:for-each>
</ul>
</xsl:template>

<xsl:template name="bugsummary">
    <xsl:variable name="bugid" select="bug_id"/>
<li><strong><a href="https://bugs.kde.org/show_bug.cgi?id={$bugid}"><xsl:value-of select="$bugid"/></a></strong>: <em><xsl:value-of select="short_desc"/></em><br/>
<xsl:if test="target_milestone != '---'">
This change will be available in version <xsl:value-of select="target_milestone"/><br/>
</xsl:if>
<xsl:if test="cf_commitlink != ''">
<a href="{cf_commitlink}">Git Commit</a><br/>
</xsl:if>
</li>
</xsl:template>

</xsl:stylesheet>