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

Re: Need Math Help: How to Convert Proportional Column

Subject: Re: Need Math Help: How to Convert Proportional Column Widths to Real Values?
From: "Michael Müller-Hillebrand mmh@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Jan 2016 08:36:36 -0000
Re:  Need Math Help: How to Convert Proportional Column
> Am 06.01.2016 um 15:22 schrieb a kusa:
>
> Thank you for all your input. It gets tricky without the total width.
>
> Michael, just dumb doubt / clarification. For RestRW, is 'Total',
SumRW+SumAW?

No, Total is meant to be the somehow known absolute total width.

- Michael

> On Wed, Dec 30, 2015 at 11:24 AM, Michael MC<ller-Hillebrand
> mmh@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>>> I was looking to do something similar and found this question. In my
>>> case, I don't have the total table column width always. So, if I have
>>> a mixed col width values of 1.38,1.38.1*,1.38, how can I find the real
>>> value for 1*?
>>
>> As Eliot mentioned, some absolute total value is required. Unless you are
e.g. in an FO environment, where 100% can be seen as the current available
width.
>>
>> In a more general way I did it something like this:
>>
>> * Columns without width or just "*" are treated as "1*"
>> * Calculate the sum of all relative widths (SumRW)
>> * Calculate the sum of all absolute widths (SumAW)
>>
>> * Calculate remaining width RestRW := Total - SumAW
>>  - If it is b	$ 0 we have a problem
>>  - Else each remaining column width is ColRW / SumRW multiplied with the
RestRW
>>
>> - Michael

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.