diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-07-19 14:03:50 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-07-19 14:03:50 +0200 |
commit | 70e192c15a201126ec2299c06f574d243ebb5b3b (patch) | |
tree | f94346e03c5c2e986886ca60e277351791bb03fe | |
parent | 40ee98743f7336c609adc1477c3026a72fa372b7 (diff) |
-rw-r--r-- | LibreOfficeCalc-SPG-Verein-SEPA-Export-Filter.xslt | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/LibreOfficeCalc-SPG-Verein-SEPA-Export-Filter.xslt b/LibreOfficeCalc-SPG-Verein-SEPA-Export-Filter.xslt index ff77328..380d242 100644 --- a/LibreOfficeCalc-SPG-Verein-SEPA-Export-Filter.xslt +++ b/LibreOfficeCalc-SPG-Verein-SEPA-Export-Filter.xslt @@ -22,7 +22,10 @@ omit-xml-declaration="no" /> - <xsl:template match="/" name="main"> + <xsl:param name="sourceBaseURL" select="'./'" /> + <xsl:param name="metaFileURL" /> + + <xsl:template match="/"> <!-- build column headings variable for reference --> <xsl:variable name="columnHeadings-temp" xmlns=""> @@ -51,18 +54,22 @@ </xsl:variable> <xsl:variable name="table" select="exsl:node-set($table-temp)" /> - <!-- get entity data from settings --> + <!-- TODO: get entity data from settings --> + <xsl:variable name="meta-file-temp" xmlns=""> + <xsl:copy-of select="document(concat($sourceBaseURL, 'meta.xml'), .)" /> + </xsl:variable> + <xsl:variable name="meta-file" select="exsl:node-set($meta-file-temp)" /> <xsl:variable name="entity-temp" xmlns=""> <xsl:element name="name"> - <xsl:value-of select="'ENTITY_NAME'" /> + <xsl:value-of select="$meta-file/*[@meta:name='VEREINSNAME']" /> </xsl:element> <xsl:element name="IBAN"> - <xsl:value-of select="'DE1234567890'" /> + <xsl:value-of select="$meta-file/*[@meta:name='IBAN']" /> </xsl:element> <xsl:element name="BIC"> - <xsl:value-of select="'BYLADEM1NESSSSSS'" /> + <xsl:value-of select="$meta-file/*[@meta:name='BIC']" /> </xsl:element> </xsl:variable> <xsl:variable name="entity" select="exsl:node-set($entity-temp)" /> @@ -173,6 +180,8 @@ </xsl:template> + <!-- expand cells with "number-columns-repeated" property --> + <!-- so we can use actual consistent indices when accessing values in columns --> <!-- @see https://forum.openoffice.org/en/forum/viewtopic.php?p=131442#p131442 --> <xsl:template match="table:table-cell" name="repeat-columns"> <xsl:choose> |