Adjusting Images Rows and Columns using XSLT
hi,
i have an xml with the following structure
<?xml version="1.0"?>
<WorkItems>
<WorkItem WorkItemType="Bug">
<Graphs>
<Graph Width="400">Graph1</Graph>
</Graphs>
<Graphs>
<Graph Width="600">Graph2</Graph>
</Graphs>
<Graphs>
<Graph Width="400">Graph3</Graph>
</Graphs>
<Graphs>
<Graph Width="800">Graph4</Graph>
</Graphs>
<Graphs>
<Graph Width="400">Graph4</Graph>
</Graphs>
</WorkItem>
</WorkItems>
The problem is
I want to construct a table with max two columns and the width of the table should not be beyond 1000px. from the above xml if the sum of the widths of two adjust Graphs <=1000px then they should be displayed in the same row. or else they should be displayed in different rows . can anyone help me in constructing the required xslt template.
For Example1
if i have the following images with width as a follows
400,600,400,900,400,500.
then the table should be like
400,600 -1st row with 2 columns
400 - 2nd row with 1 column
900 - 3nd row with 1 column
400,500 - 2nd row with 2 column
Example2 (500,400,400,400)
output :
500,400
400,400.
|