Hi,
I am trying to output the following using XSL:FO.
_______________
label: | A |
|______________|
_______________
label2 | B |
|______________|
The use of absolute positioning is not acceptable, as I have a number
of rows of such components, so when the text of area A spans multiple
lines it would fall on area B, etc. Therefore relative positioning is
desirable.
In addition, areas A and B should be able to expand vertically only
and they should have a fixed width. Therefore <fo:inline> components
cannot be used for areas A, B because text will overflow the fixed
width of a <fo:inline> outside the rectangle.
The following produces a similar result but the area B is positioned
not next to label2, but in the following line because of the newline
inserted by the <fo:block >:
<xsl:template>
<fo:block-container max-width="10cm">
<fo:block space-before="0.2cm"
space-before.conditionality="retain" font-size="11pt" width="10cm">
<fo:inline width="5.67cm">
<xsl:value-of select=".//label"/>
</fo:inline>
</fo:block>
<fo:block border-style="solid" border-width="thin"
margin-left="5.7cm" space-before="-2.2cm"
space-before.conditionality="retain">
<xsl:value-of select=".//answer"/>
</fo:block>
</fo:block-container>
</xsl:template>
The above produces:
label:
_______________
| A |
|______________|
Is there a way of achieving the exact desirable output?
Cheers
Dimitris