Skip to main content
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 groups page 2 of 6

Model Groups
XML Schema contains three model group elements, which are described in the XML Schema specification:

  • <sequence>
  • <choice>
  • <all>
The <sequence> element requires the element in the group to appear in the specified sequence within the containing element.
The <choice> element allows one and only one of the elements contained in the group to be present within the containing element.
The <all> element allows the elements in the group to appear (or not appear) in any order in the containing element.

The XML Schema model java interface for a <sequence>, <choice> or <all> is org.eclipse.xsd.XSDModelGroup and can be created by calling org.eclipse.xsd.XSDFactory.eINSTANCE.createXSDModelGroup().

An XSDModelGroup has a compositor, which is one of the following:
  • org.eclipse.xsd.XSDCompositor.SEQUENCE_LITERAL
  • org.eclipse.xsd.XSDCompositor.CHOICE_LITERAL
  • org.eclipse.xsd.XSDCompositor.ALL_LITERAL

Main menuSection menuFeedbackPreviousNext
About IBM | Privacy | Legal | Contact