Annotating XSD files with the mapping editor

This user development scenario outlines XSD development activities. These activities can only be performed in the Data Development Project.

In order to work with the available target schema tables in the mapping editor, you must be connected to a server. After you connect to the server, you can add the XSD document set to the XML Schema Documents folder. You can do this by creating new documents in the XSD editor, by dragging and dropping XSD documents from the Database Explorer, or by importing XSD documents from the local file system. After you have added the necessary XSD documents, you can right-click the primary schema document for the intended schema and select Open With > Annotated XSD Mapping Editor .

If this is the first time the mapping editor is opened for the XSD set, a window will open where you can specify the relevant root elements. This filter will be saved by the defined mappings inside the XSD for subsequent use. You can later add or remove root elements using the Filter window in the mapping editor. After you specify the root elements, you will be prompted to define the relevant database schemas that you want to map to. This information will also be saved by the defined mappings inside the XSD for subsequent use. You can later add or remove database schemas in the mapping editor.

You can now map elements and attributes from the source XSD set to columns in tables in the target schema. In addition, you can add various refinements to the mappings in the mapping editor. Once you are satisfied with the mapping changes, you can save the document. Similarly, you can follow the same steps except select the primary XSD for a set of documents that have already been annotated (re-annotate a set of XSD documents).

Use the XML Schema Registration wizard to register an annotated schema to DB2. In the wizard, you must select the Use XML Schema for decomposition checkbox. You can also test the decomposition of the registered annotated schema using the Table editor.


Feedback