<?xml-stylesheet type="text/xsl" href="/xforms-tests/xsltforms/xsltforms.xsl"?>
<html xmlns:my="http://commerce.example.com/payment" xmlns:txs="http://sourceforge.net/projects/txs" xmlns="http://www.w3.org/1999/xhtml" xmlns:req="http://www.agencexml.com/requests" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  	<head>
    	<title>9.3.1.f switch element within repeat element</title>
    	<link rel="stylesheet" href="../../../driverPages/forms/TestSuite11.css" type="text/css"/>
    	<xforms:model>
       		<xforms:instance xmlns="">
				<myset>
				  <repeatnodes>
				    <go/>
				    <go/>
				    <go/>
				  </repeatnodes>
				  <labels>
				    <incase>You are in the In case</incase>
				    <outcase>You are in the Out case</outcase>
				  </labels>
				</myset>
       		</xforms:instance>
    	</xforms:model>
  	</head>
  	<body>
  		<xforms:group>
  			<xforms:label class="title">9.3.1.f switch element within repeat element</xforms:label>
  		</xforms:group>	
  		<xforms:group>
  			<xforms:label>
  				You must see three sets of the statement "You are in the In case" and Go To Out Case triggers. 
  				When you activate a Go To Out Case trigger, the corresponding statement must change to 
  				"You are in the Out case" and the trigger must be replaced by a Go To In Case trigger. 
  				The other two statements and triggers must not change.  Activating a Go To In Case trigger must 
  				restore the statement and trigger to their original state and also not change the other two 
  				statements or triggers. 
  			</xforms:label>	
  		</xforms:group>
  		<xforms:group>
  		  <xforms:repeat nodeset="/myset/repeatnodes/go">
	  		  	<xforms:switch>
	  		  	  <xforms:case id="in" selected="true">
		  		  	  <xforms:group>
		  		  	    <xforms:output ref="/myset/labels/incase"/>
						<xforms:trigger>
						  <xforms:label>Go To Out Case</xforms:label>
						  <xforms:toggle ev:event="DOMActivate" case="out"/>
						</xforms:trigger>
					  </xforms:group>
	  		  	  </xforms:case>
	  		  	  <xforms:case id="out">
	  		  	    <xforms:group>
		  		  	    <xforms:output ref="/myset/labels/outcase"/>
						<xforms:trigger>
						  <xforms:label>Go To In Case</xforms:label>
						  <xforms:toggle ev:event="DOMActivate" case="in"/>
						</xforms:trigger>
					</xforms:group>
	  		  	  </xforms:case>
	  		  	</xforms:switch>
  		  </xforms:repeat>
  		</xforms:group>
		
  </body>
</html>
