Re: [xsl] How do I set up my Saxon call to update/pass back a log file

Subject: Re: [xsl] How do I set up my Saxon call to update/pass back a log file
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Mar 2015 20:38:42 -0000
Catherine, I'm afraid my skills in shell scripting are about as minimal as
your skills in Java programming, so I can't help you much.

Michael Kay
Saxonica
mike@xxxxxxxxxxxx
+44 (0) 118 946 5893




On 16 Mar 2015, at 13:47, Catherine Wilbur cwilbur@xxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Michael Kay (you indicated the following)
>
> Can you define "does not work properly"? Is it synonymous with "fails with a
dynamic error?
>
> Saxon does pass a simple return code back to the shell when a static or
dynamic error occurs, and of course it does allow you to redirect standard
error output to a file.
>
> But I'm afraid if I were attempting something like this, I wouldn't put the
logic in a shell script, I would put it in a Java application. Your mileage
may vary.
>
>
> From the following call
>
>     /usr/java5/bin/java -cp $SAXON_JAR net.sf.saxon.Transform
-s:$FinesrvDataDir/Library_Invoice_Interface.xml
-xsl:$FinesrvCronDir/LibrXML2CSV_stylesheet.xsl
-o:$FinesrvDataDir/Library_Invoice_Interface.csv
>
> Would like to pass an error back to my shell script.  The error would be
because we did not code something properly or the fact we made an assumption
regarding the XML file and now that section that was supposed to appear at
least once does not exist (that is what happened).  We submit all of our
production using cron jobs using shell scripts so they want me to trap the
error in my shell script and send a message out to the individuals that need
to look at fixing the problem.  I would not even know how to set up a Java
application to set this up.  Have written Java code for batch programs but I
am just a novice in this area.  Would be very interested in learning how to
set it up in a Java application.
>
> So was wondering how to set up the Saxon call so I can pass a log file back
and a return code.    If an error appears then I need to send out a msg.
Searched the web for the options available from net.sf.saxon call.
> _____________________________________________________________________
> 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
> XSL-List info and archive
> EasyUnsubscribe (by email)

Current Thread