Example ALFA Models

Importing XSD Schemas

Introduction

ALFA supports converting XML Schemas (XSD) into ALFA models. Imported models can also be extended to include additional metadata, complex business rules and additional attributes. Extending imported models can be achieved without modifying the imported source files - to avoid losing changes if subsequent imports are performed.

In addition to modelling using XSD imported models, ALFA Runtime libraries support consuming XML Data that conforms to the XSD.

For example consider the usecase where externally supplied XML data needs to be consumed, processed and sent downstream in JSON or other format for internal processing. ALFA generates Java project files and source to enable reading/writing XML into ALFA’s Java object model, which supports complex business rule validation, JSON interoperability and many features useful for software engineering.

The 2-way compatablity with XML is an important factor, as one of main reasons organization may decide to import the XSD is to exchange XML data (e.g. Regulatory Reporting, External Messaging using published formats etc). If XML compatiblity is not a factor, the imported ALFA model can be used as a starting point to define internal models/Data Products. ALFA has built-in support to declare what constitutes a ‘Data Product’ and its metadata.

To learn more, please contact us at info@schemarise.com.

Examples of imported XSD Models

ESMA EMIR Reporting Model

See: EMIR Reporting ALFA Model

EMIR Reporting contains incoming and outgoing messages used for reporting of derivative contracts.

Downloaded from https://www.esma.europa.eu/data-reporting/emir-reporting. Models supplied in this site does not contain xs:documentation tags, therefore no documentation is available to import and include in ALFA.

FpML Messaging Model

See: FpML Confirmations ALFA Model

FpML Confirmation message set imported into ALFA. FpML makes full use of XML Schema inheritance, which is imported into the ALFA model. As this namespace contains over 1600 types, the namespace diagram is not displayed as there is limited use in displaying such a collection of types.

Downloaded from https://www.fpml.org.

ISO 20022 Account Management Model

See: ISO 20022 ‘acmt’ Message Set ALFA Model

This ISO 20022 Message Set contains 35 message types for Account Management.

Downloaded from https://www.iso20022.org/business-area/26/download. Models supplied in this site does not contain xs:documentation tags, therefore no documentation is available.

ISO 20022 Transactions and Financial Instruments Data Reporting

See: ISO 20022 ‘auth’ Message Set ALFA Model

This ISO 20022 Message Set contains 20 message types for Data Reporting.

Downloaded from https://www.iso20022.org/iso-20022-message-definitions?business-domain=6. Models supplied in this site does not contain xs:documentation tags, therefore no documentation is available.

See: LEI ALFA Data Model

LEI data format defines Legal Entity Identification reference data format published by the Global Legal Entity Identifier Foundation.

Downloaded from https://www.gleif.org/en/about-lei/common-data-file-format.

Caveat of Imported XSD Models

The quality of the model created in ALFA is only as good as the XSD being imported.

Some XSDs such as ISO models are generated from other modelling tools, and create a huge number of definitions for all permutations in relationships - resulting in definitions suffixed with numbers (e.g. TradeData30, TradeData301), and not using XSD inheritence features. Expanding all paths is a viable approach as XSD is unable to enforce conditional mandatory fields (supported in ALFA). However types suffixed with numbers instead of XSD inheritance with suitable naming, makes it difficult to quickly understand the model.

Other models such as FpML and LEI appear more intuitive and easier to follow. If the XSD Schema contains xs:documentation tags, those are imported as ALFA documentation - as seen in some of the examples below.

ALFA’s model diagrams allow traversing up the ‘referenced from’ set of parent types, and ‘reference to’ field types, making it easier to navigate around and understand the model.