Skip to main content
IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : XML : Education - Tutorials
XML Schema Infoset Model, Part 2
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
5. Content models
  


Model group definitions page 5 of 6


The <group> element is used both for the definition of a group and for any reference to a named group. You can use a model group to define a set of elements that can be repeated through the XML instance document. This is useful for building a complex type definition and other model groups. Named model groups contain a composition, which can be one of the following <sequence>, <choice>, or <all> child elements. A named model group consists of element declarations, wildcards, and other model groups. Named model groups must have a name attribute and are declared at the top level of the schema.

Referencing a global group definition
You can use the ref attribute to reference a <group> by target namespace prefix and name in order to use the group description. This is done by calling the following method on the XML Schema model: org.eclipse.xsd.XSDModelGroupDefinition.setResolvedModelGroupDefinition(XSDModelGroupDefinition).

The <group> element contains attributes, which are described by XML Schema Part 1: Structures of the standard.

The XML Schema model java interface for a <group> is org.eclipse.xsd.XSDModelGroupDefinition and can be created by calling org.eclipse.xsd.XSDFactory.eINSTANCE.createXSDModelGroupDefinition().


Main menuSection menuFeedbackPreviousNext
About IBM | Privacy | Legal | Contact