form

Element Information

Model

p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | pre | hr | blockquote | address | fieldset | table | noscript | ins | del | script

Attributes

QName Type Fixed Default Use Inheritable Annotation
accept ContentTypes optional
accept-charset Charsets optional
action URI required
class xs:NMTOKENS optional
dir restriction of xs:token optional
enctype ContentType application/x-www-form-urlencoded optional
id xs:ID optional
lang LanguageCode optional
method restriction of xs:token get optional
onclick Script optional
ondblclick Script optional
onkeydown Script optional
onkeypress Script optional
onkeyup Script optional
onmousedown Script optional
onmousemove Script optional
onmouseout Script optional
onmouseover Script optional
onmouseup Script optional
onreset Script optional
onsubmit Script optional
style StyleSheet optional
title Text optional
xml:lang union of(xs:language, restriction of xs:string) optional
Attempting to install the relevant ISO 2- and 3-letter
         codes as the enumerated possible values is probably never
         going to be a realistic possibility.  See
         RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
         at http://www.iana.org/assignments/lang-tag-apps.htm for
         further information.

         The union allows for the 'un-declaration' of xml:lang with
         the empty string.

Used By

Complex Types Block, Flow
Elements blockquote, body, dd, del, div, fieldset, ins, li, map, noscript, object, td, th

Source

<xs:element name="form">
  <xs:complexType>
    <xs:complexContent>
      <xs:extension base="form.content">
        <xs:attributeGroup ref="attrs"/>
        <xs:attribute name="action" use="required" type="URI"/>
        <xs:attribute name="method" default="get">
          <xs:simpleType>
            <xs:restriction base="xs:token">
              <xs:enumeration value="get"/>
              <xs:enumeration value="post"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="enctype" type="ContentType" default="application/x-www-form-urlencoded"/>
        <xs:attribute name="onsubmit" type="Script"/>
        <xs:attribute name="onreset" type="Script"/>
        <xs:attribute name="accept" type="ContentTypes"/>
        <xs:attribute name="accept-charset" type="Charsets"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:element>

Sample