-
Notifications
You must be signed in to change notification settings - Fork 4
/
esr.xslt
141 lines (95 loc) · 4.54 KB
/
esr.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:camt="urn:iso:std:iso:20022:tech:xsd:camt.054.001.04" exclude-result-prefixes="camt">
<xsl:output method="text" encoding="iso-8859-1"/>
<xsl:strip-space elements="*"/>
<xsl:param name="delim" select="','"/>
<xsl:param name="quote" select="'"'"/>
<xsl:param name="break" select="'
'"/>
<xsl:template name="quoted_value">
<xsl:param name="value"/>
<xsl:value-of select="$quote"/>
<xsl:value-of select="$value"/>
<xsl:value-of select="$quote"/>
<xsl:value-of select="$delim"/>
</xsl:template>
<xsl:template match="/">
<xsl:call-template name="quoted_value">
<xsl:with-param name="value">
<xsl:text>A03 Ref.Nr.</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value">
<xsl:text>Art</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value">
<xsl:text>Waehrung</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value">
<xsl:text>A04 Betrag</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value">
<xsl:text>A07 Verarbdatum</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value">
<xsl:text>A08 Gutschriftdatum</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value">
<xsl:text>Debitor</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value">
<xsl:text>A10 Rejectcode</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value">
<xsl:text>A11 Taxen</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:value-of select="$break"/>
<xsl:for-each select="camt:Document/camt:BkToCstmrDbtCdtNtfctn/camt:Ntfctn/camt:Ntry">
<xsl:for-each select="camt:NtryDtls/camt:TxDtls">
<xsl:call-template name="quoted_value">
<xsl:with-param name="value" select="normalize-space(camt:RmtInf/camt:Strd/camt:CdtrRefInf/camt:Ref)"/>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value" select="normalize-space(camt:CdtDbtInd)"/>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value" select="normalize-space(camt:Amt/@Ccy)"/>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value" select="normalize-space(camt:Amt)"/>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value" select="normalize-space(../../camt:BookgDt/camt:Dt)"/>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value" select="normalize-space(../../camt:ValDt/camt:Dt)"/>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value" select="normalize-space(camt:RltdPties/camt:Dbtr/camt:Nm)"/>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value" select="normalize-space(camt:RmtInf/camt:Strd/camt:AddtlRmtInf)"/>
</xsl:call-template>
<xsl:call-template name="quoted_value">
<xsl:with-param name="value" select="normalize-space(camt:Chrgs/camt:Rcrd/camt:Amt)"/>
</xsl:call-template>
<xsl:value-of select="$break"/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>