<?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">
  	<head>
   		<title>4.3.1.a xforms-rebuild event</title>
		<link rel="stylesheet" href="../../../driverPages/forms/TestSuite11.css" type="text/css"/>
		<xforms:model id="car">
      		<xforms:instance>
      			<carColors xmlns="">
      				<color>phoenix yellow metallic</color>
      				<color>imola red</color>
		      		<color>interlago blue metallic</color>
     				<color>alpine white</color>
		      	</carColors>
	      	</xforms:instance>
   			<xforms:action ev:event="xforms-rebuild">
   				<xforms:message level="modal">xforms-rebuild</xforms:message>
   			</xforms:action>
   			
	      	<xforms:bind id="bind_carColors" nodeset="/carColors/color"/>
	    </xforms:model>
  	</head>
  	<body>
   		<xforms:group>
   			<xforms:label class="title">4.3.1.a xforms-rebuild event</xforms:label>
   		</xforms:group>
    	<xforms:group>
    		<xforms:label>
				When you activate the Rebuild trigger you must see an xforms-rebuild message. 
		<!-- 	If you activate the trigger more than 4 times it will not work because all the instance data 
				nodes would have been deleted. -->
			</xforms:label>	
    	</xforms:group>
    	
    	<xforms:trigger>
        	<xforms:label>Rebuild</xforms:label>
        		<xforms:action ev:event="DOMActivate">
        			<xforms:delete nodeset="/carColors/color" at="index('repeat_001')"/>
        		</xforms:action>
      	</xforms:trigger>
    	
    	<xforms:repeat id="repeat_002" nodeset="/carColors/color" startindex="1">
    		<xforms:group>
    		</xforms:group>
    	</xforms:repeat>
      	<xforms:repeat id="repeat_001" nodeset="/carColors/color" startindex="1">
      	</xforms:repeat>
      	
  	</body>
</html>