<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="../xhtml2.css" ?>
<!DOCTYPE html [
        <!ATTLIST section id ID #IMPLIED>
        <!ATTLIST h       id ID #IMPLIED>
        <!ATTLIST div     id ID #IMPLIED>
        <!ATTLIST nl      id ID #IMPLIED>
]>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:html="http://www.w3.org/1999/xhtml"
      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:foreign="http://example.com/2003/foreign"
      xml:lang="en">
  <head>
    <title>Test case for assertion 13: extension element</title>
    <xforms:model id="m_001">
      <xforms:extension>
        <ons:stuff xmlns:ons="http://example.com/ons"/>
      </xforms:extension>
      <xforms:instance id="i_001" xmlns="">
        <r>
          <a></a>
          <b/>
          <lines>
            <line name="a">
              <price>3.00</price>
            </line>
            <xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
            <line name="b">
              <price>32.25</price>
            </line>
            <line name="c">
              <price>132.99</price>
            </line>
          </lines>
          <yourname/>
        </r>
        <xforms:extension>
          <ons:stuff xmlns:ons="http://example.com/ons"/>
        </xforms:extension>
      </xforms:instance>
      <xforms:submission id="s1" action="http://example.com/2003/foreignTest">
        <xforms:extension>
          <ons:stuff xmlns:ons="http://example.com/ons"/>
        </xforms:extension>
      </xforms:submission>
      <xforms:bind id="bind1" nodeset="/r/a">
        <xforms:extension>
          <ons:stuff xmlns:ons="http://example.com/ons"/>
        </xforms:extension>
      </xforms:bind>

    </xforms:model>
  </head>
  <body>
    <xforms:group>
      <xforms:label>extension is specified and should be ignored since it will not be understood.</xforms:label>
      <!-- Form Controls -->
      <xforms:group>
        <xforms:extension>
          <ons:stuff xmlns:ons="http://example.com/ons"/>
        </xforms:extension>
        <xforms:input ref="a">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label><xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>Input:<xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
          </xforms:label>
          <xforms:help><xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>Example Help<xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
          </xforms:help>
          <xforms:hint><xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>Example Hint<xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension></xforms:hint>
          <xforms:alert>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>Example Alert<xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension></xforms:alert>
        </xforms:input>
        <xforms:secret ref="a">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label>Secret:</xforms:label>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
        </xforms:secret>
        <xforms:textarea ref="a">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label>Textarea:</xforms:label>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
        </xforms:textarea>
        <xforms:output ref="a">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label>output:</xforms:label>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
        </xforms:output>
        <xforms:upload  ref="a">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label>upload:</xforms:label>
          <xforms:filename><xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>example.xml<xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension></xforms:filename>
          <xforms:mediatype><xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>application.xml<xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension></xforms:mediatype>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
        </xforms:upload>
        <xforms:range ref="a">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label>range:</xforms:label>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
        </xforms:range>
        <xforms:trigger>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label>Trigger</xforms:label>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
        </xforms:trigger>
        <xforms:submit  ref="a" submission="s1">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label>Submit</xforms:label>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
        </xforms:submit>
        <xforms:select1 bind="bind1">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label>Select1:</xforms:label>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:item>
            <xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
            <xforms:label>Two</xforms:label>
            <xforms:value><xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>2<xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension></xforms:value>
            <xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
          </xforms:item>
          <xforms:item>
            <xforms:label>Three</xforms:label>
            <xforms:value>3</xforms:value>
          </xforms:item>
          <xforms:choices>
            <xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
            <xforms:item>
              <xforms:label>Three an a half</xforms:label>
              <xforms:value>3.5</xforms:value>
            </xforms:item>
            <xforms:item>
              <xforms:label>Three and three quarters</xforms:label>
              <xforms:value>3.75</xforms:value>
            </xforms:item>
            <xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
          </xforms:choices>
        </xforms:select1>
        <xforms:select ref="a">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:label>Select:</xforms:label>
          <xforms:item>
            <xforms:label>Two</xforms:label>
            <xforms:value>2</xforms:value>
          </xforms:item>
          <xforms:item>
            <xforms:label>Three</xforms:label>
            <xforms:value>3</xforms:value>
          </xforms:item>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
        </xforms:select>
      </xforms:group>
      <!-- Switch Module -->
      <xforms:group>
        <xforms:extension>
          <ons:stuff xmlns:ons="http://example.com/ons"/>
        </xforms:extension>
        <xforms:switch>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:case id="in" selected="true">
            <xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
            <xforms:input ref="yourname">
              <xforms:label>Please tell me your name</xforms:label>
              <xforms:toggle ev:event="xforms-activate" case="out"/>
            </xforms:input>
            <xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
          </xforms:case>
          <xforms:case id="out" selected="false">
            <html:p>Hello
              <xforms:output ref="yourname"/>.
              <xforms:trigger id="editButton">
                <xforms:label>Edit</xforms:label>
                <xforms:toggle ev:event="xforms-activate" case="in"/>
              </xforms:trigger>
            </html:p>
          </xforms:case>
        </xforms:switch>
        <xforms:extension>
          <ons:stuff xmlns:ons="http://example.com/ons"/>
        </xforms:extension>
      </xforms:group>
      <xforms:extension>
        <ons:stuff xmlns:ons="http://example.com/ons"/>
      </xforms:extension>
      <!-- Repeat Module -->
      <xforms:group>
        <xforms:repeat id="lineset" nodeset="/r/lines/line">
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
          <xforms:input ref="price">
            <xforms:label>Line Item</xforms:label>
          </xforms:input>
          <xforms:input ref="@name">
            <xforms:label>Name</xforms:label>
          </xforms:input>
          <xforms:extension>
            <ons:stuff xmlns:ons="http://example.com/ons"/>
          </xforms:extension>
        </xforms:repeat>
        <xforms:trigger>
          <xforms:label>Insert a new item after the current one</xforms:label>
          <xforms:action ev:event="xforms-activate">
            <xforms:insert nodeset="/r/lines/line" at="index('lineset')" position="after">
              <xforms:extension>
                <ons:stuff xmlns:ons="http://example.com/ons"/>
              </xforms:extension>
            </xforms:insert>
            <xforms:setvalue ref="/r/lines/line[index('lineset')]/@name">
              <xforms:extension>
                <ons:stuff xmlns:ons="http://example.com/ons"/>
              </xforms:extension>
            </xforms:setvalue>
            <xforms:setvalue ref="/r/lines/line[index('lineset')]/price">0.00</xforms:setvalue>
          </xforms:action>
        </xforms:trigger>
        <xforms:trigger>
          <xforms:label>copy current item</xforms:label>
          <xforms:copy ev:event="activate" nodeset="/r/lines/line" at="index('lineset')"/>
        </xforms:trigger>
        <xforms:trigger>
          <xforms:label>remove current item</xforms:label>
          <xforms:delete ev:event="activate" nodeset="/r/lines/line" at="index('lineset')">
            <xforms:extension>
              <ons:stuff xmlns:ons="http://example.com/ons"/>
            </xforms:extension>
          </xforms:delete>
        </xforms:trigger>
      </xforms:group>
    </xforms:group>
  </body>
</html>