Subject: Re: [xsl] How to generate multiple rows based on sub element From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Thu, 24 Sep 2009 17:20:57 +0200 |
We are using XSLT 1.0 and have to map XML to a CSV file, the input looks like this <Message> <Work>Contract</Work> <Timesheet>Approved</Timesheet> <Days> <Mon>8</Mon> <Tues>7</Tues> <Fri>9</Fri> </Days> </Message> In the output depending on the days worked we need to generate multiple rows. ie the XSLT logic for all other fields will remain the same (Work, Timesheet etc), the logic will change only for field 'Days'...any inputs on how to accomplish this in XSLT
Expected Output: ------------------------- Work, Timesheet, Days, Hours Contract, Approved, Mon, 8 Contract, Approved, Tues, 7 Contract, Approved, Fri, 9
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="sep" select="', '"/> <xsl:param name="lf" select="' '"/>
</xsl:stylesheet> --
Martin Honnen http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] How to generate multiple rows, abhilash k | Thread | [xsl] Use of xsl:apply-templates ex, srinivasan.p |
[xsl] How to generate multiple rows, abhilash k | Date | RE: [xsl] Namespace problem, Trevor Nicholls |
Month |