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.