Information Technology Reference
In-Depth Information
9.2.3.1.1
<complexType>
< sequence >
<element ref = “DOC: a” />
<element ref = “DOC: b” />
<element ref = “DOC: c” />
< /sequence >
</complexType>
Sequence Control
As shown in Figure 9.5, the sequence rule “(a, b, c)” within XML schema
element declaration indicates that element “a” is followed by element “b,”
which in turn is followed by element “c,” as shown above. All three ele-
ments will be indispensable in the document. This pattern in the XML
schema is similar to the Sequence in the workl ow schema patterns [14].
9.2.3.1.2
<complexType>
< choice >
<element ref = “DOC: a” />
<element ref = “DOC: b” />
<element ref = “DOC: c” />
< /choice >
</complexType>
Choice Control
The choice rule “(a|b|c)” indicates a choice between the elements “a,”
“b,” and “c.” Figure 9.6 describes this type of relationship. Because the
choice control is exclusive, the selection of “a,” “b,” and “c” will cause the
neglect of others. This pattern XML schema is similar to the Exclusive
Choice workl ow schema pattern in [14].
9.2.3.1.3
The XML schema author can also dictate how often an element can appear
at each location. If the element is required and may not repeat, no further
Occurrence Control
a
b
c
FIGURE 9.5
Sequence control from XML schema.
a
b
c
FIGURE 9.6
Choice control from XML schema.
Search WWH ::




Custom Search