Jump to content

Dynamic Table


Guest StrugglesEveryDay

Recommended Posts

Guest StrugglesEveryDay
Posted

First of all I started teaching myself XML/XSLT this past Saturday and maybe I bit off more than I should have....I've tried many times many different ways but I cannot seem to build a table dynamically.<house><color> red</color> <color>blue</color><color>yellow</color><color>brown</color><color>green</color><color>blue</color><color>brown</color><house>The list goes on to about 20 colors. What I want to do is build a four column table. If/when I add more items I'll want to simply add the item anywhere in the list and the xslt will add the item. I'd want each column to be five rows until I add an item to which the first column would be six rows and if I add another the first two columns will be six and so on.Is there a way to do this?

Posted

Sounds like question 5 from the XSLT FAQ to me.And if I understand you correctly, you need a 5 columed table of that sort. If you have 5 <color> elements or less, you'll have them in one row (the first being on the far left, and the fifth being on the far right). The next 5 will be on a second row (in the same fashion), etc.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...