diff options
Diffstat (limited to 'summarize.xsl')
-rw-r--r-- | summarize.xsl | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/summarize.xsl b/summarize.xsl index 78f89fd..b4e6375 100644 --- a/summarize.xsl +++ b/summarize.xsl @@ -11,6 +11,42 @@ indent="no" /> +<xsl:template match="task[@result = 'error']"> + <xsl:text>
Error #</xsl:text> + <xsl:value-of select="position()"/> + <xsl:text>: </xsl:text> + + <xsl:choose> + <xsl:when test="@type = 'generate'"> + <xsl:for-each select="subtask[@result = 'error']"> + <xsl:text>Generation of "</xsl:text> + <xsl:value-of select="target"/> + <xsl:text>" failed.</xsl:text> + + <xsl:for-each select="log/error"> + <xsl:text>
</xsl:text> + <xsl:value-of select="."/> + </xsl:for-each> + </xsl:for-each> + </xsl:when> + <xsl:when test="@type = 'link'"> + <xsl:text>Link from "</xsl:text> + <xsl:value-of select="from"/> + <xsl:text>" to "</xsl:text> + <xsl:value-of select="to"/> + <xsl:text>" failed.</xsl:text> + </xsl:when> + <xsl:when test="@type = 'clean'"> + <xsl:text>Cleaning of "</xsl:text> + <xsl:value-of select="path"/> + <xsl:text>" failed.</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="."/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + <xsl:template match="datasource"> <xsl:variable name="total_count" select="count(task)"/> <xsl:variable name="success_count" select="count(task[@result = 'success'])"/> @@ -32,6 +68,8 @@ </xsl:otherwise> </xsl:choose> <xsl:text>.
</xsl:text> + + <xsl:apply-templates select="task[@result = 'error']"/> </xsl:template> </xsl:stylesheet> |