xsl-list
[Top] [All Lists]

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

2020-09-17 11:09:27
On 17.09.2020 16:27, Imsieke, Gerrit, le-tex 
gerrit(_dot_)imsieke(_at_)le-tex(_dot_)de wrote:

Does your code handle this input?

<blocks>
   <block id="i1">content</block>
   <block id="i2" width="33">content</block>
   <block id="i3" width="67">content</block>
   <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>content</block>
   <block id="i7" width="55">content</block>
   <block id="i8" width="20">content</block>
   <block id="i9">content</block>
</blocks>

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

I get

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

with the last suggestion I posted.

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

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

Why are i7 and i8 in a composite block?
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>