W3C home > Mailing lists > Public > public-mobileok-checker@w3.org > June 2007

Re: Mobile Checker not working

From: Roland Gülle <roland@7val.com>
Date: Thu, 28 Jun 2007 10:02:32 +0200
Message-Id: <977424BB-B4BA-4511-9913-7F873039A24F@7val.com>
Cc: public-mobileok-checker <public-mobileok-checker@w3.org>
To: Laura Holmes <holmes@google.com>

> 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"

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

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

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


[1] http://exslt.org/exsl/functions/node-set/index.html
Received on Thursday, 28 June 2007 08:02:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:18 UTC