XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Dana PearsonSubject: modifing Andrew Welch's csv 2 xml problem
Author: Dana Pearson
Date: 30 Jun 2013 06:32 PM
Originally Posted: 30 Jun 2013 06:27 PM
I can easily convert a csv file to XML so that I can transform it into something else using the nifty Custom XML Conversion tool.

But my requirement is to create a stylesheet that can be used by the client using a library application that uses Saxon as an embedded processor.

I found a stylesheet created by Andrew Welch that might likely accomplish the required csv to xml transformation but it requires using Saxon from the command line.

So, I deleted a param which provided the path to the csv file and substituted "/" where the param is used in the stylesheet.

I think it might work but I'm getting an error regarding the csv file:

java.lang.RuntimeException: Error: on line 1 column 1 of file:///c:/Users/dbp/DOCUME~1/DBP_ME~1/DELIMI~1/DCLIBR~1.CSV:
SXXP0003: Error reported by XML parser: Content is not allowed in prolog.
at com.exln.stylus.CSaxon8Driver.doProcessing(CSaxon8Driver.java:281)
at com.exln.stylus.CProcessorDriver.process(CProcessorDriver.java:104)
DC Libraries Metadata Sheet_revised2012-05-30.csv (1, 1)
Error: on line 1 column 1 of file:///c:/Users/dbp/DOCUME~1/DBP_ME~1/DELIMI~1/DCLIBR~1.CSV: SXXP0003: Error reported by XML parser: Content is not allowed in prolog.

The csv file was created using OpenOffice.org (original file created with MS Excel)and the first two rows look like this:

"control_number","isbn", [...],"titlewithprefix", [...]
,9781615950010,,,,"The Fisher Boy", [...]

the ellipses mark out empty "cells", ie, no title variations before titlewithprefix (The Fisher Boy) the remainder of the rows; there is also no contol_number content in any of the rows.

So, at this point, I can't try out this modification on the stylesheet.

Can anyone suggest what I might try or better understand about modifying Welch's stylesheet.

Attaching the csv; was going to attach the original stylesheet and my modified version but upload did not seem to be working although the csv appears to attached.

thanks,
dana pearson


UnknownDCLibrariesMetadataSheet_revised2012-05-30.csv
csv_file

Postnext
Ivan PedruzziSubject: modifing Andrew Welch's csv 2 xml problem
Author: Ivan Pedruzzi
Date: 01 Jul 2013 02:09 PM
Hi Dana,

This is not specific to Stylus Studio, but we will try to help you.
Could you post the XSLT as attachment?

Also keep in mind that XML Converters scales and performs better then a pure XSLT solution, thanks to its streaming architecture.


Ivan Pedruzzi
Stylus Studio Team

Postnext
Dana PearsonSubject: modifing Andrew Welch's csv 2 xml problem
Author: Dana Pearson
Date: 01 Jul 2013 03:31 PM
thanks for having a look, I'll try to attach Welch's original and my modified version

dana

Postnext
Dana PearsonSubject: modifing Andrew Welch's csv 2 xml problem
Author: Dana Pearson
Date: 01 Jul 2013 03:39 PM
thanks Ivan but the upload fails...could I send it to you another way?
also, is the csv file attached to my original message? I was getting was getting something similar when I tried to attach last night. Now I'm getting a fail message that I see behind the upload window and the upload does not finish.

dana

Posttop
Ivan PedruzziSubject: modifing Andrew Welch's csv 2 xml problem
Author: Ivan Pedruzzi
Date: 01 Jul 2013 06:09 PM
Zip your files an send them to stylussupport@ivitechnologies.com

Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.