XML / EDI Basics

Schema Validation

Schema validation is an action performed to check whether XML document conforms to its schema. Validation is performed using XML validator.

Validation result either states that XML document is valid (conforms to schema) or lists errors found. Each error contains a line reference and an error message.

Schema errors are technical in nature. An error just indicates that a certain element (tag) should not be present in a certain location or a certain element contains an invalid value. In order to fix a bug, one should be capable for reading schema definitions (sometimes good documentation might be enough). Thus XML validation requires good technical knowledge from a tester. Domain experts might find it difficult to solve these errors by themselves.

Limitations of schema validation

Schema validation detects mostly structural issues from an XML document. XML validation doesn't detect most content errors or errors related to conditional requirements, sum checks, or other integrity constraints. Detailed XML validation therefore requires use of rule-based validation (such as Schematron validation), to cover all technical and business requirements. Truugo test profile concept makes it easy to perform both schema validation and rule-based validation at once.

XML validation is performed using specific XML editors.

Next article: XML editors