Skip to content

Pass a variable to <Image maxwidth="$var" /> #531

Answered by pgundlach
Cicorione asked this question in Q&A
Discussion options

You must be logged in to vote

The xpath escape must be enabled (your second attempt).

Does this work:

<Layout xmlns="urn:speedata.de:2009/publisher/en"
    xmlns:sd="urn:speedata:2009/publisher/functions/en">

    <Record element="data">
        <SetVariable variable="mw" select="3" />
        <PlaceObject>
            <Table>
                <Tr>
                    <ForAll select="img">
                        <Td>
                            <Image file="_samplea.pdf" maxheight="2" maxwidth="{$mw}" />
                        </Td>
                        <SetVariable variable="mw" select="$mw div 2"></SetVariable>
                    </ForAll>
                </Tr>
            </Table>
        </PlaceObject>
    </R…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Cicorione
Comment options

@Cicorione
Comment options

Answer selected by Cicorione
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants