xsl-list
[Top] [All Lists]

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

2014-02-07 15:52:48
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].

Regards,


Tony Graham                                         
tgraham(_at_)mentea(_dot_)net
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--