Testing templates with a stand-alone data file

You can create a single file of real data from your data source and store it as a reusable data file for testing templates as you develop them. This approach is useful when you are using similar data sets to create templates that contain similar types of information, but are presented in different ways for document viewers.

About this task

First, create an .xml file of your data and then specify that file in the document generation wizard to generate a test document.

Saving your data into an .xml file

You can access data from a data source by using the preview data feature in Document Studio or by using a web browser.

Accessing data through Rational Publishing Engine

You can use the preview data feature in Rational® Publishing Engine to view data from your data source and save it to your computer.

Procedure

  1. Connect to a data source schema.
  2. In the Data Source Schema view, right-click a schema and select Preview Data. The URI entered for the default URI property is used to retrieve the data. If the default URI property does not have a value entered, you must enter a Root URL in the Data preview window.
  3. Optional: In the Data Preview window, enter or edit the Root URL to a data source query.
  4. Click Preview.
  5. If necessary, enter the credentials to authenticate with the data source including the user name and password and click OK. In the Result field, the data displays in XML format.
  6. Click Save and choose a location to save the data in an XML file.
  7. Click Close.

Accessing data through a web browser

For some data sources with web clients, view data from your data source in a web browser and save it to your computer.

Procedure

  1. Copy the data source URL into a web browser to verify that the data loads correctly.
  2. Save the data as an .xml file.

Generating documents with stand-alone data

After you save your data as an .xml file, you can specify it in the document generation wizard.

Procedure

  1. In the Launcher or Document Studio, click Document Specification > Generate > Configure and Generate Document.

    You can also click the Configure and generate document icon Configure and generate document icon in the toolbar.

    A configuration wizard opens to allow you to make additional selections for the document generation before generating the document. The progress bar displays the information that must be configured in five sections:
    • Templates
    • Data sources
    • Variables
    • Output
    • Summary
    You can click a section or an item in the progress bar to jump to that page in the wizard.
    Tip: As long as there is at least one data source and one output format selected, you can click Finish at any time to begin the document generation or click Next to continue with the configuration wizard.
  2. When you get to the Data sources page, click Browse to select a local file.
  3. Select the Open Local or Remote tab.
  4. Select the .xml file that you created.
  5. Complete the wizard.

Feedback