Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken balancing #232

Closed
pgundlach opened this issue May 21, 2019 · 0 comments
Closed

broken balancing #232

pgundlach opened this issue May 21, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@pgundlach
Copy link
Member

data.xml:

<table>
  <head/>
  <rows count="40" />
  <head/>
  <rows count="2" />
  <head/>
  <rows count="1" />
</table>

layout.xml:

<Layout xmlns="urn:speedata.de:2009/publisher/en"
  xmlns:sd="urn:speedata:2009/publisher/functions/en">
  
  <Pageformat height="13cm" width="21cm"/>
  <Options ignoreeol="yes" mainlanguage="English (Great Britain)"/>
  
  <SetGrid nx="12" height="13pt"/>
  <Trace grid="yes"/>
  
  <Pagetype name="t" test="true()">
    <PositioningArea name="area">
      <PositioningFrame width="6" height="22" row="1" column="1"/>
      <PositioningFrame width="6" height="22" row="1" column="7"/>
    </PositioningArea>
  </Pagetype>
  
  <Record element="table" >
    <SetVariable variable="c" select="0"/>
    <PlaceObject area="area" >
      <Table stretch="max" width="6"  balance="yes">
        <Columns>
          <Column width="1*"/>
        </Columns>
        <ForAll select="*">
          
          <Switch>
            <Case test="local-name() = 'head'">
              <SetVariable variable="c" select="$c + 1"/>
              <Tr sethead="yes" break-below="no" minheight="13pt">
                <Td backgroundcolor="gray">
                  <Paragraph><Value select="$c"></Value></Paragraph>
                </Td>
              </Tr>
            </Case>
            <Otherwise>
              <Loop select="@count">
                <SetVariable variable="c" select="$c + 1"/>
                <Tr>
                  <Td valign="top">
                    <Paragraph><Value select="$c"></Value></Paragraph>
                  </Td>
                </Tr>
              </Loop>
            </Otherwise>
          </Switch>
        </ForAll>
        
      </Table>
    </PlaceObject>
  </Record>
</Layout>

yields:

balance

@pgundlach pgundlach added the Bug label May 21, 2019
@pgundlach pgundlach added this to the Version 3.8 milestone May 21, 2019
@pgundlach pgundlach self-assigned this May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant