Hello Ken,
thanks for your answer.
We have a remote spreadsheet application with an economic background.
The spreadsheets are in a hierarchical structure. And there exists a
printview for each of the spreadsheets.
In the header of the PDF there should the name of the spreadsheet be
printed out. This name contains the complete path to the spreadsheet:
root > level1 > level2 > level3 > sheet1.
For some spreadsheets the path can be so long, that one line is not
enough and the text wraps.
In conclusion: there is one PDF for each spreadsheet, so the header
remains the same for one PDF. But the XSL FO is dynamically created by
one XSLT. So I can either set the @extent to a high enough value or
calculate it approximately, e.g. by the string-length - but that's not
really nice. A different page master is not necessary I think.
Thanks again for your help and the clarification on the order of the
elements.
Joerg
G. Ken Holman wrote:
At 2003-04-03 18:51 +0200, you wrote:
<fo:region-before display-align="before" extent="10mm"/>
<fo:region-body margin-top="10mm"/>
BTW, tools may accept the order above, but they do so improperly.
Another tool might reject the above because the order implied by the
Recommendation is that the body is specified first.
Section 6.2 states the content is described using content-model syntax,
but doesn't say that the order as expressed using that syntax can be
violated. Section 6.4.12 explicitly orders region-body first.
But on to your question ....
In the region-before I have a <fo:block/>, which is filled with some
dynamically created text. In some cases the text is longer than the
one line and it must be wrapped - but this hidden because of the
little extension of region-before (10mm). If I set it to 20 mm the
text wraps correctly, but it goes into the region-body, what I don't
want to have. Of course I can set margin-top for region-body to 20mm
too, but than I have in most cases to much space between the text in
the header and region-body.
So it would be nice to have a dynamic region-before height (@extent).
Or region-body simply starts there where region-before ends.
As you've found, neither is available in XSL-FO 1.0.
I used region-before, because this header should be printed out on
every page.
But by what criteria is it changed?
Is there any solution or workaround?
If the "dynamic" text is created by you and not by <retrieve-marker/>
then can you algorithmically decide to use a different page master?
There is a free resource on our web site called "Page Sequence Master
Interleave (PSMI)" that can be used to interleave different page masters
for block-level top-of-flow constructs. The canonical example is the
need to present a long landscape table in the middle of
portrait-oriented content ... perhaps your criteria can be satisfied by
using this outboard semantic.
For example having the text in region-body, but printing it also on
every page?
Nothing I know of is available in this direction.
I hope this helps.
.................. Ken
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list