September 2002
Intermediate to advanced
1008 pages
22h 3m
English
A simple type can specify a union of other simple types. The contents in the XML instance of an element constructed from a union can be any of the valid types. A union can be thought of as an “or” construct. That is, “a union b union c” is the conceptual representation of “a or b or c.”
Tip
A union may contain member types that have completely distinct base types, as demonstrated in Listing 10.8.
Listing 10.8 demonstrates the XML representation of the colorOptionType, which is a union of the anonymously declared standardColorOptionType, fancifulColorOptionType, and codedColorOptionType enumerations.
<xsd:simpleType name="colorOptionType" id="catalog.colorOption.union.sType"> ... |
Read now
Unlock full access