Splf extractor: Overlapping mappings

Splf extractor: Overlapping mappings

Mappings always refer to the contents of the spooled file and when you want to create a new mapping, then you start out by selecting the upper left corner of the area, that you want to map.

 

So it is a bit of a challenge, if you want to create two conditioned mappings, that selects the exact same spooled file area.

 

If we e.g. consider the address of this demo spooled file:

 

NG2SFE0033

 

Then we might want to create two different nodes in the output XML tree depending on the contents of the first word.

 

For the example above we e.g. want to create an address node named Herring, if the first word is Herring:

 

NG2SFE0034

 

For this we have created a fitting token:

 

NG2SFE0035

 

Now we also want to test for another word in the same area, and we want to create an XML node, Florence, if this is the first word.

 

The problem is however to select the same area twice, because if you try to create a second mapping with the same starting position, then the editor thinks, that you want to edit the existing mapping.

 

So instead you need to start the creation of the second mapping in a new area, that is more to the left/right or above/below the starting point, that you really wanted to map. If you select a start position, that is to the left or above the existing mapping, then the new mapping will be added above the previous one in the output XML data list:

 

NG2SFE0036

 

If the new mapping is selecting data only within the existing mapping, then the editor will create mapping, that is a child of the mapping, that surrounds it:

 

NG2SFE0037

 

If you create the new mapping with a starting point, that is to the right or below the starting point of the existing mapping (and is not surrounded by the existing one), then the new mapping will be created below the existing one in the XML data:

NG2SFE0038

 

Now you can edit the new mapping and place it where you want in two ways:

1.You can drag in the frames in the spooled file view:

NG2SFE0039

 

2.You can change the line/columns in the properties of the new mapping:

NG2SFE0040

 

Now we can now add a condition for this second mapping, which is true on the second and third page of the spooled file:

NG2SFE0041

 

How to insert a new mapping inside of an overlapped mapping

With the new overlapped mapping in place InterFormNG2 will always insert new mappings in the mapping, that is listed last in the data list. This means e.g. that if we want to select the name of the company, then this will as default be inserted into the last address window as below:

 

NG2SFE0043

 

If you want to insert the Company node in the Herring node above, then you first need to temporarily move (or reduce) the area of the second node (Florence), so that the two main nodes are not overlapping in the area of the company name and then you can insert the Company node for the Herring node as well:

 

NG2SFE0044

 

(Above I have temporarily moved the area for the Florence node a new lines down).

 

After the addition of the Company node in the Herring node, I move the area for the Florence node back up to where it should be.

 

 

The XML output

With the settings above we have built this output XML file:

 

NG2SFE0042

    • Related Articles

    • Splf extractor: Conditioned mappings

      Both the line and block element can be conditioned in the spooled file extractor. To condition an element you should first select the area in the spooled file view and create a simple mapping. Now you need to enable triggers on the right in order to ...
    • Introduction to the Spooled file extractor

      IMPORTANT: The spooled file extractor is no longer supported. Any spooled file extractor definitions, that has previously been designed can still be used in the workflow, but they cannot be edited. The better alternative is to use the designer for ...
    • Splf extractor: Simple mapping

      The spooled file extractor selects data from all the pages of the spooled file. The output XML file is a file with a node for each spooled file page, so it is very each to see from which spooled file page the XML data was extracted. First you need of ...
    • Splf extractor: Tokens

      In the spooled file extractor you can build conditions to conditionally select section of the spooled file. Whenever you add a condition you compare the selected text with a token. Predefined tokens InterFormNG2 is delivered with these predefined ...
    • Splf extractor: Expanable parent

      In the spooled file extractor it is possible to build a tree structure in the output XML. One challenge can however be, that you want a header mapping have a variable length to include a variable number of extra detail lines, that should be ...