All properties are declared as simple types. Simple elements cannot have attributes. If an element has an attribute, it is treated as a compound type. But the property itself is always declared as a simple type. The syntax for defining attributes is Here, xxx refers to the name of the attribute, and yyy specifies the data type of the attribute. XML Schema has many built-in data types. Xs:string Xs:decimal Xs:integer Xs:boolean Xs:date Xs:time This is the XML element with attributes: This is the corresponding attribute definition: Property can have a specified default value or fixed value. When no other value is specified, the default value is automatically assigned to the element. In the following example, the default value is “EN”: Fixed values are also automatically assigned to elements, and you cannot specify additional values. In the following example, the fixed value is “EN”: By default, properties are optional. To specify the attribute as required, use the “use” attribute: When an XML element or attribute has a defined data type, a qualification is added to the content of the element or attribute. If the XML element is of type “xs:date” and contains a string similar to “Hello World”, the element will not be validated. With XML schema, you can also add your own qualifications to your XML elements and attributes. These qualifiers are called facet. You’ll learn more about facet in the next section.
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. What is an attribute? ¶
How do I declare properties? ¶
<xs:attribute name="xxx" type="yyy"/>
The most common types are: ¶
Example ¶
<lastname lang="EN">Smithlastname>
<xs:attribute name="lang" type="xs:string"/>
Default value and fixed value of the attribute ¶
<xs:attribute name="lang" type="xs:string" default="EN"/>
<xs:attribute name="lang" type="xs:string" fixed="EN"/>
Optional and required properties ¶
<xs:attribute name="lang" type="xs:string" use="required"/>
Limitation of content ¶
Principles, Technologies, and Methods of Geographic Information Systems
102