Generating an XSD file for XML output

You can use Business Intelligence Exchange (BIX) to generate an XSD file for existing XML output by using an extract rule. You can validate the XML output and generate DDL statements by using the generated XSD file.

  1. Create a dynamic system setting. This setting is used to enable or disable the generation of an XSD file.
    1. In the Short description field, enter a brief description of the dynamic system setting.
    2. In the Owning Ruleset field, enter Pega-RULES.
    3. In the Setting Purpose field, enter BIX/generateXSDForAllProperties and click Create and open.
    4. In the Value field of the Settings tab, enter true to enable the feature.
    5. Click Save.
  2. Open the Extract rule, and on the Definition tab, select the Get all properties check box.
  3. Optional. Click Clear XSD Cache so that the generated XSD file does not include information that was stored in the cache when data was extracted previously.
  4. On the File Specification tab of the Extract rule, specify where the extract information is written:
    1. In the XML schema directory field, enter the directory in which you want to store the generated XSD file.
    2. In the XML schema File Name field, enter the name of the generated XSD file.
    3. In the XML file output directory field, enter the directory in which you want to store the XML output file.
    4. In the XML output file name field, enter the name of the XML output file.
  5. Click Save, and then click Actions > Run to run the extraction.
  6. In the pop-up window, click Perform Extract.
Result: 

The XML output file and the XSD file are in the directories that you specified in steps 4a and 4c.

Note: If you enter false in the Value field of the Settings tab on the dynamic system setting, you cannot generate an XSD file for the XML output. In this case, the Clear XSD Cache button in step 3, the XML schema directory field in step 4a, and the XML schema File Name field in step 4b are not available. This functionality is available when you purchase and install the BIX application.