Alex wrote:
> Hi everyone. My problem is essentially financial. Here it is:
>
> I need to create XSLT to transform XML data into CSV ...
i just did somethign like this except it went csv->xml>->xml->csv.
generating the csv is pretty straigtforward (see below) (just google for
xslt and csv).
for the csvparser, i used ostermillerutils_1_02_21.jar from
http://ostermiller.org/ as it claims to eat both standard csv and excel csv.
hth
<?xml version="1.0" encoding="UTF-8"?>
<?xmlspysamplexml
U:\projects\tender\tender2\com\ediidea\tender\test Files\martinsExcelSample1Out.xml?>
<xsl:stylesheet version="1.0"
xmlns

sl="http://www.w3.org/1999/XSL/Transform">
<xsl

utput method="text"/>
<xsl:strip-space elements="*"/>
<xsl

aram name="name1"/>
<!-- not used, but may ne usefule later -->
<xsl:template match="outputDocument/header">
<xsl:apply-templates select="*">
<xsl:sort select="@icn"/>
</xsl:apply-templates>
<!--xsl:text>
</xsl:text-->
</xsl:template>
<xsl:template match="outputDocument/header/*">
<!--
<xsl:value-of select="."/>
<xsl:if test="position() != last()">,</xsl:if>
-->
</xsl:template>
<xsl:template match="outputDocument/csvHeader">
<xsl:value-of select="."/>
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="outputDocument/row">
<xsl:apply-templates/>
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="outputDocument/row/*">
<xsl:value-of select="."/>
<xsl:if test="position() != last()">,</xsl:if>
</xsl:template>
</xsl:stylesheet>
---
ray tayek
http://tayek.com/ actively seeking mentoring or telecommuting work
vice chair orange county java users group
http://www.ocjug.org/
hate spam?
http://samspade.org/ssw/