An Approach to the Validation of XML Documents Based on the Model Driven Architecture and the Object Constraint Language - Nikiforov, Denis A.; Korj, Dmitriy V.; Sivakov, Ruslan L. (Perspectives of System Informatics, 2018)
It is possible to develop data processing applications using a variety of different data representation formats (EDI, CSV, XML, JSON), domain-specific languages, and general-purpose programming languages (XSLT, SQL, Java, C#). On the one hand, such a variety allows one to choose the most optimal data format or language based on the specific requirements being applied, while on the other one, contemporary information systems or complexes of integrated information systems have become similar to the Tower of Babel, being so cumbersome to build and maintain. A possible solution to this issue could be found in developing platform-independent specifications to be used for generating the source code for each required platform. This article describes an approach to the XML document validators’ generation based on UML models with Object Constraint Language (OCL) rules. The authors give a brief account of similar tools and propose a generalized schema for generating the validators based on a model-driven approach. The core component of this schema is the transformation of OCL constraints to XPath assertions. The first ones could come from one of the supported platform-independent models (Eurasian Economic Union Data Model or ISO 20022), while the later could be embedded into XML Schema 1.1, XSLT or Java code. The transformation is implemented at the model level in the Query/View/Transformation language. The article does not go into details of converting OCL into XPath, because such a description takes up a lot of space and has already been given in similar articles. The authors describe only the key features of their approach: development of metamodels for XPath, XSD 1.1, and XSLT, support of a variety of platform-independent and platform-specific models, determination of elements subject to validation, external data sources, kinds of validation messages, preconditions.