15.2.11. XSD contains only elements

发布时间 :2025-10-25 12:23:21 UTC      

A compound type element that contains only elements is an element that can only contain other elements.

Compound types contain only elements

The XML element, “person”, contains only other elements:

<person>
  <firstname>John</firstname>
  <lastname>Smith</lastname>
</person>

You can define the “person” element in schema as follows:

<xs:element name="person">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="firstname" type="xs:string"/>
      <xs:element name="lastname" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

Please pay attention to this. It means that the defined elements must appear in the “person” element in the above order.

Or you can set a name for the complexType element and have the type attribute of the “person” element refer to this name (if you use this method, several elements can refer to the same compound type):

<xs:element name="person" type="persontype"/>
<xs:complexType name="persontype">
  <xs:sequence>
    <xs:element name="firstname" type="xs:string"/>
    <xs:element name="lastname" type="xs:string"/>
  </xs:sequence>
</xs:complexType>
Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.