
160 • XML & Related Technologies
The xsd:sequence grouping mandates that every element in a group must appear exactly once, and
also in the same order in which the elements are listed.
Let us discuss these now.
4.3.1 Mandating All Elements
When we use xsd:all, we mean that an element may occur. If it occurs, it must occur only once. The order of
elements is not significant.
Consider the example shown in Figure 4.25.
<xsd:complexType name =”EmpType”>
<xsd:sequence>
<xsd:element name = “NAME”>
<xsd:complexType>
<xsd:all>
<xsd:element name = “FIRST_NAME” type = “xsd:string”
minOccurs = “1” maxOccurs = “1”/>
<xsd:element name = “LAST_NAME” ...