|
next
|
Subject: 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
DCLibrariesMetadataSheet_revised2012-05-30.csv csv_file
|
|
|