Validation Scenarios

A complex XML document is split in smaller interrelated modules. These modules do not make much sense individually and cannot be validated in isolation due to interdependencies with other modules. Oxygen XML Author Eclipse plugin validates the main module of the document when an imported module is checked for errors.

A typical example is the chunking of a DocBook XSL stylesheet that has chunk.xsl as the main module and param.xsl, chunk-common.xsl, and chunk-code.xsl as imported modules. param.xsl only defines XSLT parameters. The module chunk-common.xsl defines an XSLT template with the name chunk. Chunk-code.xsl calls this template. The parameters defined in param.xsl are used in the other modules without being redefined.

Validating chunk-code.xsl as an individual XSLT stylesheet generates misleading errors regarding parameters and templates that are used but undefined. These errors are only caused by ignoring the context in which this module is used in real XSLT transformations and validations. To validate such a module, define a validation scenario to set the main module of the stylesheet and the validation engine used to find the errors. Usually this engine applies the transformation during the validation process to detect the errors that the transformation generates.

You can validate a stylesheet with several engines to make sure that you can use it in various environments and have the same results. For example, an XSLT stylesheet may be applied with Saxon 12 or Saxon 6.5 engines in different production systems.

Other examples of documents that can benefit from a validation scenario include:

All validation scenarios that are defined in the framework associated with the current document are shown in the Validation toolbar drop-down menu. This makes it easy for the user to turn validation scenarios on or off for a document.

Tip: Status information generated by certain operations (such as validation) are fed into the Console view. This could be helpful for troubleshooting problems encountered during such operations. To open this view, select Window > Show View > Console.