11.4. An Example of a Complex Type Specifying Mixed Content

A complex type can specify mixed content. Mixed content means that an element whose element type’s structure type is this complex type can contain text interspersed with elements. The text is always free form (there is no way to specify constraints on the text). The elements are typically partially confined. Listing 11.4 is catalogEntryDescriptionType, which permits valid lists of part numbers to be interspersed with text.

Listing 11.4. A Complex Type Specifying Mixed Content (catalog.xsd)
 <xsd:complexType name="catalogEntryDescriptionType" mixed="true" id="catalogEntryDescriptionType.catalog.cType"> <xsd:annotation> <xsd:documentation xml:lang="en"> Allow the description of a part ...

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.