gen-text-summary.xsl revision d81978a0815d5b8a75633c35e3e1f8708d36f017
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
! Copyright 2007-2008 Sun Microsystems, Inc.
! -->
<xsl:output method="text"/>
<xsl:template match="/">
<!-- Test Report Header -->
<!-- Test Case Totals -->
<xsl:variable name="total" select="count($testcase)"/>
<xsl:variable name="pass" select="count($testcase[@result='pass'])"/>
<xsl:variable name="fail" select="count($testcase[@result='fail'])"/>
<xsl:variable name="inconc" select="count($testcase[@result='unknown'])"/>
<!-- Overall Test Percentage -->
<xsl:variable name="percent">
<xsl:choose>
<xsl:when test="$total > 0">
<xsl:value-of select="round((($pass div $total) * 100) - 0.5)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="0"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="concat('result: ', normalize-space($percent),'
')"/>
<xsl:value-of select="concat('pass: ', normalize-space($pass),'
')"/>
<xsl:value-of select="concat('fail: ', normalize-space($fail),'
')"/>
<xsl:value-of select="concat('inconc: ', normalize-space($inconc),'
')"/>
<xsl:value-of select="concat('total: ', normalize-space($total),'
')"/>
<xsl:value-of select="concat('sut-revision: ', normalize-space($identification/revision),'
')"/>
<xsl:value-of select="concat('jvm-version: ', normalize-space($identification/jvm-version),'
')"/>
<xsl:value-of select="concat('jvm-vendor: ', normalize-space($identification/jvm-vendor),'
')"/>
</xsl:template>
</xsl:stylesheet>