Ticket #761 (assigned Task)

Opened 8 years ago

Last modified 8 years ago

Incorporate CIM schema and CMIP5 validation into Questionnaire

Reported by: paul Owned by: paul
Priority: critical Milestone:
Component: WP6 - CMIP5 Questionnaire Version:
Keywords: schematron schema validation Cc: rupert, gerry, bryan
Requirement: http://metaforclimate.eu/Work-Package-2/Developing-the-CIM/Project-Requirements-summary.htm


Validation code resulting from #736 and #737 is to be added to the Questionnaire. Requires modifying protoq/cimHandling.py to replace existing validation functions.

Change History

comment:1 Changed 8 years ago by paul

  • Status changed from new to assigned

comment:2 Changed 8 years ago by paul

Following revision 1821, CMIP5 validation (via Schematron) is now available in the Questionnaire.

Several changes to the Validator class in protoq/cimHandling.py have been made, although the interface presented by this class remains unchanged:

  1. Within __validationStep() the call to SchematronValidate() has been removed and replaced by applyXSLT(). Although these functions perform similar operations, applying a Schematron ruleset to a parsed CIM document, they have different return types and are not interchangeable.

  2. The errorsAsHtml() method now returns a detailed HTML-formatted report on the number and location of rule applications.

Some of the code currently commented out in cimHandling.py (e.g. __markup_rules_tree() and __markup_line_attr() ) is intended to support incremental validation in future revisions.

At present, only a minimal set of validation rules are applied.  This will be expanded as the list of checks described in ticket #254 is implemented.

Note: See TracTickets for help on using tickets.