The example above indicates that the "code" attribute has a restriction. The only acceptable value is two of the uppercase letters from a to z.
To declare an attribute using an existing attribute definition within a complex type, use the ref attribute:
Attributes can have either a default value OR a fixed value specified. A default value is automatically assigned to the attribute when no other value is specified. In the following example the default value is "EN":
A fixed value is also automatically assigned to the attribute when no other value is specified. But unlike default values; if you specify another value than the fixed, the document is considered invalid. In the following example the fixed value is "EN":
All attributes are optional by default. To explicitly specify that the attribute is optional, use the "use" attribute:
To make an attribute required: