-
Hi @pgundlach Trying to figure out where is the pebcak... <!-- The variable that control maxwidth -->
<SetVariable variable="mw" select="7"/>
<PlaceObject column="1" row="1">
<Table width="7" min-height="{sd:group-height('unit')}" height="{sd:group-height('unit')}" stretch="max">
<Tr>
<ForAll select="img">
<Td padding="10mm" valign="middle" align="center">
<Image file="{@file}" maxheight="{sd:group-height('unit') * 0.7}" maxwidth="$mw"/>
</Td>
<!-- Change the value -->
<SetVariable variable="mw" select="$mw - 1.5"/>
</ForAll>
</Tr>
</Table>
</PlaceObject> But I get this error: If I "enable" Call "Switch" from layout
Call "SetVariable" from layout
Call "PlaceObject" from layout
Call "Table" from layout
Call "Tr" from layout
Call "ForAll" from layout
Call "Td" from layout
Call "Image" from layout
Call "SetVariable" from layout
Call "Td" from layout
Call "Image" from layout
Call "SetVariable" from layout
PlaceObject: Table at (1,1) wd/ht: 17/22 in "unit" (p. 26) Is there an easy fix for this? 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
pgundlach
Oct 18, 2023
Replies: 1 comment 2 replies
-
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>
</Record>
</Layout> and the following data: <data>
<img></img>
<img></img>
<img></img>
</data> |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Cicorione
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The xpath escape must be enabled (your second attempt).
Does this work: