<?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"
      xml:lang="en">
  <head>
    <title>Rule 3: Define three XForms models identified as M1, M2 and M3 
    	   in  document order. Create three outputs, the first  with no model 
	   attribute, the second with a model of  M2 and the third with no 
	   model attribute but within  a group that has a model of M3. 
	   Bind each output  to the root instance element, and set the content  
	   of the instance element equal to the model number  (1, 2 or 3). 
	   The test is passed if the respective  outputs display 1, 2 and 3.</title>

    <xforms:model id="M1">
        <xforms:instance>
	  <test:value xmlns:test="http://example.org"> 1 </test:value>
        </xforms:instance>
    </xforms:model>

    <xforms:model id="M2">
        <xforms:instance>
	  <test:value xmlns:test="http://example.org"> 2 </test:value>
        </xforms:instance>
    </xforms:model>

    <xforms:model id="M3">
        <xforms:instance>
	  <test:value xmlns:test="http://example.org"> 3 </test:value>
        </xforms:instance>
    </xforms:model>

  </head>
  <body>
    <h>Rule 3: Define three XForms models identified as M1, M2 and M3 in  document order. Create three outputs, the first  with no model attribute, the second with a model of  M2 and the third with no model attribute but within  a group that has a model of M3. Bind each output  to the root instance element, and set the content  of the instance element equal to the model number  (1, 2 or 3). The test is passed if the respective  outputs display 1, 2 and 3.</h>
    <p>Assertions tested by this test case:</p>
    <nl>
        <li href="!-- TBD: insert URI to assertion here">!-- TBD: insert assertion tested here</li>
    </nl>

    <xforms:output ref="/test:value" xmlns:test="http://example.org">
        <xforms:label>First Value</xforms:label>
	<xforms:hint>Should be 1</xforms:hint>
    </xforms:output>

    <xforms:output ref="/test:value" model="M2" xmlns:test="http://example.org">
        <xforms:label>Second Value</xforms:label>
	<xforms:hint>Should be 2</xforms:hint>
    </xforms:output>

    <xforms:group model="M3">
        <xforms:output ref="/test:value" xmlns:test="http://example.org">
            <xforms:label>Third Value</xforms:label>
	    <xforms:hint>Should be 3</xforms:hint>
        </xforms:output>
    </xforms:group>

  </body>
</html>

