xs:group(definition) — Global elements group declaration that can be referenced within the same schema by other schemas.
<xs:group name = xs:NCName > Content: (xs:annotation?, (xs:all | xs:choice | xs:sequence)) </xs:group>
May be included in: xs:redefine, xs:schema
Groups of elements can be globally defined and used as containers, which can be referenced elsewhere in this schema or in other schemas. These containers, which are almost free of semantics, are very flexible and may be used as building blocks for the definition of local or global complex types.
Being global components, they can also be used to encapsulate element
definitions that cannot be made global, such as unqualified elements
in a schema with target namespaces, multiple elements with the same
name in a schema, elements that should not be used as document
elements, or elements that should be redefined through
xs:redefine
in other schemas.
Element groups can be redefined through
xs:redefine
; the redefinition can be either a
restriction (similar to a complex type derivation by restriction) or
an extension. (This is more flexible than a complex type extension
since the location where the base group is included in the new group
can be chosen, while the new elements are always located after the
base type during a derivation by extension.)
Any of the three compositors (xs:all
,
xs:sequence
, or xs:choice
) may
be used to create an element group.
When a group is created using a xs:all
compositor,
this group inherits all the restrictions of
xs:all
. In other words, including a
xs:all
compositor in a group is not a workaround
to avoid the fundamental restrictions of xs:all
!
Group definition cannot be recursive.
3.19.211.134