Easy Tutorial
❮ Schema Schema El Keyref ❯

XML Schema group Element



Definition and Usage

The group element is used to define a group of elements that are used within complex type definitions.

Element Information

Syntax

(? The question mark symbol indicates that the element can appear zero or one time within the group element.)

Attribute Description
id Optional. Specifies a unique ID for the element.
name Optional. Specifies the name of the group. The name must be a colon-less name (NCName) as defined in the XML Namespace specification. This attribute is used only when the schema element is the parent of the group element. In this case, the group is a model group used by complexType, choice, and sequence elements. The name attribute and ref attribute cannot appear together.
ref Optional. References the name of another group. The ref value must be a QName. ref can include a namespace prefix. The name attribute and ref attribute cannot appear together.
maxOccurs Optional. Specifies the maximum number of times the group element can appear within its parent element. The value can be an integer greater than or equal to zero. Use the string "unbounded" if you do not want to set any limit on the maximum number of occurrences. The default value is 1.
minOccurs Optional. Specifies the minimum number of times the group element can appear within its 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 non-schema namespaces.

Example 1

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


❮ Schema Schema El Keyref ❯