- From: COUTHURES Alain <alain.couthures@agencexml.com>
- Date: Thu, 18 Jun 2009 10:16:53 +0200
- To: Joern Turner <joern.turner@googlemail.com>
- CC: www-forms@w3.org
Hello,
Regarding tests with different browsers, as for Chiba project, it's a
big job for the XSLTForms project (http://www.agencexml.com/xsltforms).
For XSLTForms tests, jsunittest (http://jsunittest.rubyforge.org) has
been successfully integrated
(http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/testsuite/unit-tests/).
Asserts defined for jsunittest can manipulate the Javascript objects
generated by XSLTForms.
Unit tests usually require ids to be there but the XForms Test Suite is
more a high-level test suite from my point of view. Adding ids
systematically wouldn't reflect real world situations...
When not already present, an id is automatically assigned to each XForms
element by the XSLTForms XSLT 1.0 stylesheet according to its name and
number of predecessors :
<xsl:variable name="lname" select="local-name()"/>
<xsl:variable name="nsuri" select="namespace-uri()"/>
<xsl:attribute name="id">
<xsl:choose>
<xsl:when test="@id"><xsl:value-of
select="@id"/></xsl:when>
<xsl:otherwise>xf-<xsl:value-of
select="$lname"/>-<xsl:value-of
select="count(preceding::*[local-name()=$lname and
namespace-uri()=$nsuri]|ancestor::*[local-name()=$lname and
namespace-uri()=$nsuri])"/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Maybe projects not having such necessity by themselves could have a
pre-process step to add ids automatically from an independent W3C Test
suite...
By the way, probably too many tests display messages while setting
values would be easier to be verified automatically.
Even so, I'm very grateful for the XForms Test Suite to be free !!!
Hope it helps,
Alain Couthures
<agenceXML>
http://www.agencexml.com/xsltforms
Received on Thursday, 18 June 2009 08:17:29 UTC