Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

COSMOS SDD Tooling Validator Design

Revision as of 17:21, 28 February 2008 by Unnamed Poltroon (Talk)

Overview

The SDD Validator is an Eclipse plug-in that provides functionality for validating XML against various types of rule sets. Currently supported types of rules are XML Schema rules, Schematron rules and custom user created rules written in Java. The Validator also provides the ability to read XML into SDO's, and write the SDO's back out to XML. While intended primarily for working with SDD's, the Validator is flexible enough to handle any arbitrary XML.

There are two methods available for using the Validator. First, an Eclipse based application may required the Validator as plug-in dependency and use the provided API's. Second, the Validator includes the ability to run as an Eclipse Rich Client Platform (RCP) application with a command line interface.

Rules

All rules must implement the ValidationRule interface, which contains a single method: validate(). A rule may perform any kind of validation action desired, provided it takes an InputStream as input and returns an array of XMLValidationError. Below are the pre-written rule types included with the Validator.

XML Schema Rules

SchemaValidationRule provides functionality for validating against one or more XML Schemas. A SchemaValidationRule is constructed with an array of either Files or InputStreams containing the schemas against which the XML will be validated. Schemas may be added to or removed from the rule at any time. It is also possible to get a list of all schema Files or InputStreams associated with an instance of SchemaValidationRule.

SchemaValidationRule performs validation using the Java API for XML Processing (JAXP), which allows the validation to be independent of the underlying XML parser and thus run the same on different JRE versions and implementations.

Schematron Rules

SchematronValidationRule provides functionality for validating against an ISO Schematron rules file. A SchematronValidationRule is constructed with a Schematron rules file and a Schematron skeleton file. The provided implementation uses the Schematron Text validator (available on the Schematron Validators page), but it can be extended to use other types of Schematron validators.

SDD Specific Rules

More info goes here about rules required to ensure compliance with SDD spec, above what the Schema requires.

Custom Java Rules

Interfaces

API's

Command Line

More info about command line interface goes here.

Back to the top