KTp/ReleaseProcess/XSL

From KDE Community Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
<?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">Major Bug Fixes</xsl:with-param>
        <xsl:with-param name="category">major</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">Minor Bug Fixes</xsl:with-param>
        <xsl:with-param name="category">minor</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>
<xsl:if test="cf_commitlink != ''">
[<a href="{cf_commitlink}">Git Commit</a>]
</xsl:if>
</li>
</xsl:template>

</xsl:stylesheet>