15.2.29. XML Schema anyAttribute element

发布时间 : 2025-10-25 13:35:25 UTC      

Page Views: 9 views

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

 (annotation?)  

(? 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 参考手册

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。