CVS WWW/International/multilingualweb/lt/drafts/its20/tools/xslt

Update of /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/tools/xslt
In directory gil:/tmp/cvs-serv1935/tools/xslt

Added Files:
	disco-for-its20.xsl 
Log Message:
new


--- /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/tools/xslt/disco-for-its20.xsl	2012/12/09 16:23:03	NONE
+++ /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/tools/xslt/disco-for-its20.xsl	2012/12/09 16:23:03	1.1
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon"
    exclude-result-prefixes="saxon xs" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xsl:variable name="worktitle">ITS 2.0</xsl:variable>
    <xsl:variable name="draftURI">http://www.w3.org/TR/2012/WD-its20-20121206/</xsl:variable>
    <xsl:variable name="stage">Last Call</xsl:variable>
    <xsl:variable name="productnum">6</xsl:variable>
    <xsl:variable name="commentsPeriodStartDate" as="xs:date">2012-09-25</xsl:variable>
    <xsl:variable name="commentsPeriodEndDate" as="xs:date">2013-01-10</xsl:variable>
    <xsl:preserve-space elements="*"/>

    <xsl:output method="xhtml" encoding="utf-8" indent="yes"/>

    <xsl:template match="/">
        <xsl:variable name="comments"
            select="database/issues/issue[product=$productnum and xs:date(created) &gt;= $commentsPeriodStartDate and xs:date(created) &lt;= $commentsPeriodEndDate]"/>
        <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
                <title><xsl:copy-of select="$worktitle"/> Disposition of <xsl:copy-of
                        select="$stage"/> Comments</title>
                <style type="text/css"> table.overview tr {background: #ddd;} *.description {
                    border-width:1px; border-style:solid; border-color:blue; padding:2.5em;
                    text-align:justify; width: 100%; } table.issues-table {empty-cells: show;}
                    *.unknown {color: red;} </style>
            </head>
            <body>
                <div class="head">
                    <h1><xsl:copy-of select="$worktitle"/> Disposition of <xsl:copy-of
                            select="$stage"/> Comments</h1>
                    <h2>Version: <xsl:value-of select="substring-before(string(current-date()),'+')"
                        /></h2>
                </div>
                <h2>Abstract</h2>

                <p>This document outlines the way in which the <a
                        href="http://www.w3.org/International/multilingualweb/lt/"
                        >MultilingualWeb-LT Working Group</a> addressed the comments submitted
                    during the <a href="{$draftURI}"><xsl:copy-of select="$worktitle"
                            /><xsl:text> </xsl:text><xsl:copy-of select="$stage"/></a> period,
                    starting <xsl:value-of select="$commentsPeriodStartDate"/> and ending
                        <xsl:value-of select="$commentsPeriodEndDate"/>.</p>

                <p>Please send detailed comments on this document to <a
                        href="mailto:public-multilingualweb-lt-comments@w3.org"
                        >public-multilingualweb-lt-comments@w3.org</a>.</p>

                <h2>Summary</h2>
                <xsl:variable name="acceptedIssues"
                    select="$comments[contains(substring-after(notes/note[contains(description,'RESOLUTION:')][last()]/description,'RESOLUTION:'),'accepted')]"/>
                <xsl:variable name="rejectedIssues"
                    select="$comments[contains(substring-after(notes/note[contains(description,'RESOLUTION:')][last()]/description,'RESOLUTION:'),'rejected')]"/>
                <xsl:variable name="wgDecisionUnknown"
                    select="($comments except $acceptedIssues) except $rejectedIssues"/>
                <xsl:variable name="reviewerSatisfied"
                    select="$comments[contains(substring-after(notes/note[contains(description,'COMMENTER-RESPONSE:')][last()]/description,'COMMENTER-RESPONSE:'),'satisfied')]"/>
                <xsl:variable name="reviewerNotSatisfied"
                    select="$comments[contains(substring-after(notes/note[contains(description,'COMMENTER-RESPONSE:')][last()]/description,'COMMENTER-RESPONSE:'),'unsatisfied')]"/>
                <table width="100%" class="overview">
                    <tr>
                        <td>-</td>
                        <td>
                            <a href="#reviewerSatisfied-listed">Reviewer satisfied</a>
                        </td>
                        <td>
                            <a href="#reviewerNotSatisfied-listed">Reviewer not satisfied</a>
                        </td>
                        <td>
                            <a href="#noResponse-listed">No reply from reviewer or status
                                unknown</a>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a href="#proposalAccepted-listed">WG accepted comment</a>
                        </td>
                        <td>
                            <xsl:value-of
                                select="count($acceptedIssues intersect $reviewerSatisfied)"/>
                        </td>
                        <td>
                            <xsl:value-of
                                select="count($acceptedIssues intersect $reviewerNotSatisfied)"/>
                        </td>
                        <td rowspan="2">
                            <xsl:value-of select="count($wgDecisionUnknown)"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a href="#changeDeclined-listed">WG rejects comment</a>
                        </td>
                        <td>
                            <xsl:value-of
                                select="count($rejectedIssues intersect $reviewerSatisfied)"/>
                        </td>
                        <td>
                            <xsl:value-of
                                select="count($rejectedIssues intersect $reviewerNotSatisfied)"/>
                        </td>
                    </tr>
                </table>
                <h2>Issues list</h2>

                <table cellpadding="5" border="2" class="issues-table" width="100%">
                    <tr>
                        <th>Issue</th>
                        <th>First recorded</th>
                        <th>Action</th>
                        <th>Commenter Feedback</th>
                        <th>Change Type</th>
                        <th>Notes</th>
                    </tr>
                    <xsl:for-each select="$comments">
                        <xsl:variable name="action"
                            select="substring-after(notes/note[contains(description,'ACTION:')][last()]/description,'ACTION:')"/>
                        <xsl:variable name="commentors-response"
                            select="substring-after(notes/note[contains(description,'COMMENTER-RESPONSE:')][last()]/description,'COMMENTER-RESPONSE:')"/>
                        <xsl:variable name="change-type"
                            select="substring-after(notes/note[contains(description,'CHANGE-TYPE:')][last()]/description,'CHANGE-TYPE:')"/>
                        <xsl:variable name="resolution"
                            select="substring-after(notes/note[contains(description,'RESOLUTION:')][last()]/description,'RESOLUTION:')"/>
                        <tr>
                            <td>
                                <a
                                    href="{concat('https://www.w3.org/International/multilingualweb/lt/track/issues/',id)}">
                                    <xsl:attribute name="id">issue-<xsl:value-of select="id"
                                        /></xsl:attribute>
                                    <xsl:value-of select="concat('issue-',id)"/>: <xsl:value-of
                                        select="title"/></a>
                            </td>
                            <td>
                                <xsl:value-of select="created"/>
                            </td>
                            <td>
                                <xsl:choose>
                                    <xsl:when
                                        test="contains($action,'spec changed') or contains($action,'none')">
                                        <xsl:value-of select="$action"/>
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <span class="unknown">unknown</span>
                                    </xsl:otherwise>
                                </xsl:choose>
                            </td>
                            <td>
                                <xsl:choose>
                                    <xsl:when
                                        test="contains($commentors-response,'satisfied') or contains($commentors-response,'unsatisfied')">
                                        <xsl:value-of select="$commentors-response"/>
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <span class="unknown">unknown</span>
                                    </xsl:otherwise>
                                </xsl:choose>
                            </td>
                            <td>
                                <xsl:choose>
                                    <xsl:when
                                        test="contains($change-type,'editorial') or contains($change-type,'substantive')">
                                        <xsl:value-of select="$change-type"/>
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <span class="unknown">unknown</span>
                                    </xsl:otherwise>
                                </xsl:choose>
                            </td>
                            <td>
                                <xsl:choose>
                                    <xsl:when
                                        test="contains($resolution,'accepted') or contains($resolution,'rejected')">
                                        <xsl:value-of select="$resolution"/>
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <span class="unknown">unknown</span>
                                    </xsl:otherwise>
                                </xsl:choose>
                            </td>
                        </tr>
                    </xsl:for-each>
                </table>
            </body>
        </html>
    </xsl:template>
</xsl:transform>

Received on Sunday, 9 December 2012 16:23:05 UTC