15.2.28. XML Schema any element

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

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

Definition and usage

The any element enables the creator to extend the XML document through elements that are not specified by schema.

Element information

  • 父元素: Choice, sequence

Grammar

<any
id=ID
maxOccurs=nonNegativeInteger|unbounded
minOccurs=nonNegativeInteger
namespace=namespace
processContents=lax|skip|strict
*any attributes*
>
(annotation?)
</any>

(? The symbol declares that an element can appear zero or once within any element. )

Attribute

Description

Id

Optional. Specifies the unique ID of the element.

MaxOccurs

Optional. Specifies the minimum number of times an any element can appear in the parent element. The value can be an integer greater than or equal to zero. To specify that the any group is optional, set this property to zero. The default value is 1.

MinOccurs

Optional. Specifies the minimum number of times the any element can occur in the parent element. The value can be any number > = 0. Default value is 1

Namespace

Optional. Specifies the namespace that contains elements that can be used. If no namespace is specified, # # any is the default. If you specify a namespace, it must be one of the following values:

  • # # any-elements from any namespace can appear (default).

  • # # other-elements from any namespace other than the target namespace of the element’s parent element can appear.

  • # # local-elements that are not qualified by a namespace can appear.

  • # # targetNamespace-elements from the target namespace of the parent element that contain the element can appear.

  • List of {URI references of namespaces, # # targetNamespace, # # local}-elements from a list of namespaces separated by spaces can appear. The list can contain the following: URI references for namespaces # # targetNamespace and # # local.

ProcessContents

Optional. An indicator indicating how the application or XML processor should handle validation of the XML document based on the element specified by the any element. If no processContents attribute is specified, it defaults to strict. If processContents is specified, it must be one of the following values:

  • The strict-XML processor must obtain the schema of the required namespaces and must validate all elements from those namespaces. (default)

  • Lax-same as strict; however, even if the schema cannot be obtained, no error occurs.

  • The skip-XML processor does not attempt to validate all elements from the specified namespace.

Any attributes

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

Example 1

The following example shows a declaration of the “person” element. By using the < any > element, the creator can extend the content of “person” with any element (after < lastname >):

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

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.