9 Common XSD Errors in EMIR Refit

EMIR Refit introduced a major structural change with the move from CSV to XML file structure.
XML uses an imbedded schema and validation system using XSD files. Essentially, when creating an EMIR Refit XML file, it is checked against a set of formatting and data rules in the XSD file . If your XML file doesn’t meet those rules, an error will appear.

Here is a list of the most common errors and their causes:

1. Element ‘<XYZ>’ is not allowed at this location

This error occurs when an element is placed in a location where it is not permitted by the XSD schema. This typically happens due to incorrect element ordering or nesting.

Example: Consider the derivatives report where all action types (NEWT, MODI, VALU, TERM, POSC, EROR, CORR, REVI) must include three specific elements in a precise order according to the XSD schema-

This is the first element and contains counterparties’ specific data. It is a complex type, meaning it has nested elements within it.
This is the second element and includes common trade data such as contract data and transaction data. It is also a complex type with nested elements.
This is the third element and indicates the level of the trade. It is a simple type, containing only a single value, either PSTN (Position level) or TCTN (Transaction level).

If these elements are not in the correct order, such as if <Lvl> appears before <CtrPtySpcfcData> or <CmonTradData>, this error will occur. Additionally, if there is an unexpected element, say <XYZ>, inside the action type’s nested structure, the error will be triggered.

Incorrect order XML example
PSTN should be the last element –>


Unexpected element XML example


is not a part of the sequence for PSTN
Correct XML example


PSTN

TRAction’s XML generator is coded strictly based on the schema to ensure elements are always produced in the correct order and no unexpected elements can occur in the output XML.

2. Element ‘<XYZ>’ has an invalid child element ‘<ABC>’

This error occurs when an element does not contain all the required child elements as specified by the XSD schema. This typically happens due to missing data from TRAction’s client’s input files (from their trading platform or back office system).

Example: Consider a derivative report where the <TxData> (Transaction Data element) is expected to include a specific child element <SbsqntTxId> (Subsequent Position UTI). This error will be generated if <SbsqntTxId> is missing from the XML output.

For instance, if the client’s input data is incomplete, it may result in missing elements in the XML output. In such cases, our XML generator has a missing elements flagger to alert us when this error occurs.

Example XSD






Incorrect XML Example




Correct XML Example

549300QM99I2H4YK1K95P123456789


3. Invalid Boolean Value for an Element

This error occurs when an element’s value does not conform to the expected Boolean values (i.e. lowercase ‘true’ or ‘false’).

Example: Reporting Obligation must have lowercase ‘true’/’false’; when it is populated with an uppercase ‘TRUE’/’FALSE’, it generates an error.

Incorrect XML example TRUE
Correct XML example true

4. Invalid Decimal value scientific notation

This error occurs when an element with a decimal type contains an invalid value, often due to scientific notation present in the element. It typically happens when our client’s input data is truncated or improperly formatted.

Example: Consider an XML element <Amt> representing an amount, which is defined as a decimal type. If the input data contains a value in scientific notation, it will result in an error.

Incorrect XML example2e02
Correct XML example 2000

5. Pattern Constraint Violation

This error occurs when an element’s value does not match the pattern specified in the XSD schema. It is often encountered in fields like the UTI (Unique Transaction Identifier), where specific patterns must be adhered to.

Example: In EMIR Refit, new rules for the UTI have been introduced, requiring all characters to be uppercase and all characters except the 19th and 20th positions to be alphanumeric. The 19th and 20th positions must be digits only. Previous EMIR standards allowed special characters and were not as strict.

Invalid UTI XML example 549300QM99I2H4YK1K95_p.123456789
Correct UTI XML example 549300QM99I2H4YK1K95P123456789

6. Enumeration Constraint Violation

This error occurs when an element’s value is not one of the predefined values specified in the XSD schema. Enumeration constraints restrict values to a specific set of options.

Example: The ‘Valuation Method’ field allows only three predefined values: CCPV (Central counterparty valuation), MTMA (Mark To Market valuation), and MTMO (Mark To Model valuation). Any other value will result in an error.

Incorrect XML example

ABCD

Correct XML example

CCPV

There are also old EMIR fields like Base Product and Sub Product that were in 2-letter format, which are now in 4-letter format in EMIR refit (e.g., Agriculture in EMIR was ‘AG’ -> in EMIR refit is ‘AGRI’). We have automatic converters in place to convert old EMIR formats to EMIR refit format.

7. Missing Required Attribute

This error occurs when an element is missing an attribute that is required by the XSD schema. This is commonly seen in amount or price fields where specific attributes must be included.

Example: In EU refit where all price fields, such as Price, Strike Price, Notional Amount, etc., require the ‘Ccy’ (Currency) attribute when the price is represented as a monetary value (not in percentage or basis points). If the amount is provided but the currency attribute is missing, an error will occur saying: ‘Amt’ element is missing the required attribute ‘Ccy’.

Invalid XML example 1000.00
Correct XML example1000.00

8. Invalid Date/Time format

This error occurs when a date or time value does not conform to the expected format specified by the XSD schema. The xs:dateTime type in XSD requires a specific format, such as YYYY-MM-DDTHH:MM:SSZ (e.g., “2024-05-03T06:00:00Z”). Any deviation from this format will result in an error.

Incorrect XML example 2024-05-03 06:00:00
Correct XML example 2024-05-03T06:00:00Z

9. Exceeding Maximum Length Constraint

This error occurs when the length of a string element or attribute exceeds the maximum length specified in the XSD schema. The maxLength facet is used to define the maximum number of characters allowed.

Example: In the EU refit XML schema, the element <UTI> (Unique Transaction Identifier) is restricted to a maximum length of 52 characters.

Incorrect XML example 549300QM99I2H4YK1K95P1234567890123456789012301234567890123
Correct XML example549300QM99I2H4YK1K95P123456789

Summary

XML and the associated XSD validations have added a level of complexity to trade reporting that often requires a firm to seek external assistance in their daily trade reporting process.

Contact TRAction if you think you could benefit from such assistance.

Share this post :
Facebook
LinkedIn
Email
Print

Keep up to date

Regulatory updates, issues, and news

This video explores the pricing plans for TRAction’s EMIR and MiFIR services. Whether you’re seeking basic reporting support or full-service solutions, we outline each plan’s available features, and benefits. 

Discover how TRAction assists your business to meet its trade reporting requirements.