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

Lazy evaluation of Grid in Pagetype #130

Closed
pgundlach opened this issue May 8, 2017 · 1 comment
Closed

Lazy evaluation of Grid in Pagetype #130

pgundlach opened this issue May 8, 2017 · 1 comment
Assignees
Milestone

Comments

@pgundlach
Copy link
Member

@pgundlach pgundlach commented May 8, 2017

It should be possible to write something like this:

<Layout
  xmlns="urn:speedata.de:2009/publisher/en"
  xmlns:sd="urn:speedata:2009/publisher/functions/en">
  <Pageformat width="80mm" height="50mm" />
  <Trace grid="yes"/>

  <Pagetype name="a" test="true()">
    <Margin left="1cm" right="1cm" top="1cm" bottom="1cm" />
    <Grid height="{$ht}" nx="10"/>
  </Pagetype>

  <Record element="data">
    <SetVariable variable="ht" select="'12pt'"/>
    <PlaceObject>
      <Textblock>
        <Paragraph>
          <Value>text</Value>
        </Paragraph>
      </Textblock>
    </PlaceObject>
    <SetVariable variable="ht" select="'1cm'"/>
    <NewPage/>
    <PlaceObject>
      <Textblock>
        <Paragraph>
          <Value>text</Value>
        </Paragraph>
      </Textblock>
    </PlaceObject>
  </Record>
</Layout>

To get lazy evaluation in a page type.

@pgundlach pgundlach added this to the Version 3.0 milestone May 8, 2017
@pgundlach pgundlach self-assigned this May 8, 2017
pgundlach added a commit that referenced this issue May 8, 2017
This way it is possible to set a grid based on an XPath expression.

This implements #130.
@pgundlach
Copy link
Member Author

@pgundlach pgundlach commented May 8, 2017

Implemented in b3a41ef

pgundlach added a commit that referenced this issue Oct 22, 2017
This fixes an implementation bug in 
b3a41ef. 

See also #130.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant