<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
               <xsl:template match="/">
                              <eExact>
                                            <xsl:for-each select="xml/kopregel">
                                                           <GLEntries>
                                                                          <GLEntry status="E">
                                                                                         <xsl:attribute name="entry">
                                                                                                       <xsl:value-of select="bkstnr"/>
                                                                                         </xsl:attribute>
                                                                                         <Description>
                                                                                                       <xsl:value-of select="oms25"/>
                                                                                         </Description>
                                                                                         <Date>
                                                                                                       <xsl:value-of select="substring(date,5,4)"/>
                                                                                                       <xsl:text>-</xsl:text>                                                                                              
                                                                                                       <xsl:value-of select="substring(date,3,2)"/>
                                                                                                       <xsl:text>-</xsl:text> 
                                                                                                       <xsl:value-of select="substring(date,1,2)"/>
                                                                                         </Date>
                                                                                         <DocumentDate>
                                                                                                       <xsl:value-of select="substring(date,5,4)"/>
                                                                                                       <xsl:text>-</xsl:text> 
                                                                                                       <xsl:value-of select="substring(date,3,2)"/>
                                                                                                       <xsl:text>-</xsl:text> 
                                                                                                       <xsl:value-of select="substring(date,1,2)"/>
                                                                                         </DocumentDate>
                                                                                         <Journal>
                                                                                                       <xsl:attribute name="type">
                                                                                                                      <xsl:value-of select="dagb_type"/>
                                                                                                       </xsl:attribute>
                                                                                                       <xsl:attribute name="code">
                                                                                                                      <xsl:value-of select="dagbknr"/>
                                                                                                       </xsl:attribute>
                                                                                         </Journal>
                                                                                         <FreeFields>
                                                                                                       <FreeTexts>
                                                                                                                      <FreeText number="2">
                                                                                                                                     <xsl:value-of select="substring(bestand,1,75)"/>
                                                                                                                      </FreeText>
                                                                                                       </FreeTexts>
                                                                                                       <FreeTexts>
                                                                                                                      <FreeText number="3">
                                                                                                                                     <xsl:value-of select="substring(bestand,76,75)"/>
                                                                                                                      </FreeText>
                                                                                                       </FreeTexts>
                                                                                         </FreeFields>
                                                                                         <xsl:for-each select="boekingsregel/bkstnr">
                                                                                                       <FinEntryLine subtype="T" type="N">
                                                                                                                      <Date>
                                                                                                                                     <xsl:value-of select="substring(../date,5,4)"/>
                                                                                                                                     <xsl:text>-</xsl:text> 
                                                                                                                                     <xsl:value-of select="substring(../date,3,2)"/>
                                                                                                                                     <xsl:text>-</xsl:text> 
                                                                                                                                     <xsl:value-of select="substring(../date,1,2)"/>
                                                                                                                      </Date>
                                                                                                                      <GLAccount>
                                                                                                                                     <xsl:attribute name="code">
                                                                                                                                                    <xsl:value-of select="../reknr"/>
                                                                                                                                     </xsl:attribute>
                                                                                                                      </GLAccount>
                                                                                                                      <Description>
                                                                                                                                     <xsl:value-of select="../oms25"/>
                                                                                                                      </Description>
                                                                                                                      <Costcenter>
                                                                                                                                     <xsl:attribute name="code">
                                                                                                                                                    <xsl:value-of select="../kstplcode"/>
                                                                                                                                     </xsl:attribute>
                                                                                                                      </Costcenter>
                                                                                                                      <Creditor>
                                                                                                                                     <xsl:attribute name="code">
                                                                                                                                                    <xsl:value-of select="../../crdnr"/>
                                                                                                                                     </xsl:attribute>
                                                                                                                      </Creditor>
                                                                                                                      <Amount>
                                                                                                                                     <Debit>
                                                                                                                                                    <xsl:value-of select="../bedrag"/>
                                                                                                                                     </Debit>
                                                                                                                                     <VAT>
                                                                                                                                                    <xsl:attribute name="code">
                                                                                                                                                                  <xsl:value-of select="../btwcode"/>
                                                                                                                                                    </xsl:attribute>
                                                                                                                                     </VAT>
                                                                                                                      </Amount>
                                                                                                                      <Payment>
                                                                                                                                     <Reference>
                                                                                                                                                    <xsl:value-of select="../../betaalref"/>
                                                                                                                                     </Reference>
                                                                                                                                     <InvoiceNumber>
                                                                                                                                                    <xsl:value-of select="../../fin_factuur_nr"/>
                                                                                                                                     </InvoiceNumber>
                                                                                                                      </Payment>
                                                                                                                      <FinReferences>
                                                                                                                                     <YourRef></YourRef>
                                                                                                                      </FinReferences>
                                                                                                       </FinEntryLine>
                                                                                         </xsl:for-each>
                                                                          </GLEntry>
                                                           </GLEntries>
                                            </xsl:for-each>
                              </eExact>
               </xsl:template>
</xsl:stylesheet>
