24.2. An Example of a Complex Type Mapping to a Database Schema
Listing 24.1 iterates Listing 11.3 and demonstrates the XML schema document representation of partOptionType. partOptionType requires content of two elements, which are colorOptionType and sizeOptionType.
Listing 24.1. An XML Schema Document Fragment of a Complex Type That Supports Nested Elements (catalog.xsd)
<xsd:complexType name="partOptionType" block="#all" final="#all" id="partOptionType.catalog.cType"> <xsd:annotation> <xsd:documentation xml:lang="en"> Appropriate parts can have a color, a size, or both. Note that the use of the "all" element indicates that the "color" and "size" are unordered. That is, they can appear in either order. -- Shorthand Notation -- </xsd:documentation> ... |
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.