15.2.37. XML Schema element element

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

Page Views: 9 views

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

Definition and usage

The element element defines an element.

Element information

  • 父元素: Schema, choice, all, sequence, group

Grammar

 annotation?,(simpleType|complexType)?,(unique|key|keyref)\*  

(? The symbol declaration is in the element element, which can appear zero or once, and the * symbol declares that the element can appear zero or more times. ) optional. Indicates whether an explicit zero value can be assigned to the element. This item applies to the content of the element and is not an attribute of the element. The default is false. If nillable is true, it enables the instance of the element to set the nil property to true. The nil attribute is defined as part of the instance’s XML schema namespace.

Attribute

Description

Id

Optional. Specifies the unique ID of the element.

Name

Optional. Specifies the name of the element. This attribute is required if the parent element is a schema element.

Ref

Optional. A reference to another element. The ref attribute can contain a namespace prefix. If the parent element is a schema element, this attribute is not used.

Type

Optional. Specify the name of the built-in data type, or specify the name of the simpleType or complexType element.

SubstitutionGroup

Optional. Specifies the name of the element that can be used to replace the element. The element must have the same type or a type derived from the specified element type. This attribute cannot be used if the parent element is not a schema element.

Default

Optional. Specify a default value for the element (used only if the element content is a simple type or textOnly).

Fixed

Optional. Specify a fixed value for the element (used only if the element content is a simple type or textOnly).

Form

Optional. The form of the element. The default value is the value of the elementFormDefault attribute of the schema element that contains the attribute. The value must be one of the following strings: “qualified” or “unqualified”.

This attribute cannot be used if the parent element is a schema element.

  • If the value is “unqualified”, you do not need to qualify the element with a namespace prefix.

  • If the value is “qualified”, the element must be qualified with a namespace prefix.

MaxOccurs

Optional. Specifies the maximum number of times an element element can appear in the parent element. The value can be an integer greater than or equal to zero. If you do not want to set any limit on the maximum number of times, use the string “unbounded”. The default value is 1.

This attribute cannot be used if the parent element is a schema element.

MinOccurs

Optional. Specifies the minimum number of times an element element can appear in the parent element. The value can be an integer greater than or equal to zero. The default value is 1.

This attribute cannot be used if the parent element is a schema element.

Nillable

Abstract

Optional. Indicates whether the element can be used in the instance document. If the value is true, the element cannot appear in the instance document. Instead, other elements whose substitutionGroup attribute contains the qualified name (QName) of the element must appear at the location of the element. Multiple elements can reference the element in their substitutionGroup attribute. The default value is false.

Block

Optional. The derived type. The block attribute prevents an element with a specified derived type from being used to replace that element. The value can contain # all or a list that is a subset of extension, restriction, or substitution:

  • Extension-prevents an element derived from an extension from being used to replace it.

  • Restriction-prevents an element derived by restriction from being used to replace it.

  • Substitution-prevents a derived element from being replaced by replacing it.

  • # all-prevents all derived elements from being used to replace this element.

Final

Optional. Sets the default value of the final attribute on the element element. This attribute cannot be used if the parent element is not a schema element. The value can contain # all or a list that is a subset of extension or restriction:

  • Extension-prevents an element derived by extension from being used to replace it

  • Restriction-prevents a derived element from being replaced by restricting it

  • # all-prevents all derived elements from being used to replace this element

Any attributes

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

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

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