summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LibreOfficeCalc-SPG-Verein-SEPA-Export-Filter.xslt19
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>