Defining Elements and Attributes in XML Schemas

You can define an element or attribute as part of a complexType. You can also define an element or an attribute as a top-level item. In other words, in the XML document that defines the XML Schema, the element or attribute is a child of the xsd:schema element. An element or attribute that is an immediate child of the xsd:schema element is a global element or attribute.

A global element or attribute cannot

  • Contain a reference to another element or attribute
  • Specify values for the minOccurs, maxOccurs, or use properties

This section covers the following topics:

Free Stylus Studio XML Training:
W3C Member