1 <spec/> <src/> </test> </data> </instance> <!-- fill in the details of the test we want to run --> <bind ref="instance('test')"> <bind ref="chapter"> <bind ref="count" type="integer" calculate="count(instance('testsuite')/chapter)"/> <bind ref="prev" type="integer" calculate="../index - 1" readonly="number(.) < 1"/> <bind ref="next" type="integer" calculate="../index + 1" readonly="number(.) > number(../count)"/> <bind ref="name" calculate="instance('testsuite')/chapter[position()=instance('test')/chapter/index]/@name"/> <bind ref="number" calculate="instance('testsuite')/chapter[position()=instance('test')/chapter/index]/@number"/> </bind> <bind ref="test"> <bind ref="count" type="integer" calculate="count(instance('testsuite')/chapter[position()=instance('test')/chapter/index]/test)"/> <bind ref="prev" type="integer" calculate="../index - 1" readonly="number(.) < 1"/> <bind ref="next" type="integer" calculate="../index + 1" readonly="number(.) > number(../count)"/> <bind ref="name" calculate="instance('testsuite')/chapter[position()=instance('test')/chapter/index]/test[position()=instance('test')/test/index]/@name"/> <bind ref="title" calculate="instance('testsuite')/chapter[position()=instance('test')/chapter/index]/test[position()=instance('test')/test/index]/@title"/> <bind ref="spec" calculate="instance('testsuite')/chapter[position()=instance('test')/chapter/index]/test[position()=instance('test')/test/index]/@spec"/> <bind ref="src" calculate="if(../name = '', 'none.html', concat(../../chapter/name, '/', ../name, '.xhtml'))"/> </bind> </bind> <message ev:event="xforms-submit-error">Submission error. error-type: <output value="event('error-type')"/> error-message: <output value="event('error-message')"/> response-status-code: <output value="event('response-status-code')"/> response-reason-phrase: <output value="event('response-reason-phrase')"/> resource-uri: <output value="event('resource-uri')"/> </message> </model> </head> <body> <p><a href="testsuite.xml">test definitions</a><br/> <a href="../TestSuite.zip">zipped testsuite</a></p> <group xmlns="http://www.w3.org/2002/xforms"> <label class="heading">XForms 2.0 Test Suite</label> <output value="concat('Version ', instance('testsuite')/@version)"/> <group> <trigger><label>Reload test definitions</label> <send submission="refresh" ev:event="DOMActivate"/> </trigger> </group> <trigger ref="instance('test')/chapter/prev"> <label>โ†<!--๐Ÿกฐ--></label> <hint><output ref="instance('testsuite')/chapter[position()=instance('test')/chapter/index - 1]/@name"/></hint> <setvalue ref="instance('test')/chapter/index" value="if(. = 1, 1, . - 1)" ev:event="DOMActivate"/> </trigger> <select1 ref="instance('test')/chapter/index"> <label></label> <itemset ref="instance('testsuite')/chapter"> <label ref="@title"/> <value value="count(preceding-sibling::chapter)+1"/> </itemset> <action ev:event="xforms-value-changed"> <setvalue ref="instance('test')/testname"/> <toggle case="overview"/> </action> </select1> <trigger ref="instance('test')/chapter/next"> <label>โ†’<!--๐Ÿกฒ--></label> <hint><output ref="instance('testsuite')/chapter[position()=instance('test')/chapter/index + 1]/@name"/></hint> <setvalue ref="instance('test')/chapter/index" value=". + 1" ev:event="DOMActivate"/> </trigger> <group> Chapter <output value="instance('test')/chapter/index"/> of <output value="instance('test')/chapter/count"/>. Has <output value="instance('test')/test/count"/> tests. </group> <group> <switch> <case id="overview"> <label class="Title"> <output class="testCaseDescription" value="'Test Case (*=new)'"/> <output class="testCaseSpecLink" value="'Spec Link'"/> </label> <repeat id="cases" ref="chapter[position()=instance('test')/chapter/index]/test"> <output value="if(contains('123456789', substring(@name, 1, 1)), ' ', '*')"/> <output value="if(@inspect, 'โฟ', ' ')"/> <output value="if(@interact, '๐Ÿ‘‡', ' ')"/> <trigger appearance="minimal" class="testCaseDescription Value"> <label ref="." class="Link"/> <hint><output value="concat(instance('test')/chapname, '/', @name, '.xhtml')"/></hint> <action ev:event="DOMActivate"> <setvalue ref="instance('test')/test/index" value="count(context()/preceding-sibling::test) + 1"/> <toggle case="testonecase"/> </action> </trigger> <trigger appearance="minimal" class="testCaseSpecLink Value"> <label class="Link"><output ref="@spec"/></label> <hint><output value="concat('https://www.w3.org/community/xformsusers/wiki/', if(substring(@spec, 1, 3) = 'fn-', 'XPath_Expressions_Module#', 'XForms_2.0#'), @spec)"/></hint> <load ev:event="DOMActivate" show="new"> <resource value="concat('https://www.w3.org/community/xformsusers/wiki/', if(substring(@spec, 1, 3) = 'fn-', 'XPath_Expressions_Module#', 'XForms_2.0#'), @spec)"/> </load> </trigger> </repeat> </case> <case id="testonecase"> <trigger ref="instance('test')/test/prev"> <label>โ†<!--๐Ÿกฐ--></label> <setvalue ref="instance('test')/test/index" value=". - 1" ev:event="DOMActivate"/> </trigger> <select1 ref="instance('test')/test/index"> <label></label> <itemset ref="instance('testsuite')/chapter[position()=instance('test')/chapter/index]/test"> <label ref="."/> <value value="count(preceding-sibling::test)+1"/> </itemset> </select1> <trigger ref="instance('test')/test/next"> <label>โ†’<!--๐Ÿกฒ--></label> <setvalue ref="instance('test')/test/index" value=". + 1" ev:event="DOMActivate"/> </trigger> <trigger appearance="minimal" class="testCaseSpecLink Value"> <label class="Link"><output ref="instance('test')/spec"/></label> <hint><output value="concat('https://www.w3.org/community/xformsusers/wiki/', if(substring(@spec, 1, 3) = 'fn-', 'XPath_Expressions_Module#', 'XForms_2.0#'), instance('test')/spec)" /> </hint> <load ev:event="DOMActivate" show="new"> <resource value="concat('https://www.w3.org/community/xformsusers/wiki/', if(substring(@spec, 1, 3) = 'fn-', 'XPath_Expressions_Module#', 'XForms_2.0#'), instance('test')/spec)" /> </load> </trigger> <group> Test <output value="instance('test')/test/index"/> of <output value="count(instance('testsuite')/chapter[position()=instance('test')/chapter/index]/test)"/>. <trigger appearance="minimal"> <label>Source</label> <hint><output value="instance('test')/test/src"/></hint> <action ev:event="DOMActivate"> <load show="new" resource="{instance('test')/test/src}" /> </action> </trigger> </group> <group> <trigger><label>Overview</label> <action ev:event="DOMActivate"> <toggle case="overview"/> </action> </trigger> </group> <message ev:event="PASS">PASSED!</message> <h:iframe id="testcase" src="{instance('test')/test/src}"></h:iframe> </case> </switch> </group> </group> <hr/> <p> Distributed under both the <a href="http://www.w3.org/Consortium/Legal/2008/04-testsuite-license">W3C Test Suite License</a> and the <a href="http://www.w3.org/Consortium/Legal/2008/03-bsd-license">W3C 3-clause BSD License</a>. To contribute to a W3C Test Suite, see the <a href="http://www.w3.org/2004/10/27-testcases">policies and contribution forms</a>. </p> </body> </html>