<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">			
	<head>
	  <title>4.4.1.a xforms-insert event</title>
		<xforms:model>
		  <xforms:instance>
			<Dates xmlns="">
			  <date>2006-12-25</date>
			  <date>2006-01-01</date>
			</Dates>
		  </xforms:instance>
		  <xforms:action ev:event="xforms-insert">
			<xforms:message ev:event="xforms-insert" level="modal">xforms-insert</xforms:message>
			<xforms:setvalue model="description_catcher" ref="insert_description" value="event('position')"/>
			<xforms:setvalue model="description_catcher" ref="new_value" value="event('inserted-nodes')"/>
		  </xforms:action>
		</xforms:model>			 
		<xforms:model id="description_catcher">
		  <xforms:instance>
			<descriptions xmlns="">
			  <insert_description/>
				<new_value/>
			</descriptions>
		  </xforms:instance>
		</xforms:model>
        <link rel="stylesheet" href="../../../driverPages/forms/TestSuite11.css" type="text/css"/>
	</head>	
	<body>
		<xforms:group>
			<xforms:label class="title">4.4.1.a xforms-insert event</xforms:label>
		</xforms:group>
		<xforms:group>
			<xforms:label>
				 Activate the Insert A Date trigger below to fire the xforms-insert event. You must see an 
				 xforms-insert message and the correct values must be output below. 
			</xforms:label>
		</xforms:group>
		<xforms:group>
			<xforms:trigger>
				<xforms:label>Insert A Date</xforms:label>
				<xforms:action ev:event="DOMActivate">
					<xforms:insert nodeset="/Dates/date" at="1" position="before"/>
				</xforms:action>
			</xforms:trigger>
		</xforms:group>
		<xforms:group>
            <xforms:label>You must see the value "before" : </xforms:label>
			<xforms:output model="description_catcher" ref="insert_description">
				<xforms:label/>
			</xforms:output>
		</xforms:group>
		<xforms:group>
            <xforms:label>You must see the value "2006-01-01" : </xforms:label>
			<xforms:output model="description_catcher" ref="new_value">
				<xforms:label/>
			</xforms:output>
		</xforms:group>
		
	</body>
</html>
