September 2002
Intermediate to advanced
1008 pages
22h 3m
English
Attribute types have fewer options than element types, simple types, or complex types. Because of the simplicity of attribute types, this section covers only three concepts: when to use an attribute type versus an element type, global and local attribute types, and how attribute types interact with namespaces in the corresponding XML instances.
In many XML schemas, the use of an attribute type versus an element type is an arbitrary choice. In the following example, the customer’s ID is an attribute type:
<xsd:element name="customer"> <xsd:complexType> <xsd:attribute name="customerID" type="xsd:string" use="required"/> </xsd:complexType> </xsd:element> ...
Read now
Unlock full access