[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: CSV to XML transformation XSLT to include special

Subject: Re: CSV to XML transformation XSLT to include special characters?
From: Marney Cotterill <marney@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 04 Apr 2008 10:11:29 +1100
Re:  CSV to XML transformation XSLT to include special
Hi Michael,

Thanks for the alternative, but for now I want to stick with XSLT as I need
to run a second transform on the XML produced from the CSV transform to
create a specially formatted XML file that I can import into a module on a
clients dynamic website.

I have step-by-step instructions on how to do the second bit, so as I am
brand new to the world of programming (no Perl knowledge unfortunatley) I
will stick with what I have.

Thanks again,
Marney 


On 4/4/08 1:09 AM, "Michael Ludwig" <mlu@xxxxxxxxxxxxx> wrote:

> Marney Cotterill schrieb:
>> Hi Listers,
>> 
>> I have modified an XSLT orgignally developed by Andrew Welch to
>> transform a CSV to an XML for importing data into a dynamic website. I
>> am brand new to XSL and XSLT and have hit a small snag with the
>> transform.
> 
> Maybe XSL is not the best tool for this job. I'd use a general-purpose
> programming language like Perl to process CSV to generate XML. Perl has
> modules designed to deal with practically everything, including CSV. I
> think this would be much easier, while at the same time taking the
> discussion off-topic.
> 
> Well, you could then process the resulting XML in XSL to tailor it to
> your needs, and that would bring the discussion back on topic. The
> result would look something like this:
> 
> <File>
>    <Row>
>      <Col>30358201</Col>
>      <Col>Das VIERTE</Col>
>      <Col>2008-04-06</Col>
>    </Row>
>    <Row>
>      <Col>30376055</Col>
>      <Col>n-tv</Col>
>      <Col>2008-04-05</Col>
>    </Row>
>    <Row>
>      <Col>30332822</Col>
>      <Col>Premiere Krimi</Col>
>      <Col>2008-04-05</Col>
>    </Row>
> </File>
> 
> This could then easily be processed using XSL.
> 
> If you can handle Perl, I can mail you a script to do the job.
> 
>> I've done some testing and I think it comes down to the inclusion of
>> special characters in my CSV, which essentially breaks the transform,
>> giving a blank result - it does not even display the error messege.
> 
> This problem would be dealt with - unless your CSV data is invalid.
> 
> Michael
> 
> 

Marney Cotterill
graphic designer
                   
cracker//brandware

6 Bourke Street
Queens Park 
NSW 2022
Telephone 02 9387 2001
Facsimile 02 9387 2006
marney@xxxxxxxxxxxxxxxxxxxx
www.crackerbrandware.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.