Re: [xep-support] Event from RenderX

From: JingJun Long <longjingjun@gmail.com>
Date: Tue Mar 27 2007 - 00:15:52 PST

Ken,

Thank you very much for your comments. It helps me a lot.

Yes, I am imagining a feedback loop from the XSL-FO compose engine.

My situation is:
I have an XML file with some page break information in it like the
following:

<book>
    <pagest page_number="1" manual_name="How to cook Chinese food by
your self" title="">
    <title>How to cook Chinese food by your self</title>
    <Author>The big chef</Author>
    <chapter chapnbr="1">
       <title>Introduction</title>
       <para>Welcome to the food world ........ </para>
       <para>...</para>
       <para>...</para>

       <pagest page_number="2" manual_name="How to cook Chinese food by
your self" title="Introduction">
       <para>Before you decide to cook your self ........</para>
       <para>...</para>
       <para>...</para>
    </chapter>
    <chapter chapnbr="2">
       <pagest page_number="10" manual_name="How to cook Chinese food by
your self" title="Chinese food culture">
       <title>Chinese food culture<title>
       <para>...</para>
</book>

I would like to print the page information in header.

In XSL-FO, we can do the following generate header:

<fo:static-content flow-name="content-region-before">
    <fo:block>
        <fo:block>
            How to cook Chinese food by your self
        </fo:block>
        <fo:leader leader-length="7.69in" leader-pattern="rule"
rule-thickness="0.5mm" color="black" />
    </fo:block>
</fo:static-content>

But the header above is static. In my situation, the contents in the
header are dynamic and vary from page to page.

Originally and naturally (maybe not the way which XSL-FO want me but my
own way), I was thinking about I get the page information and put it
into header when there is a page break event from RenderX compose engine.

Another solution I was ever thinking about is each page use one
fo:page-sequence. But this will not work because the page break can be
in the middle of an element, for an example: in the middle of a list.

Thank you very much

JingJun Long

G. Ken Holman wrote:
> At 2007-03-27 10:21 +0800, JingJun Long wrote:
>> I have a requirement like the following:
>>
>> I would like to control the generation of header and footer.
>>
>> Let's say there is a new page started. Before the engine generate
>> header and footer, is there any event from RenderX compose engine
>> like "new_page_event".
>
> Where do you want this event to show up? In XSLT?
>
> The XSL formatting model dictates that XSLT transformation be entirely
> complete before XSL-FO processing can begin. There is no feedback
> loop. For my XSL students who have a background in Frame or PageMaker
> or InDesign, they are surprised to hear that the XSL model is "arms
> length" in that the XSLT transformation must inject contingencies into
> the XSL-FO expression because the XSL-FO engine has no way of
> communicating formatting status back to the XSLT process.
>
> From your brief description I get the impression you are imagining a
> feedback loop to your XSLT transform that is occurring during the
> XSL-FO layout process.
>
> But perhaps I am misunderstanding the processes you are asking about,
> since I am assuming your question is similar to the questions of some
> of my students.
>
>> Just like a hook. I can write my own code to handle this event. So
>> that I can prepare the data which will appear in header or footer?
>
> The XSL-FO model requires all header and footer content of all pages
> to be placed into the XSL-FO instance before the formatting of the
> very first page.
>
>> Or do you have other mechanism to handle requirement like this?
>
> Instead of asking your question the way you have, can you describe
> what it is you want in your headers and footers? I think you have
> presupposed a processing model that doesn't work the way you imagine.
> If you describe your requirement as a formatting requirement (not as a
> processing requirement) then perhaps someone on the list can suggest
> how you can get what you need with the processing model as it is
> implemented.
>
> I hope this helps.
>
> . . . . . . . . . . . . . . Ken
>
>
> --
> World-wide corporate, govt. & user group XML, XSL and UBL training
> RSS feeds: publicly-available developer resources and training
> G. Ken Holman mailto:gkholman@CraneSoftwrights.com
> Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
> Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
> Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
> Legal business disclaimers: http://www.CraneSoftwrights.com/legal
>
> -------------------
> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
> in the body of the message to majordomo@renderx.com from the address
> you are subscribed from.
> (*) By using the Service, you expressly agree to these Terms of
> Service http://www.renderx.com/terms-of-service.html
>

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Tue, 27 Mar 2007 16:15:52 +0800

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2007 - 00:54:13 PST