[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xsl:for-each-group help needed !

Subject: Re: xsl:for-each-group help needed !
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Sep 2020 16:09:21 -0000
Re:  xsl:for-each-group help needed !
On 17.09.2020 16:27, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote:

Does your code handle this input?

 B  <block id="i1">content</block>
 B  <block id="i2" width="33">content</block>
 B  <block id="i3" width="67">content</block>
 B  <block id="i4" width="50">content</block>
 B  <block id="i5" width="50">content</block>
 B  <block id="i6" width="25">content</block>
 B  <block id="i6a" width="80">content</block>
 B  <block>content</block>
 B  <block id="i7" width="55">content</block>
 B  <block id="i8" width="20">content</block>
 B  <block id="i9">content</block>

i6 and i6a, taken together, have a width of 105. I guess then i6a needs
to be on a new line.

I get

   <block id="i1">content</block>
   <block type="composite">
      <block id="i2" width="33">content</block>
      <block id="i3" width="67">content</block>
   <block type="composite">
      <block id="i4" width="50">content</block>
      <block id="i5" width="50">content</block>
   <block id="i6" width="25">content</block>
   <block id="i6a" width="80">content</block>
   <block id="i7" width="55">content</block>
   <block id="i8" width="20">content</block>
   <block id="i9">content</block>

with the last suggestion I posted.

I added its accumulator value(s) to each block:

 B B  <block id="i1" width="100" acc="100">content</block>
 B B  <block type="composite">
 B B B B B  <block id="i2" width="33" acc="33 133">content</block>
 B B B B B  <block id="i3" width="67" acc="100">content</block>
 B B  </block>
 B B  <block type="composite">
 B B B B B  <block id="i4" width="50" acc="50 150">content</block>
 B B B B B  <block id="i5" width="50" acc="100">content</block>
 B B  </block>
 B B  <block id="i6" width="25" acc="25 125">content</block>
 B B  <block id="i6a" width="80" acc="80 105">content</block>
 B B  <block width="100" acc="100 180">content</block>
 B B  <block type="composite">
 B B B B B  <block id="i7" width="55" acc="55 155">content</block>
 B B B B B  <block id="i8" width="20" acc="75">content</block>
 B B  </block>

Why are i7 and i8 in a composite block?

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.