2002/ws/desc/test-suite/results red.gif,NONE,1.1 green.gif,NONE,1.1 validation-results.xsl,1.1,1.2

Update of /sources/public/2002/ws/desc/test-suite/results
In directory hutz:/tmp/cvs-serv9461/test-suite/results

Modified Files:
	validation-results.xsl 
Added Files:
	red.gif green.gif 
Log Message:
Alpha of validation results display.

--- NEW FILE: green.gif ---
(This appears to be a binary file; contents omitted.)

Index: validation-results.xsl
===================================================================
RCS file: /sources/public/2002/ws/desc/test-suite/results/validation-results.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** validation-results.xsl	6 Jul 2006 20:50:56 -0000	1.1
--- validation-results.xsl	7 Jul 2006 14:54:39 -0000	1.2
***************
*** 1,14 ****
  <?xml version="1.0" encoding="UTF-8"?>
! <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:report="http://www.w3.org/2006/06/wsdl/ValidationReport">
  	<xsl:output method="html"/>
  	
  	<xsl:variable name="validating-implementations" select="implementations/implementation[@validation-results]"/>
  	<xsl:template match="/">
  		<html>
  			<head>
  				<title>Validation Results</title>
  			</head>
  			<body>
! 				<h3>Validation Results</h3>
  				<table>
  					<thead>
--- 1,21 ----
  <?xml version="1.0" encoding="UTF-8"?>
! <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:report="http://www.w3.org/2006/06/wsdl/ValidationReport" xmlns:tm="http://www.w3.org/2006/02/wsdl/TestMetadata">
  	<xsl:output method="html"/>
  	
+ 	<xsl:variable name="test-suite" select="document('../test-suite.xml')"/>
  	<xsl:variable name="validating-implementations" select="implementations/implementation[@validation-results]"/>
+ 	<xsl:variable name="report" select="document($validating-implementations/@validation-results)/report:report"/>
  	<xsl:template match="/">
  		<html>
  			<head>
  				<title>Validation Results</title>
+ 				<link href="http://www.w3.org/StyleSheets/TR/base.css" type="text/css" rel="stylesheet"/>
+ 				<style type="text/css">
+ 					.errortext {font-size:x-small; border-top: 1px solid grey}
+ 					.expected {font-size:x-small}
+ 				</style>
  			</head>
  			<body>
! 				<h1>Validation Results</h1>
  				<table>
  					<thead>
***************
*** 16,24 ****
  							<td><strong>testcase</strong></td>
  							<xsl:for-each select="$validating-implementations">
! 								<td><strong><xsl:value-of select="@name"/></strong></td>
  							</xsl:for-each>
  						</tr>
  					</thead>
  					<tbody>
  						<xsl:apply-templates select="implementations"/>
  					</tbody>
--- 23,50 ----
  							<td><strong>testcase</strong></td>
  							<xsl:for-each select="$validating-implementations">
! 								<td colspan="2"><strong><xsl:value-of select="@name"/></strong></td>
  							</xsl:for-each>
  						</tr>
  					</thead>
  					<tbody>
+ 						<tr>
+ 							<td/>
+ 							<xsl:for-each select="$validating-implementations">
+ 								<td colspan="2">
+ 									<xsl:variable name="numtests" select="count($test-suite/test-suite/test-case)"/>
+ 									<xsl:variable name="passes" select="count($report/report:wsdl)"/>
+ 									<xsl:variable name="percentage-passed" select="$passes div $numtests"/>
+ 									<xsl:variable name="percentage-failed" select="0"/>
+ 									<div style="border:1px solid black; width:251px; height:16px; font-size:0pt">
+ 										<xsl:if test="$percentage-passed > .01">
+ 											<img src="green.gif" height="16" width="{250*$percentage-passed}" alt="{$percentage-passed * 100}% passed"/>
+ 										</xsl:if>
+ 										<xsl:if test="$percentage-failed > .01">
+ 											<img src="red.gif" height="16" width="{250*$percentage-failed}" alt="{$percentage-failed * 100}% failed"/>
+ 										</xsl:if>
+ 									</div>
+ 								</td>
+ 							</xsl:for-each>
+ 						</tr>
  						<xsl:apply-templates select="implementations"/>
  					</tbody>
