xsl-list
[Top] [All Lists]

Re: [xsl] csv data to xml

2013-06-25 09:29:34
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>