{"id":37523812,"url":"https://github.com/dgm9704/flux","last_synced_at":"2026-01-16T08:20:45.594Z","repository":{"id":134162372,"uuid":"268339928","full_name":"dgm9704/flux","owner":"dgm9704","description":"European regulatory XML report validation using XSLT","archived":false,"fork":false,"pushed_at":"2024-05-02T13:54:44.000Z","size":14610,"stargazers_count":0,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T16:21:28.543Z","etag":null,"topics":["aifmd","aifmd-xml","csdr7","csdr9","eba","efr","esef","esma","filing-rules","fin-fsa","ixbrl","mmf","validation","xbrl-xml","xml","xslt"],"latest_commit_sha":null,"homepage":"","language":"XSLT","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgm9704.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-31T18:30:27.000Z","updated_at":"2024-05-02T13:54:47.000Z","dependencies_parsed_at":"2024-05-02T15:06:39.084Z","dependency_job_id":"2e12af93-78bc-4b51-a687-48c0e0303d66","html_url":"https://github.com/dgm9704/flux","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dgm9704/flux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgm9704%2Fflux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgm9704%2Fflux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgm9704%2Fflux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgm9704%2Fflux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgm9704","download_url":"https://codeload.github.com/dgm9704/flux/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgm9704%2Fflux/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aifmd","aifmd-xml","csdr7","csdr9","eba","efr","esef","esma","filing-rules","fin-fsa","ixbrl","mmf","validation","xbrl-xml","xml","xslt"],"created_at":"2026-01-16T08:20:45.021Z","updated_at":"2026-01-16T08:20:45.587Z","avatar_url":"https://github.com/dgm9704.png","language":"XSLT","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flux\n\n## ESMA XML report validation using XSLT\n\n- Main focus are ESMA AIFMD XML reports, but the same structure should be viable for other formats in the future also (CSDR, MMF etc)\n- The goal is to implement all ESMA CAM/CAF validation rules.\n- These are mostly conditional existence checks based on the existence or value of another element.\n- The actual \"product\" is the *.xslt files, anything else is just for testing or documentation\n- Validations should be trivial to run with any XSLT processor\n- The output is very rudimentary for now. After all the rules are implemented, the output can be polished.\n- XSLT (and XPATH, XQUERY) version used is 1.0, as this provides best tooling support. Some functionality will be missing because of this.\n\n## Specifications\n\n### AIFMD\n   For some reason ESMA does not provide the specifications for AIFMD validations publicly, and neither does FIN-FSA.\n   ESMA provides [technical rules for the fields](https://www.esma.europa.eu/document/aifmd-reporting-it-technical-guidance-rev-4-updated)\n   I have found some versions of the AIFMD validation specifications from other sources:\n   \n   - Polish Financial Supervision Authority (UKNF)\n\nhttps://www.knf.gov.pl/knf/pl/komponenty/img/2013-ITMG-65_opis_regul_walidacyjnych_plikow_DATMAN_DATAIF_71002.xlsx\n\n   - Finanzmarktaufsicht Liechtenstein (FMA)\n\nhttps://www.fma-li.li/files/list/fma-wegleitung-2020-8-aifmd-reporting-fehlermeldungen.pdf\n\n   - Luxemburg Commission de Surveillance du Secteur Financier (CSSF) \n\n   https://www.cssf.lu/wp-content/uploads/CSSF_ERROR_CODES_FEEDBACK_FILES.pdf\n   \n   - Bundesanstalt für Finanzdienstleistungsaufsicht (BaFin)\n   \n   https://www.bafin.de/SharedDocs/Downloads/DE/Merkblatt/WA/dl_150305_merkbl_35KAGB_Anlage2_AIFM_wa.pdf?__blob=publicationFile\u0026v=3\n   \n   https://www.bafin.de/SharedDocs/Downloads/DE/Merkblatt/WA/dl_150305_merkbl_35KAGB_Anlage1_AIF_wa.pdf?__blob=publicationFile\u0026v=1\n   \n### CSDR9\n\n- Technical Guidance for Settlement Internalisers – Report Validation Rules (CSDR Article 9) \n\nhttps://www.esma.europa.eu/sites/default/files/library/esma65-8-6561_csdr-technical_guidance_for_settlement_internalisers_report_validation_rules.pdf\n\n## My environment\n   - [Visual Studio Code](https://code.visualstudio.com/) on [Arch Linux](https://www.archlinux.org/) for development\n   - [xsltproc](http://xmlsoft.org/XSLT/xsltproc.html) for stylesheet processing\n   - [xmllint](http://xmlsoft.org/xmllint.html) for schema validation\n\n## Usage\n1) Always validate your XML against the schema first.\n\nIf this gives errors, stop and correct them.\n``` \nxmllint report/aifm.xml --schema schema/aifmd.xsd --noout\n``` \nor\n``` \nxmllint report/aif.xml --schema schema/aifmd.xsd --noout\n``` \n\n2) Run the transformation:\n\n``` \nxsltproc aifmd.xslt report/aifm.xml\n``` \nor\n``` \nxsltproc aifmd.xslt report/aif.xml\n``` \n\nSample output for aif validation errors:\n\n111111#001 AIFNationalCode of the offending fund\n```\n  \u003cerror\u003e\n    \u003crecord\u003e111111#001\u003c/record\u003e\n    \u003ccode\u003eCAF-146\u003c/code\u003e\n    \u003ccontrol\u003eThe ranks that are assigned to the reported values should be consistent in relation to each other. First rank values are above or equal to the second rank values and so on.\u003c/control\u003e\n    \u003cmessage\u003eThe reported value is not consistent with the rank.\u003c/message\u003e\n    \u003ccontext\u003e\n      \u003cfield\u003e\n        \u003cname\u003eAIFReportingInfo/AIFRecordInfo/AIFCompleteDescription/AIFLeverageInfo/AIFLeverageArticle24-4/BorrowingSource/Ranking/\u003c/name\u003e\n        \u003cvalue\u003e1\u003c/value\u003e\n      \u003c/field\u003e\n      \u003cfield\u003e\n        \u003cname\u003eAIFReportingInfo/AIFRecordInfo/AIFCompleteDescription/AIFLeverageInfo/AIFLeverageArticle24-4/BorrowingSource/LeverageAmount/\u003c/name\u003e\n        \u003cvalue\u003e111111\u003c/value\u003e\n      \u003c/field\u003e\n    \u003c/context\u003e\n  \u003c/error\u003e\n\n```\n\n## Status\n\n### Started implementing ESEF validations \n\n### CSDR9 validations have been implemented!\n\n### AIFMD validations have been implemented!\n\n\tExceptions: \n    - FIL-009 is a filename check\n    - CAM-001, CAF-001, CAF-005 only make sense when done by ESMA\n\n\n- Checkdigit calculations are implemented with ESXLT extensions available with xsltproc\n\n- Output now includes all values relevant to the validation that are available at execution time\n\n- OK to file bugs!\n\n\n## Next steps \n- Think about packaging, instructions etc.\n- Add richer info about the error location and related values from specifications\n- Add more info about the validation to the error (perhaps controllable via argument)\n- If possible, find out the output format that ESMA uses!\n- There are some warnings also (WAF-*) - do they go into a \"warning\" element, or should there be a severity value?\n- Implement CSDR7 validations?\n- Implement MMF validations?\n- Implement ESEF validations?\n\n\n## How you can help\n- testing and filing issues against specific validations\n- providing up-to-date specifications\n- providing test reports \n- **Do not send me anything that is confidential or that can't be shared publicly**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgm9704%2Fflux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgm9704%2Fflux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgm9704%2Fflux/lists"}