I'm currently running circles with Exstream Designer, printing a list of small tables covering several pages.
Unfortunately my input data is "given" and fixed, so I can't just request better structure. The general form of the relevant part looks as this:
<xml>
<table>
<row>
<text>Blah</text>
<type>1</type>
<stuff>...</stuff>
</row>
<row>
<text>MoreBlah</text>
<type>2</type>
<stuff>...</stuff>
</row>
<row>...</row>
<row>...</row>
<row>...</row>
<row>
<text>Blah</text>
<type>1</type>
<stuff>...</stuff>
</row>
<row>
<text>MoreBlah</text>
<type>2</type>
<stuff>...</stuff>
</row>
</table>
<table>
<row>
<text>Blah</text>
<type>1</type>
<stuff>...</stuff>
</row>
<row>
<text>MoreBlah</text>
<type>2</type>
<stuff>...</stuff>
</row>
<row>
<text>Blah</text>
<type>1</type>
<stuff>...</stuff>
</row>
<row>
<text>MoreBlah</text>
<type>2</type>
<stuff>...</stuff>
</row>
</table>
</xml>
You will note that there are several <table> sections, each containing a couple of <row> sections. I need to print a new table, each time there is a <row> containing a <type> of "1".
Since these rows may not be "the first in each table" as usual, I essentially cannot use the <table> tag for defining a useful section start for a new (design) table and can only ignore it completely.
On the other hand, I cannot just define a section start with XPATH as "//table/row[type = '1']". At least I don't find any sophisticated XPATH selection in the mapping. I can just map plain tags or maybe "plain tag with parameter", which does not help either, as I have no "parameter" I could match.
That seems to limit me to just a list of <row> elements to work with.
On the design part I struggle with "only allow page break between blocks, but keep the block together". A block is starting with a row of "type=1" until the next block start or end of data.
I would utilize "sections" if I can define them that way. In my current implementation I can just create one loooong table that only looks properly segmented due to the heading and footing rows along with spacers. But I have to allow for table-breaks or I get no content at all, as "the table" is more than one page.
If I allow for table break, it however will happily split my (rowset) too. I just want to have it split before a "type=1" (or at a spacer row).
What I have tried so far:
Define the (rowset) part as "keep with previous" and set the table for "keep sections together". This gets me a couple of colored arrows indication a non-breakable block. But the first row (that has a rule of "type=1") must be defined as "start of section" and I just have <row> for that —> does not work out, rowset is still split.
Do a "table in table" design, allowing the outer table to split but not the inner one, so the outer-row may only break at a complete inner table —> does not work out. The inner table inherits the "allow split" from the outer table, the option is not selectable on the inner table. I found no solution to not-split a cell for the outer table either, which would confine my inner table.
Did I miss an option to "start a new table" at a certain record?
Did I miss an option to repeat tables (or content elements containing tables) instead of rows?
I confess I have much more experience in XMLIN and StoryTeller and could do this easily there, but that's not the tool I have available here…