15.2.29. XML Schema anyAttribute element

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

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

Definition and usage

The anyAttribute element enables the creator to extend the XML document with attributes that are not specified by schema.

Element information

  • 父元素: ComplexType, restriction (both simpleContent and complexContent), extension (both simpleContent and complexContent), attributeGroup

Grammar

<anyAttribute
id=ID
namespace=namespace
processContents=lax|skip|strict
*any attributes*
>
(annotation?)
</anyAttribute>

(? The symbol declares that the element can occur zero or once within the anyAttribute element. )

Attribute

Description

Id

Optional. Specifies the unique ID of the element.

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 for the “person” element. By using elements, creators can add any number of attributes to the “person” element:

<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:anyAttribute/>
  </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.