Back Forward Parse XML form
Completing the Validate tab

About Parse XML rules

Use the Validate tab to specify that the system is to validate incoming XML against a published definition — a Document Type Definition (DTD) or an XML Schema Definition (XSD) file  — before the system attempts to parse the XML document.

These fields are deprecated. Click Upgrade to convert older Parse XML rules to the V5.4 format. See Parse XML form — Completing the Mapping tab.

TipWhen you enable XML validation for an XML parse rule that calls other XML parse rules, you do not need to enable validation on the called rules. By the time a called rule runs, the entire XML document is validated against the DTD or XSD.

When validation fails, the system adds page messages to the destination clipboard page containing the parsed output, so that page cannot be saved. Optionally if desired, a Java exception can occur.

Field

Description

Validate

Select:

  • Never — The default, disables schema validation.
  • Always — Always perform schema validation when this parse rule is called.
  • When  — Perform schema validation only if the when condition rule specified in the When Rule field evaluates to true.
When Rule

SmartPromptIf the Validate field is set to When, specify the when condition rule to use to determine whether to use schema validation before executing the other aspects of this parse rule.

Enter the second key to the rule — the When Name. To find the when condition rule at runtime, the system uses the Applies To key part of this parse rule as the Applies To key part of the when condition rule.

Validation Mode

Specify the type of validation:

  • XSD — XML Style Definition. If selected, enter the URL to the XSD file in the URL for XSD File field.
  • DTD — Document Type Definition. If selected, the identity and location of the DTD must appear in a DOCTYPE statement within the XML document to be parsed. The DTD referenced must be accessible to the Process Commander server.
URL for XSD File

If you selected XSD in the Validation Mode field, enter the URL of an XSD document to validate against. The URL you enter must be accessible to Process Commander at runtime.

Error Report

Specify how Process Commander reports validation errors:

  • Page Message — Report the error as a page message on the clipboard and continue processing.
  • Throw Exception — Report the error as a page message, write an exception into the Process Commander log file, and stop processing.

zzz About Parse XML rules