ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: csv to html via xslt or xslt2 task ?
Date Fri, 07 Mar 2008 06:10:53 GMT
XSLT needs XML as input - so CSV wouldnt work.
If you want to use XSLT you need the step of converting csv to xml before.

Smallest way would use <script>:
- write html header
- iterate over the textfile line by line
  -- split the line by ","
  -- write the data line
- write html footer

Mmh ... maybe AntContrib:for could iterate over textfiles - I dont know.


Jan


> -----Ursprüngliche Nachricht-----
> Von: Z W [mailto:mpc8250@gmail.com] 
> Gesendet: Freitag, 7. März 2008 00:17
> An: Ant Users List
> Betreff: csv to html via xslt or xslt2 task ?
> 
> Hi ppl,
> 
> I have a few rows of comma delimited csv file.
> 
> 
> 1204823515990,2091,Cl,200,OK,M,text,true
> 
> 1204823518623,828,Su,200,OK,M,text,true
> 
> 1204823519500,66,Se,200,OK,M,text,true
> 
> 1204823519604,42,Se,OK,M,text,true
> 
> and I like to transform it into html with xslt or xslt2.  Is 
> that possible ?
> 
> Could someone provide a simple example to manipulate 2 field 
> in a stylesheet
> ? I'm new to this hence
> 
> such a question.
> 
> Thanks
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message