1

I have the following XML group...

<BOXES>
  <BOX_CODE>01</BOX_CODE>
  <BOX_CODE>12</BOX_CODE>
  <BOX_CODE>15</BOX_CODE>
  <BOX_CODE>45</BOX_CODE>
  <BOX_CODE>46</BOX_CODE>
  <BOX_CODE>70</BOX_CODE>
  <BOX_CODE>80</BOX_CODE>
  <BOX_CODE>98</BOX_CODE>
  <BOX_CODE>SA</BOX_CODE>
</BOXES>

... and in the RTF template I would like to display each of those values in a separate column, like this:

01 | 12 | 15 | 45 | 46 | 70 | 80 | 98 | SA

I am trying to use a for-each-group function but not getting the results I want.

Keep in mind that the number of BOX_CODE values is dynamic. In my example there are 9, but there could be less or more at any given time.

I tried using for-each-group@column but did not get the results I wanted. Any help would be greatly appreciated.

mannyotr
  • 87
  • 2
  • 12

1 Answers1

1

Well, I went about it a different way. I created the group like this instead...

<BOX_GROUP>
  <BOXES><BOX_CODE>01</BOX_CODE></BOXES>
  <BOXES><BOX_CODE>12</BOX_CODE></BOXES>
  <BOXES><BOX_CODE>15</BOX_CODE></BOXES>
  <BOXES><BOX_CODE>45</BOX_CODE></BOXES>
  <BOXES><BOX_CODE>46</BOX_CODE></BOXES>
  <BOXES><BOX_CODE>70</BOX_CODE></BOXES>
  <BOXES><BOX_CODE>80</BOX_CODE></BOXES>
  <BOXES><BOX_CODE>98</BOX_CODE></BOXES>
  <BOXES><BOX_CODE>SA</BOX_CODE></BOXES>
</BOX_GROUP>

And I was able to get the desired results using...

<?for-each-group@column: BOXES; BOX_CODE?>
  <?BOX_CODE?>
<?end for-each-group?>
mannyotr
  • 87
  • 2
  • 12