You are here: Reference > Rule types > Parse XMLs > Parse XML form - Completing the XML tab

Parse XML form
Completing the XML tab

  1. About 
  2. New 
  3. Mapping 
  4. Pages &Classes 
  5. XML 
  6. History 
  7. More... 

Use the XML 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.

When you enable XML validation for a Parse XML rule that calls other Parse XML 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.

XML schema

Field

Description

Schema URL

If the Perform Validation field is not Never, enter the URL of an XSD document to validate against. The URL you enter must be accessible to the Pega 7 Platform at run time.

You can enter either an http: or file: url, such as:

http://myserver/myproject/myschema.xsd

This field supports the Global Resource Settings syntax (=PageName.PropertyName). The default property name for this field is pySchemaLocation. For more information, see Using the Global Resource Settings feature.

XML validation

Field

Description

Perform Validation

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

If the Perform Validation 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 run time, the system uses the Applies To key part of this parse rule as the Applies To key part of the when condition rule.

Schema Type

Specify the type of validation:

  • XSD — XML Style Definition.
  • 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 Pega 7 Platform server.
On Error

Specify how the Pega 7 Platform reports validation errors:

  • Add 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 log file, and stop processing.

Type Substitution

Optional. Used when the Substitution field on the Node tab of the Mapping properties panel is set to Type to set the target Page Class.

Field

Description

Type name

Enter the local name of the desired Type Name to be substituted.

Namespace URI

Enter the Namespace URI of the Type name.

Class name

Specify the class from which to be used for substitution.

Element Substitution

Optional. Used when the Substitution field on the Node tab of the Mapping properties panel is set to Element to set the target Page Class.

Field

Description

Element name

Enter the local name of the desired element to be substituted.

Namespace URI

Enter the Namespace URI of the element Element name.

Class name

Specify the class from which to be used for substitution.

Related Topics Link IconRelated information