Table of contentsAppendices |
3.7 Model Group DefinitionsModel Group DefinitionsA model group definition associates a name and optional annotations with a [Model Group]. By reference to the name, the entire model group can be incorporated by reference into a [term]. Model group definitions are provided primarily for reference from the [XML Representation of Complex Type Definitions] (see [complexType] and [group]). Thus, model group definitions provide a replacement for some uses of XML's [parameter entity] facility. NOTE:<xs:group name="myModelGroup"> <xs:sequence> <xs:element ref="someThing"/> . . . </xs:sequence> </xs:group> <xs:complexType name="trivial"> <xs:group ref="myModelGroup"/> <xs:attribute .../> </xs:complexType> <xs:complexType name="moreSo"> <xs:choice> <xs:element ref="anotherThing"/> <xs:group ref="myModelGroup"/> </xs:choice> <xs:attribute .../> </xs:complexType> The Model Group Definition Schema Component[top]The Model Group Definition Schema ComponentThe model group definition schema component has the following properties: [Model Group Definition]Model group definitions are identified by their [mg-name] and [mg-target_namespace]; model group identities must be unique within an XML Schema. See [References to schema components across namespaces] for the use of component identifiers when importing one schema into another. Model group definitions per se do not participate in valid, but the [term] of a particle may correspond in whole or in part to a model group from a model group definition. [model_group] is the [Model Group] for which the model group definition provides a name. See [Annotations] for information on the role of the [mg-annotation] property. XML Representation of Model Group Definition Schema Components[top]XML Representation of Model Group Definition Schema ComponentsThe XML representation for a model group definition schema component is a [group] element information item. It provides for naming a model group for use by reference in the XML representation of complex type definitions and model groups. The correspondences between the properties of the information item and properties of the component it corresponds to are as follows: If there is a Otherwise, the item will have a The name of this section is slightly misleading, in that the second, un-named,
case above (with a
Given the constraints on its appearance in content models, an [all] should only occur as the only item in the [children] of a named model group definition or a content model: see [Constraints on Model Group Schema Components]. Constraints on XML Representations of Model Group Definitions[top]Constraints on XML Representations of Model Group Definitions Model Group Definition Representation OKIn addition to the conditions imposed on [group] element information items by the schema for schemas, the corresponding model group definition, if any, must satisfy the conditions set out in [Constraints on Model Group Schema Components]. Model Group Definition Validation Rules[top]Model Group Definition Validation RulesNone as such. Model Group Definition Information Set Contributions[top]Model Group Definition Information Set ContributionsNone as such. Constraints on Model Group Definition Schema Components[top]Constraints on Model Group Definition Schema ComponentsAll model group definitions (see [Model Group Definitions]) must satisfy the following constraint. Model Group Definition Properties CorrectThe values of the properties of a model group definition must be as described in the property tableau in [The Model Group Definition Schema Component], modulo the impact of [Missing Sub-components]. |