Creating a DFDL schema

You can use the DFDL schema utility that is provided with HCL OneTest™ API to create a DFDL schema file and apply it to messages. This utility helps you to quickly create a schema with valid format and to specify elements and values by using the DFDL editor.

Procedure

  1. In the Schema Library view of the Architecture School perspective, click the arrow next to the Add button, then click Other > DFDL Schema. The New DFDL Schema window is displayed.
  2. In the New DFDL Schema window, click one of the following buttons:
    Change
    To specify the location of a DFDL schema file to add to the project.
    Edit
    To open the file that is specified in the Current Location field in the DFDL editor. See Editing a DFDL schema.
    Create
    To add a new DFDL schema file to the library. Go to the next step.
    Import
    To create a DFDL schema from another type of data. The COBOL copybook is the only currently supported source for import. See Importing a COBOL copybook as a DFDL schema.
  3. In the Create a Data Format Description Language (DFDL) Schema window, complete the requested information.
    New DFDL Schema window to specify the project details
    1. Enter the name of the Project where the schema is to be created.
    2. Enter a Folder (or set of folders, separated by slashes) for the new schema.
    3. Enter the new DFDL schema file name. The .xsd extension is added automatically.
    4. By default, the internal Message name is the same as the DFDL schema file name, but you can override this default value.
  4. Select the data format that most closely matches the description of data to be modeled in the DFDL schema.
    New DFDL Schema window to specify data format
  5. If you selected either the CSV format or Record-Oriented Data format, click Next and specify the options for the record and the field.
  6. Click Finish. The DFDL message schema is displayed in the DFDL editor. If required, edit the schema properties and the field values in the editor. See Editing a DFDL schema.
  7. From the HCL OneTest API Tools window, switch to the main window. A message that asks to update the editor with the new schema is displayed. Click Yes.
  8. Click OK in the New DFDL Schema window. The new schema is added to the schema library. The DFDL Schema Library lists the path to the created DFDL schema file. You can now apply this DFDL schema to the message properties.
Feedback