<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ken,<br>
<br>
Thank you very much for your comments. It helps me a lot.<br>
<br>
Yes, I am imagining a feedback loop from the XSL-FO compose engine. <br>
<br>
My situation is:<br>
I have an XML file with some page break information in it like the
following:<br>
<br>
<small><font face="Courier New"><book><br>
<font color="#990000"><pagest page_number="1" manual_name="How
to cook Chinese food by your self" title=""></font><br>
<title>How to cook Chinese food by your self</title><br>
<Author>The big chef</Author><br>
<chapter chapnbr="1"><br>
<title>Introduction</title><br>
<para>Welcome to the food world ........ </para><br>
<para>...</para><br>
<para>...</para><br>
<br>
</font><font face="Courier New"><font color="#cc0000"> <pagest
page_number="2" manual_name="How to cook Chinese food by your self"
title="Introduction"></font><br>
</font><font face="Courier New"><para>Before you decide
to cook your self ........</para><br>
<para>...</para><br>
<para>...</para></font><br>
</small><font face="Courier New"><small> </chapter><br>
<chapter chapnbr="2"><br>
</small></font><small><font face="Courier New"><font
color="#cc0000"><pagest page_number="10" manual_name="How to cook
Chinese food by your self" title="Chinese food culture"></font></font></small><br>
<font face="Courier New"><small> <title</small></font><font
face="Courier New"><small>>Chinese food culture<title><br>
</small></font><small><font face="Courier New"><para>...</para></font></small><br>
<font face="Courier New"><small></book></small><br>
<br>
</font>I would like to print the page information in header. <br>
<br>
In XSL-FO, we can do the following generate header:<br>
<br>
<small><font face="Courier New"><fo:static-content
flow-name="content-region-before"><br>
<fo:block><br>
<fo:block><br>
How to cook Chinese food by your self<br>
</fo:block><br>
<fo:leader leader-length="7.69in" leader-pattern="rule"
rule-thickness="0.5mm" color="black" /><br>
</fo:block><br>
</fo:static-content></font></small><br>
<br>
But the header above is static. In my situation, the contents in the
header are dynamic and vary from page to page. <br>
<br>
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.<br>
<br>
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. <br>
<br>
Thank you very much <br>
<br>
JingJun Long<br>
<br>
<br>
G. Ken Holman wrote:
<blockquote
cite="mid7.0.1.0.2.20070327063423.02a3d2e8@CraneSoftwrights.com"
type="cite">At 2007-03-27 10:21 +0800, JingJun Long wrote:
<br>
<blockquote type="cite">I have a requirement like the following:
<br>
<br>
I would like to control the generation of header and footer.
<br>
<br>
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".
<br>
</blockquote>
<br>
Where do you want this event to show up? In XSLT?
<br>
<br>
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.
<br>
<br>
>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.
<br>
<br>
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.
<br>
<br>
<blockquote type="cite">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?
<br>
</blockquote>
<br>
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.
<br>
<br>
<blockquote type="cite">Or do you have other mechanism to handle
requirement like this?
<br>
</blockquote>
<br>
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.
<br>
<br>
I hope this helps.
<br>
<br>
. . . . . . . . . . . . . . Ken
<br>
<br>
<br>
--
<br>
World-wide corporate, govt. & user group XML, XSL and UBL training
<br>
RSS feeds: publicly-available developer resources and training
<br>
G. Ken Holman <a class="moz-txt-link-freetext" href="mailto:gkholman@CraneSoftwrights.com">mailto:gkholman@CraneSoftwrights.com</a>
<br>
Crane Softwrights Ltd. <a class="moz-txt-link-freetext" href="http://www.CraneSoftwrights.com/f/">http://www.CraneSoftwrights.com/f/</a>
<br>
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
<br>
Male Cancer Awareness Aug'05 <a class="moz-txt-link-freetext" href="http://www.CraneSoftwrights.com/f/bc">http://www.CraneSoftwrights.com/f/bc</a>
<br>
Legal business disclaimers: <a class="moz-txt-link-freetext" href="http://www.CraneSoftwrights.com/legal">http://www.CraneSoftwrights.com/legal</a>
<br>
<br>
-------------------
<br>
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
<br>
in the body of the message to <a class="moz-txt-link-abbreviated" href="mailto:majordomo@renderx.com">majordomo@renderx.com</a> from the address
<br>
you are subscribed from.
<br>
(*) By using the Service, you expressly agree to these Terms of Service
<a class="moz-txt-link-freetext" href="http://www.renderx.com/terms-of-service.html">http://www.renderx.com/terms-of-service.html</a>
<br>
<br>
</blockquote>
<br>
</body>
</html>