< Previous | Next >

Lesson 2: Add data and queries

Add a data source schema, select a data file for previewing, and then add details for the Full Tag column.
The data source schema gives structure to data from a data provider. In this lesson, you are selecting that data source schema and the data file to provide your template with the information that is to be visible in the first column of the published table. The column itself is not static; the column can adjust to the amount of data in the data file, but the first column is not providing data from custom attributes yet. The first column appears in the output result no matter what you enter for the variables you create in later lessons.
  1. Download the tutorialSpecialAttributes.xsd schema and save the file to your computer. Example: C:\tutorial_resources\tutorialSpecialAttributes.xsd
  2. Add the data source schema to the template. A schema contains the structure of your data, not the data itself.
    1. In the Data Source Schemas view, click the Add data source schema icon and click Next.
    2. Select Generic XML.
    3. Click Browse and select the schema you downloaded.
    4. Click Next.
    5. Click Finish. The schema you added includes a set of Attributes:
      Attributes in the schema
  3. Specify the data source. This file is where the data that is visible in the document comes from.
    1. Download the tutorialSpecialAttributes.xml data file.
    2. In the Outline view, select the data source schema.
    3. In the Properties view, enter the default URI as the path to the tutorialSpecialAttributes.xml data file. Example: C:\tutorial_resources\tutorialSpecialAttributes.xml
  4. Preview the data to ensure that the data source is accessible:
    1. In the Outline view, right-click the data source schema.
    2. Click Preview Data. The default URI you entered displays.
    3. Click Preview. The data in the Requirements_PR.xml loads.
    4. Click Close.
  5. In the first row, double-click the first cell and enter the header name Full Tag. This header is static text and appears in every document generated, regardless of the variable selected at run time.
  6. From the Data Source Schemas, drag the PRRequirement query into the second Row element.
  7. Drag the Full tag query into the Text element.
  8. Select Use as value and click OK. This query is not static text. A cell is created in this row for every Full Tag entry found in the data source file.
  9. Save the changes.
Result:
Template result
Test the output:
Output result

Lesson checkpoint

You learned how to add a data source schema, select a data file for previewing, and then add the details for the first column, which always appear in the output results.
< Previous | Next >

Feedback