[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XSL:FO approach for facing-page translation

Subject: Re: [xsl] XSL:FO approach for facing-page translation
From: "Tony Graham" <tgraham@xxxxxxxxxx>
Date: Fri, 7 Feb 2014 21:52:34 -0000 (GMT)

On Fri, February 7, 2014 9:41 pm, Martin Holmes wrote:
> On 14-02-07 12:57 PM, Tony Graham wrote:
>> On Fri, February 7, 2014 6:43 pm, Martin Holmes wrote:
>>> goes to the XSL:FO stage., Perhaps there are ways to measure (for
>>> instance) how much space a paragraph will take, and then adjust
>>> page-margins or spacing by small increments to preserve alignment
>>> between the two texts, but I haven't seen examples of such an approach.
>> See my Balisage 2013 talk, 'Decision making in XSL-FO formatting' [1].
> I've just been looking at it -- very intriguing.

Thank you.

>> The Print and Page Layout Community Group @ W3C [3] has an extension
>> function for use with Saxon or Xalan and either FOP or Antenna House
>> that
>> runs the XSL-FO formatter within the XSLT transform so you can make
>> decisions based on formatted sizes as you go.  That would give you the
>> flexibility to format each paragraph pair in turn to work out their
>> sizes,
>> which could make things simpler or harder, depending on how you approach
>> it.
> This does seem very promising, but the rest of the web application I'm
> working with is dependent on XEP, and I don't think FOP yet supports
> some of the features I'm depending on XEP for (although it's a good
> while since I've done a detailed test of this). I have no funding to buy
> into the AH Formatter (and the price is frankly jaw-dropping for an
> academic user) so it would have to be FOP.

You are more than welcome to reimplement it for RenderX.

> I'm beginning to wonder about a far cruder approach: render both
> languages and see which is longer, then implement hard page-breaks in
> both versions at the point the longer one would break. Then run XSLT to
> interleave the two versions to create a continuous document. Very
> fragile, of course, and likely to require a lot of tinkering, but it
> would work.

Alternatively, you can do the two-pass approach with RenderX and its
intermediate format [1].


Tony Graham                                         tgraham@xxxxxxxxxx
Consultant                                       http://www.mentea.net
Chair, Print and Page Layout Community Group @ W3C    XML Guild member
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
Mentea       XML, XSL-FO and XSLT consulting, training and programming

[1] http://www.renderx.com/reference.html#IntermediateFormatSpecification

Current Thread