Attributes can be declared in the 'complexType' element via the 'attribute' element.
Example:
<xs:attribute name="href" type="xs:anyURI"/>
The 'use' attribute specifies optionality and can have values 'optional', 'required', 'prohibited'.
Don't worry about the value 'prohibited' for now...
In context:
<xs:element name="link"> <xs:complexType> <xs:attribute name="href" type="xs:anyURI"/> </xs:complexType> </xs:element>