Complex Type: Attribute Declaration | ||
Complex type elements contain attributes. In an XML schema document, the syntax for attribute declaration is: <xs:attribute name="attribute_name" type="data_type" where:
An attribute can contain only the data type that is specified while declaring the attribute. For example, in the code snippet on the right, LocationID is the name of an attribute and xs:integer indicates that LocationID can contain only numeric values. In addition, optional indicates that the LocationID attribute is optional within the element declaration. |
|
|
Click the Next button to continue. |