Page last modified 14:47, 23 Dec 2015 by Antero

3. OCL statement

    Table of contents

    Version as of 09:53, 25 Jan 2022

    to this version.

    Return to Version archive.

    View current version


    OCL rules are used to execute constraints against XML file. These rules always return a boolean value, either true or false.


    OCL rules, together with context, form the core part of the business rule. It is crucial to first understand the concept of context. In short, context is set to be complex or simpleType defined in the relevant schema, and OCL-rule is ran whenver the type defined in the context is found within the XML-file.

    Restriction defined in the OCL returns a boolean value. Whenever false is returned, XMLdation service will return an error message to a pre-defined location within the XML-file (defined by OCL-query), with a pre-defined error message. Whenever true is returned, the restriction passes and XML file is considered valid against that rule.

    OCL-queries and error messages are defined by the creator of the OCL-rule.