[xsl] Need help with grouping

Subject: [xsl] Need help with grouping
From: "Charlie 0 charlieo0@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Jun 2024 21:05:39 -0000
I am writing FO style sheets where I have foldout figure (11x17) interspersed with "regular" figures. In the output, the foldout figures are placed at the end of each chapter. I have that done. I need to create a List of Illustrations where the figures are rendered first, followed by the foldout figures. I need to group them by chapter. I am familiar with grouping by haven't worked with it lately so I could use some guidance on defining and outputting the groups. And very basic example of the structure:

<book>
<chapter>
B B B  <para>Para Stuff</para>
B B B  <para>
B B B B B B B  <figure>
B B B B B B B B B B B  <title>Fig1 title</title>
B B B B B B B B B B B  <graphic file="xxx.tif"></graphic>
B B B B B B B  </figure>
B B B B B B B  <figure>
B B B B B B B B B B B  <title>Fig2 title</title>
B B B B B B B B B B B  <graphic file="xxx.tif"></graphic>
B B B B B B B  </figure>
B B B B B B B  <foldout>
B B B B B B B B B B B  <figure>
B B B B B B B B B B B B B B B  <title>foldoutFig1 title</title>
B B B B B B B B B B B B B B B  <graphic file="xxx.tif"></graphic>
B B B B B B B B B B B  </figure>
B B B B B B B  </foldout>
B B B B B B B  <figure>
B B B B B B B B B B B  <title>Fig4 title</title>
B B B B B B B B B B B  <graphic file="xxx.tif"></graphic>
B B B B B B B  </figure>
B B B  </para>
</chapter>
<chapter>
B B B  <para>Para Stuff</para>
B B B  <para>
B B B B B B B  <figure>
B B B B B B B B B B B  <title>Fig5 title</title>
B B B B B B B B B B B  <graphic file="xxx.tif"></graphic>
B B B B B B B  </figure>
B B B B B B B  <figure>
B B B B B B B B B B B  <title>Fig6 title</title>
B B B B B B B B B B B  <graphic file="xxx.tif"></graphic>
B B B B B B B  </figure>
B B B B B B B  <foldout>
B B B B B B B B B B B  <figure>
B B B B B B B B B B B B B B B  <title>foldoutFig2 title</title>
B B B B B B B B B B B B B B B  <graphic file="xxx.tif"></graphic>
B B B B B B B B B B B  </figure>
B B B B B B B  </foldout>
B B B B B B B  <figure>
B B B B B B B B B B B  <title>Fig8 title</title>
B B B B B B B B B B B  <graphic file="xxx.tif"></graphic>
B B B B B B B  </figure>
B B B B B B B  <figure>
B B B B B B B B B B B  <title>Fig9 title</title>
B B B B B B B B B B B  <graphic file="xxx.tif"></graphic>
B B B B B B B  </figure>
B B B  </para>
B B B  <para>More para stuff</para>
</chapter></book>

The output will be XSL-FO, but here is the basic idea of how I need to have the figure and foldouts on output. I have all the numbering already done, so don't focus on that. I need to get the "regular" figures listed first, followed by the foldout figures, by chapter.

<illuslist>
B B B  <table>
B B B B B B B  <row>
B B B B B B B B B B B  <entry>1-1</entry><entry>Fig1 title</entry>
B B B B B B B  </row>
B B B B B B B B B B B  <row>
B B B B B B B B B B B B B B B  <entry>1-2</entry><entry>Fig2 title</entry>
B B B B B B B B B B B  </row>
B B B B B B B B B B  <row>
B B B B B B B B B B B B B B  <entry>1-3</entry><entry>Fig4 title</entry>
B B B B B B B B B B  </row>
B B B B B B B B B B B  <row>
<entry>1-4</entry><entry>foldoutFig1 title</entry>
B B B B B B B B B B B  </row>
B B B B B B B  <row>
B B B B B B B B B B B  <entry>2-1</entry><entry>Fig5 title</entry>
B B B B B B B  </row>
B B B B B B B B B B B  <row>
B B B B B B B B B B B B B B B  <entry>2-2</entry><entry>Fig6 title</entry>
B B B B B B B B B B B  </row>
B B B B B B B B B B B  <row>
B B B B B B B B B B B B B B B  <entry>2-3</entry><entry>Fig8 title</entry>
B B B B B B B B B B B  </row>
B B B B B B B B B B B  <row>
B B B B B B B B B B B B B B B  <entry>2-4</entry><entry>Fig9 title</entry>
B B B B B B B B B B B  </row>
B B B B B B B  <row>
B B B B B B B B B B B  <entry>2-5</entry><entry>foldoutFig2 title</entry>
B B B  B B B  </row
B B B B </table>

</illuslist>

Thanks,

Charlie O

Current Thread