Mixed compound types can contain attributes, elements, and text. The XML element, “letter”, contains text and other elements: The following schema declares the “letter” element: 注意: In order for character data to appear between children of “letter”, the mixed property must be set to “true”. The < xs:sequence > tags (name, orderid, and shipdate) mean that the defined elements must appear within the “letter” element in turn. We can also give a name to the complexType element and have the type attribute of the “letter” element refer to the name of complexType (in this way, several elements can refer to the same compound type):
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. Composite types with mixed content ¶
<letter>
Dear Mr.<name>John Smithname>.
Your order <orderid>1032orderid>
will be shipped on <shipdate>2001-07-13shipdate>.
letter>
<xs:element name="letter">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="orderid" type="xs:positiveInteger"/>
<xs:element name="shipdate" type="xs:date"/>
xs:sequence>
xs:complexType>
xs:element>
<xs:element name="letter" type="lettertype"/>
<xs:complexType name="lettertype" mixed="true">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="orderid" type="xs:positiveInteger"/>
<xs:element name="shipdate" type="xs:date"/>
xs:sequence>
xs:complexType>
Principles, Technologies, and Methods of Geographic Information Systems
102