<?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.2.1.b switch element example</title>
    	<link rel="stylesheet" href="../../../driverPages/forms/TestSuite11.css" type="text/css"/>
    	<xforms:model>
       		<xforms:instance xmlns="">
				<yourname>Bill</yourname>
       		</xforms:instance>
    	</xforms:model>
  	</head>
  	<body>
  		<xforms:group>
  			<xforms:label class="title">9.2.1.b switch element example</xforms:label>
  		</xforms:group>	
  		<xforms:group>
  			<xforms:label>
  			  When you activate the Send Name trigger, the input control and the trigger will be replaced  
  			  by an output that says "Hello" followed by whatever value was in 
  			  the input control when it was activated and an Edit trigger. When activated, the output and the 
  			  Edit trigger 
  			  must be replaced by the input field and the Send Name trigger. 
	  		</xforms:label>	
  		</xforms:group>
		<xforms:switch>
		  <xforms:case id="in" selected="true">
		    <xforms:input ref="/yourname">
		      <xforms:label>Please tell me your name:</xforms:label>
		    </xforms:input>
		    <xforms:trigger>
		      <xforms:label>Send Name</xforms:label>
		      <xforms:toggle ev:event="DOMActivate" case="out"/>
		    </xforms:trigger>
		  </xforms:case>
		  <xforms:case id="out" selected="false">
		    <xforms:output ref="/yourname">
		      <xforms:label>Hello </xforms:label>
		    </xforms:output>
		      <xforms:trigger id="editButton">
		        <xforms:label>Edit</xforms:label>
		        <xforms:toggle ev:event="DOMActivate" case="in"/>
		      </xforms:trigger>
		  </xforms:case>
		</xforms:switch>
		
  </body>
</html>
