How does proportional-column-width work in xsl fo

How does proportional-column-width work? In the below example, what would 1 or 3.5 or 2 mean? Should these total to 10 which would make it 100%? or should I be specifying percentages instead?

<fo:table-column column-width="proportional-column-width(1)"/>
						<fo:table-column column-width="proportional-column-width(3.5)"/>
						<fo:table-column column-width="proportional-column-width(.8)"/>
						<fo:table-column column-width="proportional-column-width(2)"/>
						<fo:table-column column-width="proportional-column-width(1)"/>
						<fo:table-column column-width="proportional-column-width(2)"/>
						<fo:table-column column-width="proportional-column-width(1.5)"/>

Open in new window

LVL 1
ank5Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert BormansInformation ArchitectCommented:
It is "proportional" compared to the other columns
the fourth column will have twice the width of the fifth column
as 2 to 1 in the proportional width

basically you can add all the proportional widths together, divide 100 by that total and for each column multiply by the proportional width value to get the % width
0
ank5Author Commented:
Is it possible to simply specify %?
0
Geert BormansInformation ArchitectCommented:
yes as width on the column
0
Geert BormansInformation ArchitectCommented:
In fact is the proportional-column-width(3.5) a transformation convenience
It is an easy way to put in whatever value you find in the XML you want to transform into FO
and let the FO processor sort the sizes out
If you need to do complex calculations to get to the proportional width, you would be doing the wrong thing

note
<fo:table-column column-width="proportional-column-width(30)"/>
<fo:table-column column-width="proportional-column-width(40)"/>
<fo:table-column column-width="proportional-column-width(30)"/>

Open in new window


would render exactly the same as
<fo:table-column column-width="30%"/>
<fo:table-column column-width="40%"/>
<fo:table-column column-width="30%"/>

Open in new window


The only difference is that with the first you don't  need to worry about the numbers adding up to 100, and in the second example you do need to worry...
I use proportional-width a lot for that reason
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XSL

From novice to tech pro — start learning today.