Editing a schema

Starting in version 1.3 release, this product includes the XML schema (.xsd) editor from the Web Tools Platform (WTP) Project based on Eclipse technology. You have the option to edit a schema within the product using this built-in editor. Or you can choose to edit the schema using an external editor by exporting a data source schema that is used in a template and modify it as necessary. Then, add the revised data source schema back to the template by replacing the previous version with the new version.

Before you begin

Important: Back up your template by saving a copy of it before you work with your schema.

About this task

Changing the schema does not change the data that is used in the generated report. Changing the schema affects only how Rational® Publishing Engine uses the data. You cannot edit with the Schema discovery wizard, export, or replace data source schemas that contain custom attributes.
Tip: When a data source schema has a root and a child node with the same name, infinite recursion occurs. Infinite recursion is the process of document generation that runs infinitely. Avoid issues with infinite recursion by ensuring that all nodes have unique names.

Editing a schema using a built-in editor

Procedure

  1. In the Outline view, expand Data Source Schemas.
  2. Right-click a schema and select Open Schema in Editor. The XML schema (.xsd file) opens in the XML schema editor, you can use the Design and Source views for editing the schema. For more details about the editor, see XML schema editor topic.
  3. Save the changes.

Editing a schema using an external editor

Procedure

  1. Export a schema:
    1. In the Outline view, expand Data Source Schemas.
    2. Right-click a schema and select Export Schema.
    3. Select a location to save the .xsd file in and click OK.
    4. Open the .xsd file with a text editor.
    5. Edit the schema.
    6. Save the changes.
  2. Replace a schema:
    1. In the Document Studio Outline view, right-click the schema that you exported and select Replace Schema.
    2. Click Browse and select the .xsd file that you modified.
    3. Click OK. If all of the queries in the new data source schema resolve with the queries that were added to your template, then the schema is replaced and you are not required to make any further changes.

      If all of the queries in the new data source schema cannot be resolved, continue to the next step.

    4. If all of the queries in the new data source schema cannot be resolved with the queries that were added to your template, then you must select one of the following options:
      • Remove data references: Allow Rational Publishing Engine to remove the queries from your template that cannot be resolved with the data source schema.
      • Specify valid replacement: Replace each unresolved query with a query that exists in the new data source schema.
    5. If you selected Specify valid replacement, in the Specify Valid Replacement window, specify replacement queries. Select the cell in the Replacement Name column to choose a query from a dropdown list.
    When the schema is replaced, Rational Publishing Engine verifies that the new schema is compatible with the previous one. If the new schema is not compatible, there might be errors in your revisions.

    Verify that the schema is still synchronized with the data from the data provider. Generate a preview of your template to verify that the data is presented as expected. If there are errors in the schema that are affecting the output, you can review the error logs to identify the errors.


Feedback