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

Re: Decimal alignment using fo:leader

Subject: Re: Decimal alignment using fo:leader
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 23 Aug 2007 18:42:25 +0200
Re:  Decimal alignment using fo:leader
Angela Williams wrote:

Although, I could if that is the only other alternative... In that case,
I think I would need to calculate the width of the decimal part column
to limit it to the actual width of the decimal value with the highest
precision and the largest font size. Otherwise, I might still have an
issue fudging right alignment? Both columns would need to fit within
the defined column width for the original single column... Or am I
making it too complicated?

I think so, yes, too complicated. But here's more If you want the "best" solution, you can augment your current solution with a rendered-string-size calculator function. You probably only want to do that in XSLT 2.0. You should apply it to a second phase (i.e., the xsl-fo output you already have) and as ingredients for a success story, you need to have the glyph XML files of each font you can use (Apache provides a fine tool for getting the glyphs dimensions as XML). The rest is fairly easy: just calculate the length based on the width you find for each letter in the glyphs file (granted, you are almost creating a font rendering engine). (if you want a solid solution and don't want to do this yourself, I'm happy to help you with some professional services).


The question you should ask yourself: is this cosmetic change really worth all the trouble? The other question you should ask is: how easy is it to create an extension function for XEP and use that instead? Or to call them and to demand this feature?

I'm really hoping that I am close in my current solution and someone
with advanced xsl-fo skills will see some tiny detail I am overlooking
in the alignment. :-)

Your best bet is a processor that supports XSL-FO 1.0 better. Unfortunately, the only processor that seems to support text-align="somestring" is PassiveTeX and that one really does a bad job on many other things so cannot currently be considered a good alternative for XEP: http://www.diderottrack.nl/en/article/xslfo.en-se14.xml


You can call RenderX and ask for this feature.... ;)

Cheers,
-- Abel Braaksma

PS: I too am hoping that somebody proofs me wrong and says that there's an easier solution here....G. Ken Holman? ;)

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.