Refers to a declared attribute type that can appear within the scope of the named ElementType element.
<attribute default="default-value" type="attribute-type" [required="{yes | no}"]>
Number of occurrences | Number of attribute types specified in the schema. |
Parent elements | ElementType |
Child elements | (No child elements) |
Requires closing tag | Yes. XML Schema is an XML grammar, and like all XML grammars, all tags must have closing tags to satisfy the definition of well-formed. |
When the required attribute is set to "yes" and the default attribute specifies a default value, the supplied default value must always be the value, and documents containing other attribute values are invalid.
When the required attribute is set to "yes" and no default is specified, each element whose type is declared to have the attribute must supply its value.