Re: Mobile Checker not working

> In other xsl news, I'm also trying to figure out how to have the  
> test outcome displayed at the top of the result document. Is there  
> some way to overwrite that value after the tests have been  
> performed, or some kind of template call? As things stand right  
> now, we just put in a dummy value into the test outcome  
> declaration, and then we leave it up to the individual results to  
> determine the real outcomes. However, after the test is performed,  
> if we have a test that we originally claimed passed, and then  
> failed on sub-tests, we still get a result document that says test  
> outcome pass but sub-results state failure.
>
> One other possibility is striking the overall test "outcome" value  
> from the top of the result and just letting the rest of the test  
> garner a pass or fail outcome from the sub-results. Thoughts?
A possible solution is the exslt node-set function [1], with  
returning all test results into a variable and build a new structure  
with node-set().
I have only used node-set() with the XSLT/1.0 and libxslt, maybe  
there is another way with XSLT 2.0 (?).

But exslt works with saxon:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
            ...
            xmlns:exsl="http://exslt.org/common"
            extension-element-prefixes="exsl">

...
<xsl:variable name="result">
<!-- test results -->
   <xsl:apply-templates/ select="/moki/primaryDoc/XHTMLDocInfo/ 
docContent/html:html"/>
</xsl:variable>

<test name="...">
<xsl:choose>
<xsl:when test="exsl:node-set($result)//result[@outcome = 'FAIL']">
<xsl:attribute name="outcome">FAIL</xsl:attribute>
</xsl:when>
...
<xsl:copy-of select="exsl:node-set($result)/node()"/>

If this is OK, I add this syntax to one test as example.

  Roland

[1] http://exslt.org/exsl/functions/node-set/index.html

Received on Thursday, 28 June 2007 08:02:41 UTC