Last active
May 22, 2017 14:13
-
-
Save eerohele/68bd5f3f8d24de7d05c6a13fbc127083 to your computer and use it in GitHub Desktop.
Create a HTML representation of a Payments Initiation message (pain.001.001.03)
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
:root { | |
--baseline: 1.5rem; | |
--background-color: #090415; | |
--text-color-default: #F9EEF9; | |
--text-color-code: #F9EEF9; | |
--color-emphasis-dark: #1B0C40; | |
--font-sans-serif: "Fira Sans", Helvetica, sans-serif; | |
--font-monospace: "Fira Mono", monospace; | |
} | |
html { | |
height: 100%; | |
text-rendering: optimizeLegibility; | |
} | |
body { | |
background: var(--background-color); | |
color: var(--text-color-default); | |
font-family: var(--font-sans-serif); | |
font-size: 13px; | |
font-weight: 300; | |
position: relative; | |
} | |
body::after { | |
position: absolute; | |
width: auto; | |
height: auto; | |
content: ''; | |
display: block; | |
pointer-events: none; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAYCAYAAADd5VyeAAAAF0lEQVQYlWNgGAWDAdha2prBMAMDAwMAHl0CvDWXRRQAAAAASUVORK5CYII=); | |
z-index: -1; | |
} | |
body:active::after { | |
display: none; | |
} | |
h1, h2, h3, h4, h5, h6 { | |
font-weight: 400; | |
line-height: calc(var(--baseline) * 2); | |
margin-top: 0; | |
margin-bottom: var(--baseline); | |
} | |
p, dl { | |
line-height: var(--baseline); | |
margin-top: 0; | |
margin-bottom: var(--baseline); | |
} | |
dl { | |
display: table-row; | |
padding: .5rem; | |
margin: 0; | |
} | |
dl dl dt { | |
text-align: left; | |
} | |
dt { | |
color: #FFA80D; | |
display: table-cell; | |
text-align: right; | |
white-space: nowrap; | |
} | |
dl dl dt { | |
color: #D60CE8; | |
} | |
dl dl dl dt { | |
color: #36FF6F; | |
} | |
dl dl dl dl dt { | |
color: #E8550C; | |
} | |
dl dl dl dl dl dt { | |
color: #FF0000; | |
} | |
dd { | |
display: table-cell; | |
margin-left: 0; | |
} | |
code, time, dd { | |
line-height: 0; | |
} | |
code { | |
color: var(--text-color-code); | |
font-family: var(--font-monospace); | |
} | |
header, article > .content { | |
padding: var(--baseline); | |
} | |
article { | |
border-top: 3px solid var(--color-emphasis-dark); | |
margin-top: calc(var(--baseline) - 3px); | |
} | |
time { | |
cursor: help; | |
} | |
dl dl > dd { | |
border-left: 1.5px solid var(--color-emphasis-dark); | |
} | |
dl > * > * { | |
padding-left: calc(var(--baseline) / 2); | |
padding-right: calc(var(--baseline) / 2); | |
} | |
span.Ccy { | |
border-bottom: 1px solid var(--color-emphasis-dark); | |
font-variant: small-caps; | |
text-transform: lowercase; | |
} | |
[data-sepa = true] > dt, [data-sepa = true] > dd { | |
background: #0D0520; | |
} | |
[class*="hint--"][aria-label]::after { | |
font-family: var(--font-monospace); | |
} |
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
<xsl:stylesheet version="3.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:map="http://www.w3.org/2005/xpath-functions/map" | |
xmlns:json="http://www.w3.org/2005/xpath-functions" | |
xmlns:local="local" | |
xpath-default-namespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" | |
exclude-result-prefixes="map local xs"> | |
<xsl:output method="html" version="5.0" encoding="utf-8"/> | |
<xsl:variable name="COUNTRIES" select=" | |
map { | |
'AF': 'Afghanistan', | |
'AX': 'Åland Islands', | |
'AL': 'Albania', | |
'DZ': 'Algeria', | |
'AS': 'American Samoa', | |
'AD': 'Andorra', | |
'AO': 'Angola', | |
'AI': 'Anguilla', | |
'AQ': 'Antarctica', | |
'AG': 'Antigua and Barbuda', | |
'AR': 'Argentina', | |
'AM': 'Armenia', | |
'AW': 'Aruba', | |
'AU': 'Australia', | |
'AT': 'Austria', | |
'AZ': 'Azerbaijan', | |
'BS': 'Bahamas', | |
'BH': 'Bahrain', | |
'BD': 'Bangladesh', | |
'BB': 'Barbados', | |
'BY': 'Belarus', | |
'BE': 'Belgium', | |
'BZ': 'Belize', | |
'BJ': 'Benin', | |
'BM': 'Bermuda', | |
'BT': 'Bhutan', | |
'BO': 'Bolivia', | |
'BA': 'Bosnia and Herzegovina', | |
'BW': 'Botswana', | |
'BV': 'Bouvet Island', | |
'BR': 'Brazil', | |
'IO': 'British Indian Ocean Territory', | |
'BN': 'Brunei Darussalam', | |
'BG': 'Bulgaria', | |
'BF': 'Burkina Faso', | |
'BI': 'Burundi', | |
'KH': 'Cambodia', | |
'CM': 'Cameroon', | |
'CA': 'Canada', | |
'CV': 'Cape Verde', | |
'KY': 'Cayman Islands', | |
'CF': 'Central African Republic', | |
'TD': 'Chad', | |
'CL': 'Chile', | |
'CN': 'China', | |
'CX': 'Christmas Island', | |
'CC': 'Cocos (Keeling) Islands', | |
'CO': 'Colombia', | |
'KM': 'Comoros', | |
'CG': 'Congo', | |
'CD': 'The Democratic Republic of the Congo', | |
'CK': 'Cook Islands', | |
'CR': 'Costa Rica', | |
'CI': 'Cote D’Ivoire', | |
'HR': 'Croatia', | |
'CU': 'Cuba', | |
'CY': 'Cyprus', | |
'CZ': 'Czech Republic', | |
'DK': 'Denmark', | |
'DJ': 'Djibouti', | |
'DM': 'Dominica', | |
'DO': 'Dominican Republic', | |
'EC': 'Ecuador', | |
'EG': 'Egypt', | |
'SV': 'El Salvador', | |
'GQ': 'Equatorial Guinea', | |
'ER': 'Eritrea', | |
'EE': 'Estonia', | |
'ET': 'Ethiopia', | |
'FK': 'Falkland Islands (Malvinas)', | |
'FO': 'Faroe Islands', | |
'FJ': 'Fiji', | |
'FI': 'Finland', | |
'FR': 'France', | |
'GF': 'French Guiana', | |
'PF': 'French Polynesia', | |
'TF': 'French Southern Territories', | |
'GA': 'Gabon', | |
'GM': 'Gambia', | |
'GE': 'Georgia', | |
'DE': 'Germany', | |
'GH': 'Ghana', | |
'GI': 'Gibraltar', | |
'GR': 'Greece', | |
'GL': 'Greenland', | |
'GD': 'Grenada', | |
'GP': 'Guadeloupe', | |
'GU': 'Guam', | |
'GT': 'Guatemala', | |
'GG': 'Guernsey', | |
'GN': 'Guinea', | |
'GW': 'Guinea-Bissau', | |
'GY': 'Guyana', | |
'HT': 'Haiti', | |
'HM': 'Heard Island and Mcdonald Islands', | |
'VA': 'Holy See (Vatican City State)', | |
'HN': 'Honduras', | |
'HK': 'Hong Kong', | |
'HU': 'Hungary', | |
'IS': 'Iceland', | |
'IN': 'India', | |
'ID': 'Indonesia', | |
'IR': 'Islamic Republic Of Iran', | |
'IQ': 'Iraq', | |
'IE': 'Ireland', | |
'IM': 'Isle of Man', | |
'IL': 'Israel', | |
'IT': 'Italy', | |
'JM': 'Jamaica', | |
'JP': 'Japan', | |
'JE': 'Jersey', | |
'JO': 'Jordan', | |
'KZ': 'Kazakhstan', | |
'KE': 'Kenya', | |
'KI': 'Kiribati', | |
'KP': 'Democratic People’s Republic of Korea', | |
'KR': 'Republic of Korea', | |
'XK': 'Kosovo', | |
'KW': 'Kuwait', | |
'KG': 'Kyrgyzstan', | |
'LA': 'Lao People’s Democratic Republic', | |
'LV': 'Latvia', | |
'LB': 'Lebanon', | |
'LS': 'Lesotho', | |
'LR': 'Liberia', | |
'LY': 'Libyan Arab Jamahiriya', | |
'LI': 'Liechtenstein', | |
'LT': 'Lithuania', | |
'LU': 'Luxembourg', | |
'MO': 'Macao', | |
'MK': 'The Former Yugoslav Republic of Macedonia', | |
'MG': 'Madagascar', | |
'MW': 'Malawi', | |
'MY': 'Malaysia', | |
'MV': 'Maldives', | |
'ML': 'Mali', | |
'MT': 'Malta', | |
'MH': 'Marshall Islands', | |
'MQ': 'Martinique', | |
'MR': 'Mauritania', | |
'MU': 'Mauritius', | |
'YT': 'Mayotte', | |
'MX': 'Mexico', | |
'FM': 'Federated States of Micronesia', | |
'MD': 'Republic of Moldova', | |
'MC': 'Monaco', | |
'MN': 'Mongolia', | |
'ME': 'Montenegro', | |
'MS': 'Montserrat', | |
'MA': 'Morocco', | |
'MZ': 'Mozambique', | |
'MM': 'Myanmar', | |
'NA': 'Namibia', | |
'NR': 'Nauru', | |
'NP': 'Nepal', | |
'NL': 'Netherlands', | |
'AN': 'Netherlands Antilles', | |
'NC': 'New Caledonia', | |
'NZ': 'New Zealand', | |
'NI': 'Nicaragua', | |
'NE': 'Niger', | |
'NG': 'Nigeria', | |
'NU': 'Niue', | |
'NF': 'Norfolk Island', | |
'MP': 'Northern Mariana Islands', | |
'NO': 'Norway', | |
'OM': 'Oman', | |
'PK': 'Pakistan', | |
'PW': 'Palau', | |
'PS': 'Palestinian Territory, Occupied', | |
'PA': 'Panama', | |
'PG': 'Papua New Guinea', | |
'PY': 'Paraguay', | |
'PE': 'Peru', | |
'PH': 'Philippines', | |
'PN': 'Pitcairn', | |
'PL': 'Poland', | |
'PT': 'Portugal', | |
'PR': 'Puerto Rico', | |
'QA': 'Qatar', | |
'RE': 'Reunion', | |
'RO': 'Romania', | |
'RU': 'Russian Federation', | |
'RW': 'Rwanda', | |
'SH': 'Saint Helena', | |
'KN': 'Saint Kitts and Nevis', | |
'LC': 'Saint Lucia', | |
'PM': 'Saint Pierre and Miquelon', | |
'VC': 'Saint Vincent and the Grenadines', | |
'WS': 'Samoa', | |
'SM': 'San Marino', | |
'ST': 'Sao Tome and Principe', | |
'SA': 'Saudi Arabia', | |
'SN': 'Senegal', | |
'RS': 'Serbia', | |
'SC': 'Seychelles', | |
'SL': 'Sierra Leone', | |
'SG': 'Singapore', | |
'SK': 'Slovakia', | |
'SI': 'Slovenia', | |
'SB': 'Solomon Islands', | |
'SO': 'Somalia', | |
'ZA': 'South Africa', | |
'GS': 'South Georgia and the South Sandwich Islands', | |
'ES': 'Spain', | |
'LK': 'Sri Lanka', | |
'SD': 'Sudan', | |
'SR': 'Suriname', | |
'SJ': 'Svalbard and Jan Mayen', | |
'SZ': 'Swaziland', | |
'SE': 'Sweden', | |
'CH': 'Switzerland', | |
'SY': 'Syrian Arab Republic', | |
'TW': 'Taiwan', | |
'TJ': 'Tajikistan', | |
'TZ': 'United Republic of Tanzania', | |
'TH': 'Thailand', | |
'TL': 'Timor-Leste', | |
'TG': 'Togo', | |
'TK': 'Tokelau', | |
'TO': 'Tonga', | |
'TT': 'Trinidad and Tobago', | |
'TN': 'Tunisia', | |
'TR': 'Turkey', | |
'TM': 'Turkmenistan', | |
'TC': 'Turks and Caicos Islands', | |
'TV': 'Tuvalu', | |
'UG': 'Uganda', | |
'UA': 'Ukraine', | |
'AE': 'United Arab Emirates', | |
'GB': 'United Kingdom', | |
'US': 'United States', | |
'UM': 'United States Minor Outlying Islands', | |
'UY': 'Uruguay', | |
'UZ': 'Uzbekistan', | |
'VU': 'Vanuatu', | |
'VE': 'Venezuela', | |
'VN': 'Viet Nam', | |
'VG': 'Virgin Islands, British', | |
'VI': 'Virgin Islands, U.S.', | |
'WF': 'Wallis and Futuna', | |
'EH': 'Western Sahara', | |
'YE': 'Yemen', | |
'ZM': 'Zambia', | |
'ZW': 'Zimbabwe' | |
} | |
"/> | |
<xsl:variable name="HEADERS" select=" | |
map { | |
'GrpHdr' : 'Group header', | |
'MsgId' : 'Message identification', | |
'CreDtTm' : 'Creation date and time', | |
'Authstn' : 'Authorisation', | |
'Cd' : 'Code', | |
'Prtry' : 'Proprietary', | |
'NbOfTxs' : 'Number of transactions', | |
'CtrlSum' : 'Control sum', | |
'InitgPty' : 'Initiating party', | |
'Nm' : 'Name', | |
'PstlAdr' : 'Postal address', | |
'AdrTp' : 'Address type', | |
'Dept' : 'Department', | |
'SubDept' : 'Sub-department', | |
'StrtNm' : 'Street name', | |
'BldgNb' : 'Building number', | |
'PstCd' : 'Postal code', | |
'TwnNm' : 'Town name', | |
'CtrySubDvsn' : 'Country subdivision', | |
'Ctry' : 'Country', | |
'AdrLine' : 'Address line', | |
'Id' : 'Identifier', | |
'OrgId' : 'Organization identification', | |
'BICOrBEI' : 'BIC or BEI', | |
'Othr' : 'Other', | |
'SchmeNm' : 'Scheme name', | |
'Issr' : 'Issuer', | |
'PrvtId' : 'Private identification', | |
'DtAndPlcOfBirth' : 'Date and place of birth', | |
'BirthDt' : 'Birth date', | |
'PrvcOfBirth' : 'Province of birth', | |
'CityOfBirth' : 'City of birth', | |
'CtryOfBirth' : 'Country of birth', | |
'CtryOfRes' : 'Country of residence', | |
'CtctDtls' : 'Contact details', | |
'NmPrfx' : 'Name prefix', | |
'PhneNb' : 'Phone number', | |
'MobNb' : 'Mobile number', | |
'FaxNb' : 'Fax number', | |
'EmailAdr' : 'EmailAdr', | |
'FwdgAgt' : 'Forwarding agent', | |
'FinInstnId' : 'Financial institution identification', | |
'BIC' : 'BIC', | |
'BrnchId' : 'Branch identifier', | |
'PmtInf' : 'Payment information', | |
'PmtInfId' : 'Payment information identification', | |
'PmtMtd' : 'Payment method', | |
'BtchBookg' : 'Batch booking', | |
'PmtTpInf' : 'Payment type information', | |
'InstrPrty' : 'Instruction priority', | |
'SvcLvl' : 'Service level', | |
'LclInstrm' : 'Local instrument', | |
'CtgyPurp' : 'Category purpose', | |
'ReqdExctnDt' : 'Requested execution date', | |
'PoolgAdjstmntDt' : 'Pooling adjustment date', | |
'Dbtr' : 'Debtor', | |
'DbtrAcct' : 'Debtor account', | |
'DbtrAgt' : 'Debtor agent', | |
'ClrSysMmbId' : 'Clearing system member identification', | |
'ClrSysId' : 'Clearing system identification', | |
'MmbId' : 'Member identification', | |
'BnrchId' : 'Branch identification', | |
'IBAN' : 'IBAN', | |
'Tp' : 'Type', | |
'Ccy' : 'Currency', | |
'DbtrAgtAcct' : 'Debtor agent account', | |
'UltmtDbtr' : 'Ultimate debtor', | |
'ChrgBr' : 'Charge bearer', | |
'ChrgsAcct' : 'Charges account', | |
'ChrgsAcctAgt' : 'Charges account agent', | |
'CdtTrfTxInf' : 'Credit transfer transaction information', | |
'PmtId' : 'Payment identification', | |
'InstrId' : 'Instruction identification', | |
'EndToEndId' : 'End-to-end identification', | |
'Amt' : 'Amount', | |
'InstdAmt' : 'Instructed amount', | |
'EqvtAmt' : 'Equivalent amount', | |
'CcyOfTrf' : 'Currency of transfer', | |
'XchgRateInf' : 'Exchange rate information', | |
'XchgRate' : 'XchgRate', | |
'RateTp' : 'RateTp', | |
'CtrctId' : 'Contract identification', | |
'ChqInstr' : 'Cheque instruction', | |
'ChqTp' : 'Cheque type', | |
'ChqNb' : 'Cheque number', | |
'ChqFr' : 'Cheque from', | |
'Adr' : 'Address', | |
'DlvryMtd' : 'Delivery method', | |
'DlvrTo' : 'Deliver to', | |
'ChqMtrtyDt' : 'Cheque maturity date', | |
'FrmsCd' : 'Forms code', | |
'MemoFld' : 'Memo field', | |
'RgnlClrZone' : 'Regional clearing zone', | |
'PrtLctn' : 'Print location', | |
'IntrmyAgt1' : 'Intermediary agent 1', | |
'IntrmyAgt1Acct' : 'Intermediary agent 1 account', | |
'IntrmyAgt2' : 'Intermediary agent 2', | |
'IntrmyAgt2Acct' : 'Intermediary agent 2 account', | |
'IntrmyAgt3' : 'Intermediary agent 3', | |
'IntrmyAgt3Acct' : 'Intermediary agent 3 account', | |
'CdtrAgt' : 'Creditor agent', | |
'CdtrAgtAcct' : 'Creditor agent account', | |
'Cdtr' : 'Creditor', | |
'CdtrAcct' : 'Creditor account', | |
'UltmtCdtr' : 'Ultimate creditor', | |
'InstrForCdtrAgt' : 'Instruction for creditor agent', | |
'InstrInf' : 'Instruction information', | |
'InstrForDbtrAgt' : 'Instruction for debtor agent', | |
'Tax' : 'Tax', | |
'TaxId' : 'Tax identification', | |
'RegnId' : 'Registration identification', | |
'TaxTp' : 'Tax type', | |
'AdmstnZn' : 'Administration zone', | |
'Mtd' : 'Method', | |
'TtlTaxblBaseAmt' : 'Total taxable base amount', | |
'TtlTaxAmt' : 'Total tax amount', | |
'SeqNb' : 'Sequence number', | |
'Rcrd' : 'Record', | |
'Ctgy' : 'Category', | |
'CtgyDtls' : 'Category details', | |
'DbtrSts' : 'Debtor status', | |
'CertId' : 'Certificate identification', | |
'Prd' : 'Period', | |
'Yr' : 'Year', | |
'FrToDt' : 'From-to date', | |
'FrDt' : 'From date', | |
'ToDt' : 'To date', | |
'TaxAmt' : 'Tax amount', | |
'Rate' : 'Rate', | |
'TaxblBaseAmt' : 'TaxblBaseAmt', | |
'TtlAmt' : 'TtlAmt', | |
'AddtlInf' : 'Additional information', | |
'Purp' : 'Purpose', | |
'RgltryRptg' : 'Regulatory reporting', | |
'DbtCdtRptgInd' : 'Debit-credit reporting indicator', | |
'Authrty' : 'Authority', | |
'Dtls' : 'Details', | |
'Dt' : 'Date', | |
'Inf' : 'Information', | |
'Nb' : 'Number', | |
'RmtInf' : 'Remittance information', | |
'Ustrd' : 'Unstructured', | |
'Strd' : 'Structured', | |
'RfrdDocInf' : 'Referred document information', | |
'CdOrPrtry' : 'Code or proprietary', | |
'RltdDt' : 'Related date', | |
'RfrdDocAmt' : 'Referred document amount', | |
'CdtrRefInf' : 'Creditor reference information', | |
'Invcr' : 'Invoicer', | |
'Invcee' : 'Invoicee', | |
'Ref' : 'Reference', | |
'CdtNoteAmt' : 'Credit note amount', | |
'RmtdAmt' : 'Remitted amount', | |
'DuePyblAmt' : 'Due payable amount', | |
'AddtlRmtInf' : 'Additional remittance information', | |
'RltdRmtInf' : 'Related remittance information', | |
'RmtId' : 'Remittance identification', | |
'RmtLctnMtd' : 'Remittance location method', | |
'RmtLctnElctrncAdr': 'Remittance location electronic address', | |
'RmtLctnPstlAdr' : 'Remittance location postal address', | |
'AddtlFld' : 'Additional field' | |
} | |
"/> | |
<xsl:template mode="SEPA" match=" | |
MsgId | |
| CreDtTm | |
| NbOfTxs | |
| CtrlSum | |
| InitgPty/Nm | |
| InitgPty/Id/OrgId | |
| InitgPty/Id/PrvtId | |
| PmtInf | |
| PmtInfId | |
| PmtMtd | |
| BtchBookg | |
| InstrPrty | |
| SvcLvl/Cd | |
| LclInstrm/Cd | |
| LclInstrm/Prtry | |
| CtgyPurp/Cd | |
| ReqdExctnDt | |
| Dbtr/Nm | |
| Dbtr/PstlAdr/Ctry | |
| Dbtr/PstlAdr/AdrLine | |
| Dbtr/Id/OrgId | |
| Dbtr/Id/PrvtId | |
| DbtrAcct/Id/IBAN | |
| DbtrAcct/Ccy | |
| DbtrAgt | |
| UltmtDbtr/Nm | |
| UltmtDbtr/Id/OrgId | |
| UltmtDbtr/Id/PrvtId | |
| ChrgBr | |
| PmtId | |
| InstrId | |
| EndToEndId | |
| Amt/InstdAmt | |
| CdtrAgt | |
| Cdtr/Nm | |
| Cdtr/PstlAdr/Ctry | |
| Cdtr/PstlAdr/AdrLine | |
| Cdtr/Id/OrgId | |
| Cdtr/Id/PrvtId | |
| CdtrAcct | |
| UltmtCdtr/Nm | |
| UltmtCdtr/Id | |
| Purp/Cd | |
| RmtInf/Ustrd | |
| RmtInf/Strd/CdtrRefInf/Tp/CdOrPrtry/Cd | |
| RmtInf/Strd/CdtrRefInf/Tp/CdOrPrtry/Issr | |
| RmtInf/Strd/CdtrRefInf/Ref | |
"> | |
<xsl:attribute name="data-sepa">true</xsl:attribute> | |
</xsl:template> | |
<xsl:template match="*" mode="SEPA"/> | |
<xsl:function name="local:header" as="xs:string"> | |
<xsl:param name="el" as="element()"/> | |
<xsl:sequence select="map:get($HEADERS, xs:string($el/local-name()))"/> | |
</xsl:function> | |
<xsl:function name="local:country-from-code" as="xs:string"> | |
<xsl:param name="code" as="xs:string"/> | |
<xsl:sequence select="(map:get($COUNTRIES, $code), $code)[1]"/> | |
</xsl:function> | |
<xsl:template match="/"> | |
<xsl:apply-templates select="Document/CstmrCdtTrfInitn"/> | |
</xsl:template> | |
<xsl:template match="CstmrCdtTrfInitn"> | |
<html> | |
<head> | |
<xsl:apply-templates select="GrpHdr/MsgId" mode="title"/> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"/> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans:300,400,500"/> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Mono"/> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/hint.css/2.4.1/hint.min.css"/> | |
<style type="text/css"> | |
<xsl:value-of select="unparsed-text('pain03-to-html.css')"/> | |
</style> | |
</head> | |
<body> | |
<main> | |
<xsl:apply-templates/> | |
</main> | |
</body> | |
</html> | |
</xsl:template> | |
<xsl:template match="MsgId" mode="title"> | |
<title> | |
Customer Credit Transfer Initiation · <xsl:value-of select="."/> | |
</title> | |
</xsl:template> | |
<xsl:template match="GrpHdr"> | |
<header> | |
<xsl:apply-templates select="." mode="class"/> | |
<xsl:apply-templates select="." mode="title"/> | |
<xsl:apply-templates/> | |
</header> | |
</xsl:template> | |
<xsl:template match="PmtInf"> | |
<article> | |
<xsl:apply-templates select="." mode="class"/> | |
<section class="content"> | |
<xsl:apply-templates select="." mode="title"/> | |
<xsl:apply-templates select="* except CdtTrfTxInf"/> | |
</section> | |
<section class="transactions"> | |
<xsl:apply-templates select="CdtTrfTxInf"/> | |
</section> | |
</article> | |
</xsl:template> | |
<xsl:template match="CdtTrfTxInf"> | |
<article> | |
<xsl:apply-templates select="." mode="class"/> | |
<section class="content"> | |
<xsl:apply-templates select="." mode="title"/> | |
<xsl:apply-templates/> | |
</section> | |
</article> | |
</xsl:template> | |
<xsl:template match="GrpHdr | PmtInf" mode="title"> | |
<h2> | |
<xsl:apply-templates select="." mode="header"/> | |
</h2> | |
</xsl:template> | |
<xsl:template match="CdtTrfTxInf" mode="title"> | |
<h3> | |
<xsl:apply-templates select="." mode="header"/> | |
</h3> | |
</xsl:template> | |
<xsl:template match="*" mode="header"> | |
<span class="hint--bottom" aria-label="{local-name()}"> | |
<xsl:sequence select="local:header(.)"/> | |
</span> | |
</xsl:template> | |
<xsl:template match="*"> | |
<dl> | |
<xsl:apply-templates select="." mode="SEPA"/> | |
<dt> | |
<xsl:apply-templates select="." mode="header"/> | |
</dt> | |
<dd> | |
<xsl:apply-templates select="." mode="class"/> | |
<xsl:apply-templates select="." mode="format"/> | |
<xsl:apply-templates select="*"/> | |
</dd> | |
</dl> | |
</xsl:template> | |
<xsl:template priority="-0.75" match="*" mode="format"> | |
<xsl:apply-templates select="text()"/> | |
</xsl:template> | |
<xsl:template priority="-0.5" mode="format" match=" | |
*[normalize-space(.)][empty(*)] | |
"> | |
<span> | |
<xsl:apply-templates select="text()"/> | |
</span> | |
</xsl:template> | |
<xsl:template mode="format" match=" | |
MsgId | |
| PmtInfId | |
| InstrId | |
| EndToEndId | |
| BtchBookg | |
| Cd | |
| Prtry | |
| ChrgBr | |
"> | |
<code> | |
<xsl:apply-templates/> | |
</code> | |
</xsl:template> | |
<xsl:template match="*[@Ccy]/text()"> | |
<span> | |
<xsl:next-match/> | |
</span> | |
<xsl:text> </xsl:text> | |
<xsl:apply-templates select="../@Ccy" mode="format"/> | |
</xsl:template> | |
<xsl:template match="@Ccy" mode="format"> | |
<span> | |
<xsl:apply-templates select="." mode="class"/> | |
<xsl:value-of select="."/> | |
</span> | |
</xsl:template> | |
<xsl:template match="CreDtTm" mode="format"> | |
<time datetime="{.}" class="hint--bottom" aria-label="{.}"> | |
<xsl:value-of select=" | |
format-dateTime(., '[MNn] [D1o] [Y0001], [h1]:[m01]:[s01]') | |
"/> | |
</time> | |
</xsl:template> | |
<xsl:template mode="format" match=" | |
ReqdExctnDt | |
| PoolgAdjstmntDt | |
| RltdDt | |
| Dt | |
| Yr | |
| ChqMtrtyDt | |
| BirthDt | |
| FrDt | |
| ToDt | |
"> | |
<time datetime="{.}" class="hint--bottom" aria-label="{.}"> | |
<xsl:value-of select="format-date(., '[MNn] [D1o] [Y0001]')"/> | |
</time> | |
</xsl:template> | |
<xsl:template match="Ctry | CtryOfBirth | CtryOfRes" mode="format"> | |
<span class="hint--bottom" aria-label="{.}"> | |
<xsl:value-of select="local:country-from-code(.)"/> | |
</span> | |
</xsl:template> | |
<xsl:template match="@* | *" mode="class"> | |
<xsl:attribute name="class" select="local-name()"/> | |
</xsl:template> | |
<xsl:template match="text()"> | |
<xsl:copy/> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment