This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

loop in creation of table


hi all ,
i have an xml document  with  elements like this- <subsystem_id>
value1</subsystem_id>.

<subsystem_id> value2</subsystem_id>.

<subsystem_id> value3</subsystem_id>.    etc .
now i have to design a table like the one shown BELOW..  we have total of 16
columns and 4 rows. the values indicated in the table(value 1/2/3 etc) are
the values of <subsystem_id>.
Now there can be a maximum of 64 .<subsystem_id> values and minimum can be
0ne or two ....upto 64. i.e , it varies from document to document. This
document has other elements also. The documents vary only in <subsystem_id>
elements. i want to prepare a generic xsl stylesheet which will create  a
table like this every where.


Now the problem is , the values has to be put in such a way that, the 5th
value will come in  column c2 and row R1.
similarly 6th value should come in column  C2   and row  R2.  It goes down
like this till 8 th value  and again the  9th value
will come in column  c3 and row  R1. similarly 10 th value will come in
column C3 and row  R2.  we donot know the no. of values that are going to be
present. so, we cannot place them individually specifying  the corresponding
row and column. Given , VARIABLE  no. of  <subsystem_id>.s which we donot
know
, how do i create a loop for placing them in such a pattren as told above.

                 C1          C2       C3    C4   C5   C6   C7   C8   C9
C10   C11   C12  C13   C14   C15  C16

|---------------------------------------------------------------------------
---------------------
R1     |  value1   value5     value9
R2     |  value2   value6
R3     |  value3
R4     |  value4


i guess u got what i am trying to convey.can anyone suggest a solution
please. I need the code for it. I have tried with position()=1 |
position()=5   code , but it is giving an error in some other part of the
program.

regards,
praveen


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]