<?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.7.b copy element has xforms-binding-exception event</title>
    	<link rel="stylesheet" href="../../../driverPages/forms/TestSuite11.css" type="text/css"/>
    	<xforms:model id="cone">
       		<xforms:instance xmlns="">
				<icecream>
					<order invalid="">
						<flavor/>
					</order>
				</icecream>
       		</xforms:instance>
    	</xforms:model>
    	<xforms:model id="flavors">
    		<xforms:instance xmlns="">
    			<flavors>
    				<flavor description="vanilla">vanilla</flavor>
    				<flavor description="strawberry">strawberry</flavor>
    				<flavor description="chocolate">chocolate</flavor>
    			</flavors>
    		</xforms:instance>
    	</xforms:model>
  	</head>
  	<body>
  		<xforms:group>
  			<xforms:label class="title">9.3.7.b copy element has xforms-binding-exception event</xforms:label>
  		</xforms:group>	
  		<xforms:group>
  			<xforms:label>
  				When you try to select a flavor from the select control you must see an 
  				xforms-binding-exception message or a fatal error due to an xforms-binding-exception. 
  				Note: The copy is trying to bind to a different model.
	  		</xforms:label>	
  		</xforms:group>
  		
		<xforms:group>	
			<xforms:select model="cone" ref="/icecream/order/@invalid">
				<xforms:label>Flavors</xforms:label>
				<xforms:itemset model="flavors" nodeset="/flavors/flavor">
					<xforms:label ref="@description"/>
					<xforms:copy ref="."/>
				</xforms:itemset>
				<xforms:message level="modal" ev:event="xforms-binding-exception">xforms-binding-exception</xforms:message>
			</xforms:select>
		</xforms:group>

		<xforms:output ref="/icecream/order/flavor">
  			<xforms:label>Icecream Order : </xforms:label>
  		</xforms:output>

  </body>
</html>
