Managing XML Schemas

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  XML Schema Management >

Managing XML Schemas

To add, modify, or delete XML schemas, DatabaseSpy provides the XML Schema management for databases dialog box which can be accessed via a menu command or using a toolbar icon. Unless you are connected to a data source supporting XML, the dialog box appears in the Offline state.

dlg_XMLschema-management-offline

The dialog box provides a Connect to a database ic_quick-connect button which allows you to call the Add a Data Source dialog box and connect to a data source. DatabaseSpy connects to the data source in the background and you can add, delete, or modify XML schemas for this database.

 

If you are connected to at least one data source, when you open the dialog, you can use the left drop-down list to select a data source connection from the project that is currently open in DatabaseSpy. If you select a connection to a database that does not support XML, or for which XML support is not yet implemented in DatabaseSpy, a corresponding information message is displayed in the list box of the dialog box.

 

For supported data source connections, DatabaseSpy automatically displays the XML schemas that are registered with the database in the list box of the XML Schema management for databases dialog box. You can then add schemas, change them, drop schemas from the database, or select an XML schema and view it in XMLSpy. Any changes you make are not directly committed to the database. Edited objects are marked new (ic_new), changed (ic_changed), or deleted (ic_delete) in the list box (see screenshot below). You must actively commit the changes in order for the changes to become effective.

dlg_manage-schemas

By default, only the Schema and Location columns are displayed in the dialog box. You can, however, activate the Show details check box, which is located at the bottom right of the dialog box, to show also the Schema name (if applicable), Namespace, Decomp. (if applicable), and Description columns. If dependent XML schemas are present, you can view these objects by clicking the expand icon in the list box. The dialog box is resizable so as to allow you to conveniently view all the information if the Show details check box is activated and additional information is displayed.

 

All the functions in this dialog box are also available in a context menu that opens when you right-click anywhere in the list box.

mnu_context-xml

 

To open the XML Schema management for databases dialog box:

Select the menu option Tools | XML Schema Management for Databases, or click the XML Schema Management ic_xml-schema icon in the Tools toolbar, or select an XML schema in the Online Browser and choose Manage XML Schemas... from the context menu.

 

Alternatively, if the Result window is in the Editing mode:

 

1.Click the Browse button inside an XML data cell you want to edit and choose Change XML Schema from the popup menu.
2.In the Choose XML Schema dialog box, select the Schema from Database radio button. It is not necessary to select an XML schema from the drop-down list.
3.Click the Manage Schemas... button. The XML Schema management for databases dialog box opens. Please note that the left drop-down list is disabled in this case. Changes can only be made for the active data source.

 

 

To connect to a different database:

Click the Connect to a database ic_quick-connect icon in the upper left part of the XML Schema management for databases dialog box to open the Add a Data Source dialog box. The XML Schema management for databases dialog box remains open in the background.

 

 

To list the available XML schemas of a database connection:

1.In the XML Schema management for databases dialog box, select a database from the left drop-down list or connect to a different database as described above.
2.If required, select a database schema from the right drop-down list.
3.Optionally, activate the Show details check box to display also namespace, decomposition, and description of the listed XML schemas.

© 2019 Altova GmbH