Created
October 25, 2025 23:18
-
-
Save bestlinuxgamers/e794abdb85f1fcccaaaf67c8cfa29b35 to your computer and use it in GitHub Desktop.
Convert camt 052.001.08 to 053.001.08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <xsl:stylesheet version="1.0" | |
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
| xmlns:c52="urn:iso:std:iso:20022:tech:xsd:camt.052.001.08" | |
| xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.08" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| exclude-result-prefixes="c52"> | |
| <xsl:output method="xml" indent="yes" encoding="UTF-8"/> | |
| <xsl:template match="c52:Document"> | |
| <Document> | |
| <xsl:attribute name="xsi:schemaLocation"> | |
| urn:iso:std:iso:20022:tech:xsd:camt.053.001.08 camt.053.001.08.xsd | |
| </xsl:attribute> | |
| <xsl:apply-templates select="node()"/> | |
| </Document> | |
| </xsl:template> | |
| <xsl:template match="@* | node()"> | |
| <xsl:copy> | |
| <xsl:apply-templates select="@* | node()"/> | |
| </xsl:copy> | |
| </xsl:template> | |
| <xsl:template match="c52:BkToCstmrAcctRpt"> | |
| <BkToCstmrStmt> | |
| <xsl:apply-templates select="@* | node()"/> | |
| </BkToCstmrStmt> | |
| </xsl:template> | |
| <xsl:template match="c52:Rpt"> | |
| <xsl:if test="c52:Bal"> | |
| <Stmt> | |
| <xsl:apply-templates select="@* | node()"/> | |
| </Stmt> | |
| </xsl:if> | |
| </xsl:template> | |
| <xsl:template match="c52:Ntry[c52:Sts/c52:Cd = 'PDNG']"/> | |
| <xsl:template match="c52:RptPgntn"> | |
| <StmtPgntn> | |
| <xsl:apply-templates select="@* | node()"/> | |
| </StmtPgntn> | |
| </xsl:template> | |
| <xsl:template match="c52:AddtlRptInf"> | |
| <AddtlStmtInf> | |
| <xsl:apply-templates select="@* | node()"/> | |
| </AddtlStmtInf> | |
| </xsl:template> | |
| <xsl:template match="c52:*"> | |
| <xsl:element name="{local-name()}"> | |
| <xsl:apply-templates select="@* | node()"/> | |
| </xsl:element> | |
| </xsl:template> | |
| </xsl:stylesheet> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use:
xsltproc convert_camt_052_to_053.xslt input.xml > output.xmlShould ignore transactions without a balance or with a pending status (untested)