How to map a set of data of the same kind
An example of mapping a set of data of the kind in XML file.
If you have, for example, the result of recognition of a multipage document, each set of data contains the RRTs that correspond to a single page. Let us say you have the following RRT: ~FRO::%z%.PageNumber~, which is actually an RRT produced by the OP OCR component, where PageNumber indicates the page number. If your document consists of 5 pages, you will have five values for this RRT. To represent this data you can define a counter for a node, the counter corresponding to a page number.
<?xml version="1.0" encoding="iso-8859-1" ?>
<Root>
<Document>
<Page number="n">data</Page>
</Document>
</Root>
- Highlight the Page node in the tree and click the Properties button.
- Define a counter in the opened Multiply Node Block dialog box. Set its values to be from 1 to 5.
- Let us say the name of the counter is #counter#. Set the value of the number attribute to #counter#. Set the value of the Page node to the following: ~FRO::%z%.#counter#~.
This will produce the output in which there will be five nodes, each node having the number of the page in the number attribute and the value of the corresponding RRT as the text value of the node:
<?xml version="1.0" encoding="iso-8859-1" ?>
<Root>
<Document>
<Page number="1">text from the first page</Page>
<Page number="2">text from the second page</Page>
...
<Page number="5">text from the fifth page</Page>
</Document>
</Root>