Simple types with attributes

When an element has simple content, but also has attributes, it cannot simply refer to a data type, such as 'string'. Instead, it must include the ComplexType element, so that attribute declarations can be made. However, there remains the problem of how to specify the simple data type of the element content. The SimpleContent element is used to indicate that the complex element will actually be based on a simple data type. The Extension element is employed, both to specify the data type of the element in its Base attribute, and to extend the type by adding the required attribute:

<complexType>
  <simpleContent>
    <extension base="string">
      <attribute name="security" type="string" />
    </extension>
  </simpleContent>
</complexType>

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.45.162