15.2.40. XML Schema group element

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

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

Definition and usage

The group element is used to define the group of elements used in a complex type definition.

Element information

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

Grammar

<group
id=ID
name=NCName
ref=QName
maxOccurs=nonNegativeInteger|unbounded
minOccurs=nonNegativeInteger
*any attributes*
>
(annotation?,(all|choice|sequence)?)
</group>

(? The symbol is declared in the group element, which can appear zero or once. )

Attribute

Description

Id

Optional. Specifies the unique ID of the element.

Name

Optional. Specifies the name of the group. The name must be a colon-free name (NCName) defined in the XML namespace specification.

This attribute is used only if the schema element is the parent of the group element. In this case, group is the model group used by the complexType, choice, and sequence elements.

The name property and the ref property cannot appear at the same time.

Ref

Optional. Reference the name of another group. The ref value must be QName. Ref can contain namespace prefixes.

The name property and the ref property cannot appear at the same time.

MaxOccurs

Optional. Specifies the maximum number of times an group 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 group element can appear in the parent element. The value can be an integer greater than or equal to zero. The default value is 1.

Any attributes

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

Example 1

The following example defines a group that contains a sequence of four elements and uses this group element in a complex type definition:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:group name="custGroup">
  <xs:sequence>
    <xs:element name="customer" type="xs:string"/>
    <xs:element name="orderdetails" type="xs:string"/>
    <xs:element name="billto" type="xs:string"/>
    <xs:element name="shipto" type="xs:string"/>
  </xs:sequence>
</xs:group>
<xs:element name="order" type="ordertype"/>
<xs:complexType name="ordertype">
  <xs:group ref="custGroup"/>
  <xs:attribute name="status" type="xs:string"/>
</xs:complexType>
</xs:schema>

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.