Hi,

I experimented with your code, and have to confess that my proposal wasn't
perfectly right: fo:table-omit-footer-at-break seems to apply to a table
like this: The table is always given the fooeter at its end. If is is
nescessary to break the table, this property decides if the footer should
appear also before the break. So, if there is one individual table for each
person, that table would always end with a footer.

I've tried some other things, including having one large table for all
persons, containing small one-person-tables in its table-cell blocks, and
trying to inherit the table-omit-footer-at-break property, but that one
wasn't accepted. None of my experimentation was successful :-(

I also got the "[WARNING] footer could not fit on page, moving last body row
to next page". I interpret this as a signal that fop runs into a conflict of
areas of the sort I imagined on oct. 25th. So I'm afraid we're really
stuck...

- Niels.

-----Original Message-----
From: Karena Schroven [mailto:[EMAIL PROTECTED]
Sent: 31. oktober 2002 11:20
To: '[EMAIL PROTECTED]'
Subject: AW: Where I am on the page?


Hi Niels,

I tried your idea. But it didn't work :-(
If a table with an address and the footer fit on the page (and it's the last
address on that page), the footer with the rule appears. The next table with
the next address appears on the next page. Because the first table has no
page-break, the footer appears.
If the last item of an address would be the last thing on the page, I get
this message: [WARNING] footer could not fit on page, moving last body row
to next page
But the last row did not move to the next page, only the footer will appear
as the first thing on the page. But the message tells something different.
Is this a bug? Or did I something wrong?

If this all will not work, I was thinking about playing around with
keep-togethers, so that it will never happen that a rule will be the first
or last thing on a page.

Thanks, Karena

Here is my code:

<xsl:template match="person">
        <fo:table table-layout="fixed" width="18.8cm"
table-omit-footer-at-break="true">
                <fo:table-column column-number="1" column-width="18.8cm"/>
                <fo:table-footer>
                        <fo:table-row>
                                <fo:table-cell>
                                        <fo:block>
                                                <fo:leader
leader-length="15cm" rule-thickness="3pt" leader-pattern="rule"/>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                </fo:table-footer>
                <fo:table-body>
                        <fo:table-row>
                                <fo:table-cell>
                                        <fo:block>
                                                <xsl:value-of
select="./name"/>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                                <fo:table-cell>
                                        <fo:block>
                                                <xsl:value-of
select="./str"/>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                                <fo:table-cell>
                                        <fo:block>
                                                <xsl:value-of
select="./ort"/>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                                <fo:table-cell>
                                        <fo:block>
                                                <xsl:value-of
select="./tel"/>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                                <fo:table-cell>
                                        <fo:block>
                                                <xsl:value-of
select="./fax"/>
                                        </fo:block>
                                </fo:table-cell>
                        </fo:table-row>
                </fo:table-body>
        </fo:table>
</xsl:template>



-----Ursprüngliche Nachricht-----
Von: Henriksen Niels Kristoffer [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 31. Oktober 2002 09:41
An: '[EMAIL PROTECTED]'
Betreff: RE: Where I am on the page?


Hi Karena and all,

after my lengthy theoretical reply last week, I've realized, that of course
we need to be able to allocate areas in a conditional way. We just cannot do
it by ourselves, but have to do with the features of the XSL-Recommendation
(or with what FOP can do), which after all is pretty rich.

This is my idea: Put your persons into tables with one column. Use one
fo:table cell for name, one for street &c. Use the fo:table-footer or
fo:table-header element with this table. fo:table has a
table-omit-header-at-break and a table-omit-footer-at-break property, the
function of which is almost explained by their names. The header or footer
could then contain your rule and be controlled by upcoming page-breaks.

I'll be happy to know if you succeed.

- Niels.

-----Original Message-----
From: Karena Schroven [mailto:[EMAIL PROTECTED]
Sent: 16. oktober 2002 10:52
To: '[EMAIL PROTECTED]'
Subject: AW: Where I am on the page?


Guess I haven't explained my problem the right way. It doesn't matter if the
addresses are splitted. The example shows how it looks correct (no line
after the second address on page one). 

Example correct:
        Page One                Page Two
 
        Name                    Name
        Street          Street
        City                    City
        Phone                   -----------
        ------------    Name
        Name                    Street
        Street          City
        City
        Phone                           <<== Here is no line at the end and
that is what I want.

Example incorrect:
        Page One                Page Two
 
        Name                    Name
        Street          Street
        City                    City
        -----------             Phone
        Name                    ----------
        Street          Name
        City
        Phone
        -----------                     <<== I want that this line doesn't
appear, because it is the last thing on this page

Example also correct:
        Page One                Page Two
 
        Name                    City
        Phone                   Phone
        ------------    ------------
        Name                    Name
        Street          Street
        City                    City
        ------------
        Name
        Street                  <<== It is OK when an address is splitted.


I use code like this:

...
<xsl:template match="[EMAIL PROTECTED]'person_record']">
        <fo:block>
                <xsl:apply-templates select="./pe_name"/>
                <xsl:apply-templates select="./pe_street"/>
                <xsl:apply-templates select="./pe_city"/>
                ...
==>>            <fo:leader leader-pattern="rule" rule-thickness="1pt"
leader-length="4.4cm"/>     <<==
        </fo:block>
</xsl:template>
...

I just want to control the ==>> marked <<== line. If this line is the last
thing on a page I don't want to write it.

Karena


-----Ursprüngliche Nachricht-----
Von: Konstantin Priblouda [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 16. Oktober 2002 10:10
An: [EMAIL PROTECTED]
Betreff: Re: Where I am on the page?



--- Karena Schroven <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have the following problem:
> 
> I want to generate a pdf-file with a list of
> addresses. Each address-block
> is separated by a line. If the line would be the
> first or last item on a
> page, it should not appear.
> 
> Example:
>       Page One                Page Two                Page Three
> 
>       Name                    Name                    Street
>       Street                  Street                  City
>       City                    City                    Phone
>       Phone                   -----------------               Fax
>       ------------            Name                    -----------------
>       Name                    Street                  Name
>       Street                  City
>       City                    -----------------
>       Phone                   Name
> 
> My problem is now how to control the line after each
> address-block.
> Unfortunately it is not possible to count the
> address-blocks and write a
> line after each block except of every 6th because an
> address-block can also
> be just the name. So it is not clear how many
> address-blocks fit to one
> page. My question is now, is there any function that
> tells me where I am on
> my page, like 27cm from the top? With such a
> function I can find out if
> there is enough space to write the line and another
> address or if I am at
> the end of a page.

Like in old HTML days - wrap them into table cells,
and add att5ribute keep-together="always".

Though it would keep whole cell on one page.

grüß,

=====
Konstantin Priblouda ( ko5tik )    Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

Reply via email to