Subject: [xsl] Saxon unix script command line not finding stylesheet even though it exists From: "Catherine Wilbur cwilbur@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 13 Nov 2014 21:50:57 -0000 |
What would cause the following error to occur Stylesheet file -xsl:/usr/local/finesrv/erp/jdedwardsoneworld/cron/ LibrXML2CSV_stylesheet.xsl does not exist when I call the Saxon processor. The stylesheet file actually exists in the directory specified. Is it because I have not done the following to my stylesheet as specified on listserv yesterday? $ chmod ugo+x LibrXML2CSV_stylesheet.xsl Code I put in my Unix Script # # Set up data file directories # ===================================== FinesrvCronDir=/usr/local/finesrv/erp/jdedwardsoneworld/cron FinesrvDataDir=/usr/local/finesrv/erp/jdedwardsoneworld/FABS/DATA/LibrVouch FinesrvJavaDir=/usr/java5/bin FinesrvSaxonDir=/usr/local/finesrv/erp/jdedwardsoneworld/cron/Saxon # # 5) Convert Library A/P Interface file from XML to CSV # If the file exists then convert XML file to a CSV file # ================================================================== if [ -s $FinesrvDataDir/Library_Invoice_Interface.xml ] then # # Initialize Java Environment # Change the directory to execute the Java SAXON-HE XSL Processor to convert XML file to CSV # ================================================================== cd $FinesrvJavaDir #. /usr/java5/bin/xxxx??? # Saxon-HE (home edition) is an open source version of processor written in Java. # Saxon XSL processor will execute the stylesheet # The stylesheet specifies the specific rules as to how the XML file is to be converted. # This command below is used to call the Saxon processor # # java -jar:/classpath/saxon9he.jar -s:/classpath/InputFile.xml -xsl:/classpath/stylesheet.xsl -o:/classpath/OutputFile.csv # ================================================================== java -cp $FinesrvSaxonDir/saxon9he.jar net.sf.saxon.Transform \ -xsl:$FinesrvCronDir/LibrXML2CSV_stylesheet.xsl -s:$FinesrvDataDir/Library_Invoice_Interface.xml -o:$FinesrvDataDir/Library_Invoice_Interface.csv # # 6) Remove XML Library A/P Interface file # Remove XML file once it is converted # ===================================== #rm $FinesrvDataDir/Library_Invoice_Interface.xml fi _____________________________________________________________________ Catherine Wilbur | Senior Application Programmer | IT Services 401 Sunset Avenue, Windsor ON Canada N9B 3P4 (T) 519.253.3000 Ext. 2745 | (F) 519.973.7083 | (E) cwilbur@xxxxxxxxxxx www.uwindsor.ca/its
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] [ANN] Reminder: XML Prague 20, Jirka Kosek jirka@xx | Thread | Re: [xsl] Saxon unix script command, Liam R E Quin liam@x |
[xsl] [ANN] Reminder: XML Prague 20, Jirka Kosek jirka@xx | Date | Re: [xsl] Saxon unix script command, Liam R E Quin liam@x |
Month |