Altova SchemaAgent 2025

In the previous section, you redefined schema event_registration.xsd in schema book_order.xsd by adding a customer number to the complex type personInfoType. In this section, you will learn how to use this redefined complex type in schema book_order.xsd.

To use a redefined type in the target schema:

1.In the schema overview for book_order.xsd, click the Display Diagram ic_component icon of the root element book_order.

book_order_content_model

2.Right-click the sequence element and select Add child | Element from the context menu.

spy_add-child-element-book

3.Enter "customerInfo" as the name for this element.

4.With this element still selected, in the Details entry helper, select personInfoType from the type drop-down list.

sa_tutorial_using_redefined3

The redefined type is now being used as the type of an element in book_order.xsd.

book_order_content_model2

 

Using types without redefinition

Within a redefine relationship, you can also use types from the source schema without redefining them in the target schema.

To use a type in the target schema as is:

1.In the display diagram for the element book_order, right-click the sequence element and select Add child | Element from the context menu.

2.Enter "creditCardInfo" as the name for this element.

3.With this element still selected, in the Details entry helper, select creditCardInfoType from the type drop-down list.

4.Save the file. The type creditCardInfoType is now being used as the type of an element in book_order.xsd.

book_order_content_model3

© 2018-2024 Altova GmbH