<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="../test.css" ?>
<!DOCTYPE html [
	<!ATTLIST section id ID #IMPLIED>
	<!ATTLIST h       id ID #IMPLIED>
	<!ATTLIST div     id ID #IMPLIED>
	<!ATTLIST nl      id ID #IMPLIED>

  <!-- for the model attribute to work -->
  <!ATTLIST xforms:model id ID #IMPLIED>

  <!-- for the bind attribute to work -->
  <!ATTLIST xforms:bind id ID #IMPLIED>

  <!-- for the instance() function to work -->
  <!ATTLIST xforms:instance id ID #IMPLIED>

  <!-- for submit to work -->
  <!ATTLIST xforms:submission id ID #IMPLIED>

  <!-- for setfocus and other events to work -->
  <!ATTLIST xforms:input id ID #IMPLIED>
  <!ATTLIST xforms:secret id ID #IMPLIED>
  <!ATTLIST xforms:textarea id ID #IMPLIED>
  <!ATTLIST xforms:output id ID #IMPLIED>
  <!ATTLIST xforms:upload id ID #IMPLIED>
  <!ATTLIST xforms:range id ID #IMPLIED>
  <!ATTLIST xforms:trigger id ID #IMPLIED>
  <!ATTLIST xforms:submit id ID #IMPLIED>
  <!ATTLIST xforms:select id ID #IMPLIED>
  <!ATTLIST xforms:select1 id ID #IMPLIED>

  <!-- for toggle to work -->
  <!ATTLIST xforms:case id ID #IMPLIED>

  <!-- for repeat stuff to work -->
  <!ATTLIST xforms:repeat id ID #IMPLIED>

  <!-- (also any element with xforms:repeat-* attributes -->
 	<!ATTLIST table      id ID #IMPLIED>
  <!ATTLIST td         id ID #IMPLIED>
]>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
      xmlns:xforms="http://www.w3.org/2002/xforms"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:my="http://example.com"
      xml:lang="en">
  <head>
    <title>The action element (1)</title>

    <xforms:model id="mymodel">
        <xforms:instance>
	        <my:root>
                <my:test>10</my:test>
            </my:root>
	    </xforms:instance>
    </xforms:model>

  </head>
  <body>
    <h>The action element (1)</h>
    <p>Assertions tested by this test case:</p>
    <nl>
        <li href="!-- TBD: insert URI to assertion here">If an ev:event attribute is specified on the action element, the action is triggered when the corresponding event is targeted at its parent (this is XML Events).</li>
        <li href="!-- TBD: insert URI to assertion here">Children of the action element are processed in sequence, with each action completing before the next begins.</li>
        <li href="!-- TBD: insert URI to assertion here">At the end of processing the &lt;action&gt; element, the UI and instance MUST be completely up to date.</li>
    </nl>

    <xforms:input ref="my:test">
        <xforms:label>Test input</xforms:label>
        <xforms:hint>Will be reset when the trigger is activated</xforms:hint>
    </xforms:input>
    
    <xforms:trigger>
        <xforms:label>Run Test</xforms:label>
        <xforms:hint>A message should appear and the form should be reset</xforms:hint>
        <xforms:action ev:event="xforms-activate">
            <xforms:message level="modal">The form will be reset</xforms:message>
            <xforms:reset model="mymodel"/>
        </xforms:action>
    </xforms:trigger>
    
  </body>
</html>
