xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Madunic" <Mario_Madu...@newflyer.com>
Subject RE: How to balance table columns?
Date Wed, 10 Feb 2010 12:49:44 GMT
You might want to post this up on the XSLT list.

So here is how I would do it

First is create a temp node variable containing all the left and right strings as child of
the var. Get a count of the child nodes (left and right) divide by two (round up or down your
choice) then create the table and copy-of/apply-templates to child::*[position() lt half +
1] and for the right side child::*[position() gt half] in the left and right table cells accordingly.
Now that is not exact without testing and is only an outline but I hope it give you a general
idea of how it might be done.

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

-----Original Message-----
From: lexa2009 [mailto:myworkacc01@gmail.com] 
Sent: Wednesday, February 10, 2010 5:59 AM
To: fop-users@xmlgraphics.apache.org
Subject: How to balance table columns?


Hello!
for example i have a simple table with 2 columns. like this:

leftstring1  rightstring1
leftstring2  rightstring2
leftstring3  rightstring3
leftstring4  rightstring4
leftstring5
leftstring6

i do not know how many of each string will be, but i want this table

leftstring1  leftstring6
leftstring2  rightstring1
leftstring3  rightstring2
leftstring4  rightstring3
leftstring5  rightstring4

how to balance columns? how to make table of smallest height?
-- 
View this message in context: http://old.nabble.com/How-to-balance-table-columns--tp27530072p27530072.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all information or material transmitted
with this communication) is confidential, may be privileged and is intended only for the use
of the intended recipient. If you are not the intended recipient, any review, retransmission,
circulation, distribution, reproduction, conversion to hard copy, copying or other use of
this communication, information or material is strictly prohibited and may be illegal. If
you received this communication in error or if it is forwarded to you without the express
authorization of New Flyer, please notify us immediately by telephone or by return email and
permanently delete the communication, information and material from any computer, disk drive,
diskette or other storage device or media. Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message