Subject: dynamic HTML table generation From: Ireney Berezniak <iberezniak@xxxxxxx> Date: 5 Oct 00 13:18:01 MDT |
Hi, I have a problem and so far I have been unsuccessful finding a solution. Any help you guys could provide would be greatly appreciated. I need to format and create an HTML result set table dynamically. For example, in one instance I have a resultset in XML that contains 10 records. I need to have an XSL file which generates a table with 2 rows and 5 columns. In another instance, I might have a resultset that contains 20 records, and I need to present it in a 5 row by 4 column table using the same XSL file. I really want to do this dynamically. I can pass the desired row and column count into XSLT file so I know how many rows and columns I need to create, but how do I do the looping to achieve this? Thanks! ib. xml sample: <rs:data> <z:row Product_Id="98652"/> <z:row Product_Id="98682"/> <z:row Product_Id="98718"/> <z:row Product_Id="104512"/> <z:row Product_Id="106564"/> <z:row Product_Id="174272"/> <z:row Product_Id="175242"/> <z:row Product_Id="191765"/> <z:row Product_Id="194131"/> <z:row Product_Id="194132"/> </rs:data> desired HTML table to be generated dynamically: <TABLE> <TR> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> </TR> <TR> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> </TR> </TABLE> or (depending on the rows/columns required) <TABLE> <TR> <TD></TD> <TD></TD> </TR> <TR> <TD></TD> <TD></TD> </TR> <TR> <TD></TD> <TD></TD> </TR> <TR> <TD></TD> <TD></TD> </TR> <TR> <TD></TD> <TD></TD> </TR> </TABLE> ____________________________________________________________________ Get free email and a permanent address at http://www.amexmail.com/?A=1 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: XSLT and Default namespaces, Kay Michael | Thread | RE: dynamic HTML table generation, Kay Michael |
Re: <xsl:stylesheet xmlns:xsl=" ???, John E. Simpson | Date | Re: XSL: Attribute to Element, Alexey Gokhberg |
Month |