I have this xslt to convert a csv to xml, works fine, except the tag is the same for all columns. I need it to increment like this
Although the OP is probably looking for an XSLT 1.0 solution, for interest here is an XSLT 2.0 solution. This solution requires you to download my csv-to-xml library style-sheet from here, which is discussed in this blog entry.
With this as the input document, referred to in the style-sheet with uri 'gangt.csv' (use a parameter or adapt as you require)...
3779490,916705,CS,60,34.89,Sauce/Cholula
5918104,918958,CS,6,20.63,Pasta/Fresh/Cavatelli/6#/Frozen
5064774,920723,CS,10,45.5,Cheese/Oaxaca
3422752,925230,EA,8,69.6,Chipotle/Powder/Ground
5955640,BB171,CS,30,50.7,Butter/Unsalted
5295326,BC110005,CS,6000,54.95,Oil/Olive/Finishing
...this XSLT 2.0 style-sheet...
...produces this output document...
3779490
916705
CS
60
34.89
Sauce/Cholula
5918104
918958
CS
6
20.63
Pasta/Fresh/Cavatelli/6#/Frozen
5064774
920723
CS
10
45.5
Cheese/Oaxaca
3422752
925230
EA
8
69.6
Chipotle/Powder/Ground
5955640
BB171
CS
30
50.7
Butter/Unsalted
5295326
BC110005
CS
6000
54.95
Oil/Olive/Finishing