xsl-list
[Top] [All Lists]

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

2015-03-16 08:46:55
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(_at_)uwindsor(_dot_)ca
www.uwindsor.ca/its
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>