Section - 1 : Mapping Formatted Data from Extract Files


You can map data with XML markup directly into multi-line variable fields. This lets you specify:

  • End of paragraph or end of line syntax (including CR/LF)
  • Text formatting
  • Paragraph attributes
  • Bullets

and so on. Whatever is supported in Skywire Software standard XML file format for text areas is now supported for multi-line fields.

This feature is designed for data mapping from an XML extract file into a multi-line variable field in a FAP file. The data on the XML node (element and its descendants) being mapped must comply with the standard Skywire Software XML format.

This feature adds new syntax for XPath, which is not W3C standard XPath syntax. When XPath is specified, you can append the following:

.xml()

and it will return a string of XML for data mapping.

Data mapping is done by supporting the mapped data that contains the XML string — just as if it had been loaded from a file on disk.

Keep in mind...

  • The data must start with element named FIELD.
  • If the text area can possibly overflow to next page, set the Can Grow and Can Span Pages attributes as desired on the multi-line field. Also determine whether to set the Can Grow attribute on the image. In most cases, you should choose to include the TextMergeParagraph rule to defer formatting of text areas until embedded fields are mapped. In addition, you can use the CanSplitImage rule when you are not using the Can Span options and want the image to break across pages if the position of the image on the page warrants this action.
  • You cannot have other FAP objects below the multi-line field on the same image. When these are pushed down, extra pages can be created.
  • You should include the CheckImageLoaded rule when mapping multi-line variable fields, unless the FAP files are loaded via INI options

Here is an example of an XML extract file:

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

<My_Extract_Data>

<FIELD><P>First line of data.</P><P>End of <B><U>field</U></B> data.</P></FIELD>

<KeyInfo PolicyNumber="APV 10003" State="OH" LOB="Auto" AgencyCode="5432" PrintType="Duplex" PrintAgentCopy="False" System_Date="06/02/2003"/>

<Print_Header>

....

Based on the example, this XPath syntax returns the text highlighted above in red:

/descendant::My_Extract_Data/FIELD.xml()

Since the XML string returned from XPath can exceed the 1K limit of regular data mapping, the Move_It rule was enhanced to handle the mapping of an unlimited size of data (but limited to available memory).

Using the Move_It rule

To get the desired result, you must add the B flag to the Move_It rule format mask. Here is an example DDT line using both examples from above:

;0;0;FIELD;0;1024;FIELD;0;1024;B;move_it;!/descendant::My_Extract_Data/FIELD.xml();N;N;N;N;3715;2899;11010;