The attribute Element
An attribute type, whose XML representation is the attribute element,
constrains a corresponding element in an
XML instance. Specifically, an
element type associates a name with a simple type.
In the trivial case, the simple type is just a built-in datatype.
The subsequent example describes a
customer element type that has a
customerID attribute type:
<xsd:element name="customer">
<xsd:complexType>
<xsd:attribute name="customerID"
type="xsd:string"
use="required"/>
</xsd:complexType>
</xsd:element>
|