![]() |
| Previous Top Next |
Including Types |
In this section, you will learn how the elements of an included schema are actually used in the target schema. To this aim, you have to open and edit the target schema, for example dvd_order.xsd, in XMLSpy.

Notice that the schema contains an include statement, which was automatically added when you connected the two schemas in the Include section discussed previously. The global complex types that you have created in the previous section of the tutorial are now available in dvd_order.xsd.
To include personInfoType and creditCardInfoType in dvd_order.xsd:
| 2. | In XMLSpy, click the Display Diagram |

| 3. | Right-click the sequence element and select Add child | Element. |

| 4. | Enter "customerInfo" as the name for this element. |
| 5. | With this element still selected, in the Details entry helper, select personInfoType from the type drop-down list. Components that are part of a relation between the two schemas are in black, all others are in blue. |

| 6. | Right-click on the sequence element and select Add child | Element. |
| 7. | Enter "creditCardInfo" as the name for this element. |
| 8. | With this element still selected, in the Details entry helper, select creditCardInfoType from the type drop-down list. |
| 9. | Save the file. |
You have now included two types from the schema event_registration.xsd in the schema dvd_order.xsd.

|