Please enable JavaScript to view this site.

InterFormNG Manual 2020

We defined a simple split of the Intro_demo.xml file here. This resulted in 3 files, which contained the data from the detail path (Split Xpath Expression), but not the parents of this, so you could not see which customer each invoice belongs to. You can see the original xml file here. Here you may notice the ‘header nodes’ prior to the first document. These header nodes are missing in the splitted xml files created.

 

 

Splitting the intro_demo.xml file

For the Intro_demo.xml file, which is included in InterFormNG inside {INTERFORMNG_HOME}/resources/documents/Intro you can also split up this for each Document node. This is done with this path:

InterFormNG_transform_013

Using this xslt creates one xml file for each document - including the information from the parent node:

 

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

 <xsl:param name="detail"/>

 <xsl:template match="/">

         <Root>

                 <xsl:copy-of select="$detail/parent::*/CompanyInfo"/>

                 <xsl:copy-of select="$detail/parent::*/Greeting"/>

                 <xsl:copy-of select="$detail/parent::*/Barcode"/>

                 <xsl:copy-of select="$detail"/>

         </Root>

 </xsl:template>

</xsl:stylesheet>