The import relationship is used when you want to reuse components from one schema in a schema with a different namespace. In this section, you will create an import relationship between the following schemas provided in the import sub-folder of the SchemaAgentExamples\Tutorial folder:
|•||book_store.xsd: This schema is structured to contain the address of the book store, and details for each book in the inventory.|
|•||library.xsd: This schema is structured to contain the address of the library, and details (card catalog number and whether the book is currently being borrowed) for each book in the library.|
In the course of this examples, you will create an import relationship so that library.xsd imports a type containing other book information from book_store.xsd.
To create an import relationship:
|1.||Select the menu option File | New, or click the New icon in the Standard toolbar, or press Ctrl+N to open a new Design window.|
|2.||In the Explorer window, select book_store.xsd and library.xsd from the import folder and drag them into the new Design window.|
|3.||Click on the small white triangle on the right side of the file box of book_store.xsd and drag the connector line to the file box of library.xsd.|
|4.||Release the mouse button over the word "imports".|
A blue arrow that points from book_store.xsd to library.xsd appears. This arrow shows that an import relationship has been made between these schemas.
© 2019 Altova GmbH