[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] csv data to xml


Subject: Re: [xsl] csv data to xml
From: Louis-Dominique Dubeau <ldd@xxxxxxxxxxxx>
Date: Tue, 25 Jun 2013 10:29:26 -0400

On Tue, 2013-06-25 at 14:31 +0100, Michael Kay wrote:
> On 25 Jun 2013, at 14:01, Louis-Dominique Dubeau wrote:
> 
> > On Tue, 2013-06-25 at 13:46 +0100, henry human wrote:
> >> How get this csv data to xml using xslt:
> > 
> > [.. snip ...]
> > 
> > Based on what you say in your post about your problem, I would not use
> > XSLT for this. I'd use python, perl, sed, awk or something similar 
> 
> Why?

I've written complex XSLT 1 and 2 stylesheets, mainly to process files
encoded using TEI. I would not dream of using anything else than XSLT
for these files. But I've also done conversion of the type Henry
mentioned dozens of times. In my experience it is simpler to avoid XSLT
for *this* kind of conversion.

> I saw a post on StackOverflow yesterday from someone making the same
> recommendation; he supplied the Python code, and it output the XML
> without bothering to escape special characters. No wonder we see such
> a lot of bad XML when people try to process it without using the
> proper tools.

Two comments here:

1. Bad answers are a dime a dozen on StackOverflow. They reflect only on
their own authors.

2. The proper tool is the one which will get the correct result at the
lowest cost.

Louis


Current Thread
Keywords