24.6. all Element

Now that the attributes of a complexType element have been discussed, the elements of a complexType follow in the next sections. The all element requires that every element type in a set of element types must exist. Listing 24.1 and 24.3 demonstrate the mapping from XML schema document to a database schema in a case where implementation of the element types is straightforward, the minOccurs is 0, and the maxOccurs is 1. As a result, the table columns are nullable. If both element types are required, the all element has a minOccurs attribute of 1. Listing 24.8 demonstrates the XML representation of requiredPartOptionType. requiredPartOptionType is made up of two required elements: colorOptionType and sizeOptionType.

Listing ...

Get XML Schema Complete Reference, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.