[xep-support] RE: keep-with-next; keep-with-previous doesnt work for block span="all"

From: Kevin Brown <kevin@renderx.com>
Date: Fri Aug 28 2009 - 08:45:29 PDT

Kirch:

 

As xep-support has replied, this is a known limitation.

 

I fail to see the need for it in the example you provided. Is this is
simplified example? There is no two-column text inside it. In reality, you
have all blocks spanned and therefore it equates to a one-column document.
This condition only occurs when you have a need to keep a span-area attached
to a section that is multi-column.

 

We did implement two customizations in the past for customers to fix this
condition:

 

1) In the first case, it was acceptable to do formatting in multiple passes.
So we implemented a solution using <rx:pinpoint> markers after the section
headings and custom code that checked the XEP Intermediate Format file to
see if these pinpoints ended a page. The pinpoint carried the xpath to the
element that caused the specific heading. The document is checked
sequentially and of course needs to be recomposed after each "fix". If a bad
header was encountered, the xpath was used to find the offending header in
the source and add an attribute. The presence of this attribute would cause
a "page-break-before=always" in the FO. This iteration continued until the
document finished. So, basically, we implemented a computer-based solution
that was 100% automatic but it did as suggested -- a {computerized} "manual"
application of page-breaks before the offending headings.

 

2) In the second case, these "areas" were always smaller than one page. We
developed one style sheet that formatted only the headings along with the
two-column areas (ignoring the remaining content). Each of these "areas"
were formatted onto a new page in a document in XEP Intermediate Format. A
special process intercepted this XEP Intermediate File and wrote individual
XEP Intermediate Files for each area. This process also examined the XEP
Intermediate Format and calculated the height of each area and set the page
dimensions to these heights. The height was also recorded in a separate XML
file with the file name. So the result of this first pass was:

 

a) individual XEP Intermediate Files each sized to the exact dimensions of
the small heading+two column area

b) a separate XML file that listed each file name written along with the
dimensions

 

Then the "trick" ... use these XEP Intermediate Format files as graphics.

 

The document was then formatted to final form and this time those two column
areas had a template which inserted these XEP Intermediate Format files as
an <fo:external-graphic>. Since this is a graphic, there is no re-formatting
of the text and it would be placed all within a page. The separate XML file
was used to establish the src and height attributes. As you are not
formatting anything twice, this process took a little work to set up but
formats in almost the same time as would be required to format the whole
document. As noted, it only works if the areas [the spanned heading and the
following two column section] are going to be smaller than one section. In
the real-life example, these small areas were advertisements on the page --
a heading and a small, variable sized two-column area where the user
intended that the whole thing was kept-together so the solution fit
perfectly with what they needed.

 

Maybe one of these will work for you in your situation?

 

Kevin Brown

RenderX

kevin@renderx.com

 

From: Kirch Fritz [mailto:Friedrich.Kirch@it2media.de]
Sent: Friday, August 28, 2009 2:06 AM
To: xep-support@renderx.com
Cc: Chris Heuer; kevin@renderx.com
Subject: keep-with-next; keep-with-previous doesnt work for block span="all"

 

Dear support,

 

in XEP 4.15 in my 2column page-layout there is a page-break between two
blocks having attribute span=”all”.

But I think there should not be a page-break, because I use keep-with-next
and keep-with-previous!

 

<block span="all" keep-with-next.within-page=”always”> and

<block span="all" keep-with-previous.with-page=”always>” doesnt work for

 

Where is the problem or where is my misunderstandig?

 

(attached is FO-file and PDF-file)

 

 

Friedrich Kirch
Softwareentwicklung Media Business Suite

[ IT2media ]

Tel.:

 +49 911 30 730-0

FAX:

 +49 911 30 730-625

Mail:

  <mailto:friedrich.kirch@it2media.de> friedrich.kirch@it2media.de

Homepage:

  <http://www.it2media.de> www.it2media.de

  _____

IT2media GmbH & Co. KG, Pretzfelder Str. 15, D-90425 Nürnberg;
Kommanditgesellschaft, Sitz Nürnberg, HRA Nürnberg 12784, Persönlich
haftende Gesellschafterin: IT2media Beteiligungsgesellschaft mbH, Sitz
Nürnberg, HRB Nürnberg 19511; Geschäftsführer: Dr. Gerhard Baier, Claudia
Dietrich

 

**********************************************************************

Diese E-Mail wurde auf Viren ueberprueft.

mailsweeper@it2media.de

**********************************************************************

-------------------
(*) 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

image001.jpg
Received on Fri Aug 28 09:17:35 2009

This archive was generated by hypermail 2.1.8 : Fri Aug 28 2009 - 09:17:41 PDT