Adding Attributes to Elements with Simple Content
An element with simple content is one that only contains character data. If such an element contains one or more attributes, then it is a complex-type element. Elements with simple content and attributes are declared using the xs:simpleContent element and then extending the element with the xs:extension element, which must specify the type of simple content contained with the base attribute. The syntax is shown below.
<xs:attribute name="AttName" type="xs:string"/>
For example, the FirstName element in the XML instance below contains only simple content and has a single attribute. Below the instance is the snippet from the Author3.xsd schema that declares the FirstName element.