Complex types
Monday, March 29, 2010
1:42 PM
Complex types: 
A ComplexType is something that contains something other than just regular content.
Suppose you want to declare that my name can contain an attribute "language=en" or some such thing. 
 <xs:element name="fullName">
   <xs:complexType>
     <xs:simpleContent>
       <xs:extension base="xs:string">
         <xs:attribute name="language" type="xs:language"/>
       </xs:extension>
     </xs:simpleContent>
   </xs:complexType>
 </xs:element>
matches, e.g., 
<fullName language='en'>Alva Couch</fullName>
Pasted from <[link]> 
Legend: 
xs:complexType: a type that can contain attributes and other (sub-)elements. 
xs:simpleContent: a declaration that sub-elements will not be included. 
xs:extension: we will extend a known type via inheritance (xs:string). 