15.2.49. XML Schema element

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

Page Views: Stats unavailable

XML Schema 参考手册 完整 XML Schema 参考手册

Definition and usage

The schema element defines the root element of the schema.

Element information

  • 父元素: (no parent element)

Grammar

<schema
id=ID
attributeFormDefault=qualified|unqualified
elementFormDefault=qualified|unqualified
blockDefault=(#all|list of (extension|restriction|substitution))
finalDefault=(#all|list of (extension|restriction|list|union))
targetNamespace=anyURI
version=token
xmlns=anyURI
*any attributes*
>
((include|import|redefine|annotation)*,(((simpleType|complexType\|
group|attributeGroup)|element|attribute|notation),annotation*)*)
</schema>

Attribute

Description

Id

Optional. Specifies the unique ID of the element.

AttributeFormDefault

Optional. The form of the attribute declared in the target namespace of the schema. The value must be one of the following strings: “qualified” or “unqualified”. The default is “unqualified”.

  • “unqualified” indicates that attributes of the target namespace do not need to be qualified by a namespace prefix.

  • “qualified” indicates that the attributes of the target namespace must be qualified with a namespace prefix.

ElementFormDefault

Optional. The form of the element declared in the target namespace of the schema. The value must be one of the following strings: “qualified” or “unqualified”. The default is “unqualified”.

  • “unqualified” indicates that the elements of the target namespace do not need to be qualified by a namespace prefix.

  • “qualified” indicates that the elements of the target namespace must be qualified with a namespace prefix.

BlockDefault

Optional. Specifies the default value of the block attribute on the element and complexType elements in the target namespace. The block attribute prevents complex types (or elements) with a specified derived type from being used instead of inherited complex types (or elements). The value can contain # all or a list that is a subset of extension, restriction, or substitution:

  • Extension-prevents a complex type derived from an extension from being used to replace that complex type.

  • Restriction-prevents a complex type derived by restriction from being used to replace that complex type.

  • Substitution-prevents the replacement of elements.

  • # all-prevents all derived complex types from being used to replace that complex type.

FinalDefault

Optional. Specifies the default values for the final attribute of the element, simpleType, and complexType elements in the target namespace of the schema. The final attribute prevents the specified derived type of the element, simpleType, or complexType element. For element and complexType elements, the value can contain # all or a list that is a subset of extension or restriction. For simpleType elements, this value can also contain list and union:

  • Extension-by default, elements in this schema cannot be derived by extension. Applies only to element and complexType elements.

  • Restriction-prevents derivation by restriction.

  • List-prevents derivation from lists. Applies only to simpleType elements.

  • Union-prevents derivation by federation. Applies only to simpleType elements.

  • # all-by default, elements in this schema cannot be derived in any way.

TargetNamespace

A URI reference to the namespace of the schema. You can also assign a prefix to the namespace. If no prefix is assigned, the schema component of the namespace can be used with unqualified references.

Version

Optional. Specify the version of schema.

Xmlns

Specifies a URI reference to one or more namespaces used in this schema. If no prefix is assigned, the schema component of the namespace can be used with unrestricted references.

Any attributes

Optional. Specifies any other attributes with the non-schema namespace.

Example 1

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="values" type="xs:string">
</xs:schema>

Example 2

In this example, the schema component (element name, type) in the http://www.w3.org/2001/XMLSchema namespace is unrestricted, while http://www.w3school.com.cn/w3schoolschema (mystring) is restricted by the wsc prefix:

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsc="http://www.w3cschool.cc/w3shoolsschema">
<element name="fname" type="wsc:mystring"/>
</schema>

XML Schema 参考手册 完整 XML Schema 参考手册

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.