<?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.2.a xforms-delete action</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-delete">
            	<xforms:message ev:event="xforms-delete" level="modal">xforms-delete</xforms:message>
                <xforms:setvalue model="description_catcher" ref="delete_description" value="event('delete-location')"/>
                <xforms:setvalue model="description_catcher" ref="new_value" value="event('deleted-nodes')/date"/>
            </xforms:action>
        </xforms:model>
        <xforms:model id="description_catcher">
            <xforms:instance>
                <descriptions xmlns="">
                    <delete_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.2.a xforms-delete action</xforms:label>
        </xforms:group>
        <xforms:group>
            <xforms:label>
              Activate the Delete A Date trigger below to fire the xforms-delete event. You must see an 
			  xforms-delete message and the correct values must be output below. 
            </xforms:label>
        </xforms:group>
        <xforms:trigger>
            <xforms:label>Delete A Date</xforms:label>
            <xforms:action ev:event="DOMActivate">
                <xforms:delete nodeset="/Dates/date" at="1"/>
            </xforms:action>
        </xforms:trigger>
        <xforms:group>
            <xforms:label>You must see the value "1" : </xforms:label>
            <xforms:output model="description_catcher" ref="delete_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>
