|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Formatting XSL for XML to CSV translation
Dear xsl-list
I am new to XSL and have been playing for a few days, using for my education the web (brilliant tool that it is). I want to use XSL to transform an XML document (generated by the ADODataSet.SaveToFile() method) into CSV format. All pretty straightforward for a novice, and I've achieved what I'm after - but I have an aesthetic question.
For readability I would prefer the XSL file to look nicely nested like this:
<xsl:variable name="new_line" select="'
'"/>
<xsl:template match="/">
<xsl:for-each select="xml/rs:data/z:row">
<xsl:value-of select="@field1"/>,
<xsl:value-of select="@field2"/>,
...
<xsl:value-of select="@fieldn"/>
<xsl:value-of select="$new_line"/>
</xsl:for-each>
</xsl:template>
Unfortunately, this means that each value ends up on its own line. Placing each element in one long line in the XSL solves the problem but is hard to read (to say the least).
Any ideas?
Thanks
Stuart
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








