15.2.51. XML Schema sequence element

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

Page Views: 10 views

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

Definition and usage

The sequence element requires the elements in the group to appear in the containing elements in the specified order. Each child element can appear 0 to any number of times.

Element information

  • 父元素: Group, choice, sequence, complexType, restriction (both simpleContent and complexContent), extension (both simpleContent and complexContent)

Grammar


(annotation?,(element|group|choice|sequence|any)*)

(? Declares that the element can appear zero or once in the sequence element. )

Attribute

Description

Id

Optional. Specifies the unique ID of the element.

MaxOccurs

Optional. Specifies the maximum number of times an any 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.

MinOccurs

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.

Any attributes

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

Example 1

This example is a declaration for the “personinfo” element, which must contain the following five elements in order: “firstname”, “lastname”, “address”, “city”, and and “country”.

<xs:element name="personinfo">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="firstname" type="xs:string"/>
      <xs:element name="lastname" type="xs:string"/>
      <xs:element name="address" type="xs:string"/>
      <xs:element name="city" type="xs:string"/>
      <xs:element name="country" type="xs:string"/>
    xs:sequence>
  xs:complexType>
xs:element>
    

Example 2

This example is a declaration for the “pets” element, which can contain zero or more dog and cat elements:

<xs:element name="pets">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element name="dog" type="xs:string"/>
      <xs:element name="cat" type="xs:string"/>
    xs:sequence>
  xs:complexType>
xs:element>
   

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

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

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