[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL:FO approach for facing-page translation

Subject: Re: XSL:FO approach for facing-page translation
From: Eliot Kimber <ekimber@xxxxxxxxxx>
Date: Fri, 7 Feb 2014 13:27:04 -0600
Re:  XSL:FO approach for facing-page translation
The only way I can think of to do this would be a multi-pass process that
operates on the intermediate area tree. If you emitted both language
streams as separate flows, one for verso pages and one for recto pages,
where you included IDs on blocks to allow you to correlate the two
language versions, you could then examine the area tree to see for each
pair which was deeper and set the vertical extent of the corresponding
block to match. Re-rendering the two flows should then result in them
being properly synchronized.

See Tony Graham's paper from last year's Balisage for implementation
guidance:
http://www.balisage.net/Proceedings/vol10/html/Graham01/BalisageVol10-Graha
m01.html

Cheers,

Eliot
--
Eliot Kimber
Senior Solutions Architect
+ACI-Bringing Strategy, Content, and Technology Together+ACI-
Main: 512.554.9368
www.reallysi.com
www.rsuitecms.com




On 2/7/14, 12:43 PM, +ACI-Martin Holmes+ACI- +ADw-mholmes+AEA-uvic.ca+AD4-
wrote:

+AD4-Hi all,
+AD4-
+AD4-I have an interesting problem to solve with an edition of a source text
+AD4-which has an accompanying translation.
+AD4-
+AD4-The text is in paragraphs, with each paragraph in the original matching
+AD4-one in the translation. In XHTML, I'm easily able to render the two
+AD4-texts in a borderless table, with a row for each paragraph, giving a
+AD4-nice readable parallel-text view.
+AD4-
+AD4-I need to do something similar in PDF, using XSL:FO. The ideal would be
+AD4-to have the original text on the verso page, with the equivalent
+AD4-translation on the facing recto. But I can't figure out a practical
+AD4-approach to this. For one thing, I don't see how I can render individual
+AD4-pages from one text and then the other text in alternating fashion, and
+AD4-for another, I don't see any way to keep the two texts in sync. I can
+AD4-disallow page-breaks within paragraphs, but I'd have to be
+AD4-extraordinarily lucky for the two texts to end up breaking at the same
+AD4-points every time+ADs- it would just take one slightly-shorter paragraph
on
+AD4-one side to put them out of sync by a paragraph. Such a strategy would
+AD4-also be rather a paper-waster, because many pages would have a lot of
+AD4-blank space at the bottom.
+AD4-
+AD4-Has anyone every done anything like this, and if so, do you have any
+AD4-advice? I can imagine that it might be done in a horribly manual fashion
+AD4-by trial and error, working page-by-page, but I really don't want to get
+AD4-into that. I'm happy to pre-process the text multiple times before it
+AD4-goes to the XSL:FO stage., Perhaps there are ways to measure (for
+AD4-instance) how much space a paragraph will take, and then adjust
+AD4-page-margins or spacing by small increments to preserve alignment
+AD4-between the two texts, but I haven't seen examples of such an approach.
+AD4-
+AD4-All advice much appreciated.
+AD4-
+AD4-Cheers,
+AD4-Martin
+AD4-
+AD4-
+AD4---+AH4------------------------------------------------------------------
-
+AD4-XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
+AD4-To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
+AD4-or e-mail:
+ADw-mailto:xsl-list-unsubscribe+AEA-lists.mulberrytech.com+AD4-
+AD4---+AH4---
+AD4-

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.