# BR-CL-24

Source: https://xmlvalid.com/rules/BR-CL-24

> For Mime code in attribute use MIMEMediaType.

- Level: error
- Rule sets: EN 16931 rules (UBL) 1.3.17, EN 16931 rules 1.3.16 (UBL), Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `cbc:EmbeddedDocumentBinaryObject[@mimeCode]`
- Test: `((@mimeCode = 'application/pdf' or @mimeCode = 'image/png' or @mimeCode = 'image/jpeg' or @mimeCode = 'text/csv' or @mimeCode = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' or @mimeCode = 'application/vnd.oasis.opendocument.spreadsheet'))`

> For Mime code in attribute use MIMEMediaType.

- Level: error
- Rule sets: EN 16931 rules (CII) 1.3.17, EN 16931 rules 1.3.16 (CII)
- Context: `ram:AttachmentBinaryObject[@mimeCode]`
- Test: `((@mimeCode = 'application/pdf' or @mimeCode = 'image/png' or @mimeCode = 'image/jpeg' or @mimeCode = 'text/csv' or @mimeCode = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' or @mimeCode = 'application/vnd.oasis.opendocument.spreadsheet'))`

## Why it fails

- An attached document (`cbc:EmbeddedDocumentBinaryObject`) has a `mimeCode` outside the allowed list, such as `application/octet-stream` or `application/msword`.

## How to fix it

- Attach the document as PDF, PNG, JPEG, CSV, XLSX or OpenDocument spreadsheet, with its matching MIME type.

Validate a document against these rules: https://xmlvalid.com/validate
