![]() |
| Previous Top Next |
XML Databases |
After having made the connection to the XML database (currently only IBM DB2 XML databases are supported) via the Open Database dialog (see previous sections), you will need to do two things:
| • | Select the cell in the DB that contains the required XML document. The XML document will be loaded automatically as the Working XML File. |
| • | Select the XML Schema for the SPS. |
Selecting the XML Cell and Working XML File
After making the connection to the IBM DB2 database, the Select XML Table dialog (screenshot below) appears.
| 1. | In the Select XML Table dialog, select the table that contains the XML data you wish to create as the Working XML File. In the screenshot below, the table NHE_TEST has been selected. |

| 2. | Click Next. This pops up the Choose XML Cell dialog (screenshot below). If you wish to filter the selection displayed in the pane, enter an SQL WHERE clause and click Update. Note that the WHERE clause should be just the condition (without the WHERE keyword, for example: NHE_TEST_TEXT= 'Two') |

| 3. | Select the cell containing the XML data you wish to create as the Working XML File. In the screenshot above, the selected cell is highlighted in blue. |
| 4. | Click Next. This pops up the Choose XML Schema dialog, in which you select the schema to be used for the SPS. See next section. |
Selecting the XML Schema for the SPS
The schema that will be used for the SPS can be either an XML Schema contained in the DB or a schema at a file location that can be accessed by StyleVision. To select the schema, do the following:
| 1. | In the Choose XML Schema dialog (screenshot below), select the appropriate radio button according to whether you wish to select the schema from among those stored in the DB or from a file location. Note that if a non-DB schema is selected—that is, a schema from an external file—then no DB validation will be carried out. |

| 2. | Select the schema. Schemas stored in the DB are listed in the dropdown list of the Schemas from Database combo box, and can be selected from there. An external schema can be selected by browsing for it. |
| 3. | Click Finish to complete. |
The schema tree
After completing the process to select the XML data and the schema, the selected XML data is created as the Working XML File and the schema is loaded into the SPS. Both are displayed in the Schema Tree window (screenshot below).

The SPS can now be built using the usual StyleVision mechanisms. Note that the data in the Working XML File can be edited in Authentic View and saved to the DB.
| Note: | The Working XML File should be valid against the schema selected for the SPS. Also ensure that the schema's root element (document element) corresponds to the root element of the XML document. |
| • |
See also:
DBs and StyleVision, for a description of how DBs work with StyleVision.
The DB Schema and DB XML files, for a description of the XML Schema and XML data files that are generated from the DB when it is loaded in StyleVision.
Connecting to a Database, for information on connecting to a DN in StyleVision.
Datatype Conversions: DB to XSD, for mappings of DB datatypes to XSD datatypes when the XML Schema is generated from the DB.
|