***************
*** 28,41 ****
  	</xsl:template>
  	<xsl:template match="implementations">
! 		<xsl:variable name="report" select="document($validating-implementations/@validation-results)/report:report"/>
! 		<xsl:variable name="test" select="document('../test-suite.xml')"/>
! 		<xsl:for-each select="$test/test-suite/test-case/file">
  			<tr>
! 				<td><xsl:value-of select="folder"/>/<xsl:value-of select="file"/></td>
! 				<td>
! 					<xsl:for-each select="$report/report:wsdl[substring-after(report:uri,'/documents/bad/')=concat(current()/folder,'/',current()/file)]">
! 						<xsl:value-of select="report:success"/>
  					</xsl:for-each>
! 				</td>
  			</tr>
  		</xsl:for-each>
--- 54,117 ----
  	</xsl:template>
  	<xsl:template match="implementations">
! 		<xsl:for-each select="$test-suite/test-suite/test-case">
! 			<xsl:variable name="name" select="@id"/>
  			<tr>
! 				<td><xsl:value-of select="$name"/></td>
! 				<xsl:for-each select="document(@href)/tm:TestMetadata">
! 					<xsl:variable name="expected" select="tm:ExpectedResults"/>
! 					<xsl:for-each select="$report/report:wsdl[contains(report:uri,concat('/',$name,'/'))]">
! 						<td width="24">
! 							<xsl:choose>
! 								<xsl:when test="report:success = $expected/tm:Successful and $expected/tm:ViolatesAssertion = report:error/report:key">
! 									<xsl:attribute name="style">background-color:green</xsl:attribute>
! 								</xsl:when>
! 								<xsl:when test="report:success = $expected/tm:Successful">
! 									<xsl:attribute name="style">background-color:yellow</xsl:attribute>
! 								</xsl:when>
! 								<xsl:otherwise>
! 									<xsl:attribute name="style">background-color:red</xsl:attribute>
! 								</xsl:otherwise>
! 							</xsl:choose>
! 						</td>
! 						<td>
! 							<div class="expected"><b>Expected: </b>
! 								<xsl:choose> 
! 									<xsl:when test="$expected/tm:Successful = 'false'">
! 										<xsl:text>violates assertion: </xsl:text>
! 										<a href=""><xsl:value-of select="$expected/tm:ViolatesAssertion"/></a>
! 									</xsl:when>
! 									<xsl:otherwise>
! 										<xsl:text>valid WSDL</xsl:text>
! 									</xsl:otherwise>
! 								</xsl:choose>
! 							</div>
! 							<xsl:choose>
! 								<xsl:when test="report:success = 'false'">
! 									<xsl:for-each select="report:error">
! 										<div class="errortext">Error: 
! 											<xsl:if test="report:errorLocator/report:lineNumber > 0">
! 												<xsl:text>[</xsl:text>
! 												<xsl:value-of select="report:errorLocator/report:lineNumber"/>
! 												<xsl:text>:</xsl:text>
! 												<xsl:value-of select="report:errorLocator/report:lineNumber"/>
! 												<xsl:text>] </xsl:text>
! 											</xsl:if>
! 											<a href=""><xsl:value-of select="report:key"/></a>
! 											<xsl:value-of select="report:message"/>
! 										</div>
! 									</xsl:for-each>
! 								</xsl:when>
! 								<xsl:otherwise>
! 									<div><b>Actual:</b> no error</div>
! 								</xsl:otherwise>
! 							</xsl:choose>
! 						</td>
  					</xsl:for-each>
! <!--
! 	 					<xsl:for-each select="$report/report:wsdl[substring-after(report:uri,'/documents/bad/')=concat(current()/folder,'/',current()/file)]">
! 							<xsl:value-of select="report:success"/>
! 						</xsl:for-each>
! -->
! 				</xsl:for-each>
  			</tr>
  		</xsl:for-each>

--- NEW FILE: red.gif ---
(This appears to be a binary file; contents omitted.)

Received on Friday, 7 July 2006 14:55:03 UTC