Please enable JavaScript to view this site.

Altova SchemaAgent 2022

In this section, you will learn how add types from an included schema to a target schema. To this aim, you have to open and edit the target schema, for example dvd_order.xsd, in XMLSpy.

To include types into dvd_order.xsd:

1.In SchemaAgent Client, right-click dvd_order.xsd and select Edit in XMLSpy (Ctrl+Y) from the context menu. Notice that the schema already 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.

sa_tutorial_include_types1

2.In XMLSpy, click the Display Diagram ic_component icon for the element dvd_order to display its content model.

dvd_order_content_model

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

spy_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.

sa_tutorial_include_types4

 

Note:The "type" list may contain items in black and blue color. Types in black are those available in the current namespace. Types in blue are those available on the SchemaAgent's search path. If you cannot see any items in blue, double-check that XMLSpy is connected to the SchemaAgent's LocalServer, as described in Connecting XMLSpy to the LocalServer.

 

6.Using the same procedure, add a new element called "creditCardInfo" of type creditCardInfoType to the sequence. The Schema view should now look as follows:

including_a_type

7.Save the file.

 

You have now included two types from the schema event_registration.xsd in the schema dvd_order.xsd.

© 2015-2021 Altova GmbH