RE: [xsl] <xsl:message terminate="yes"> results in zero byte file getting written

Subject: RE: [xsl] <xsl:message terminate="yes"> results in zero byte file getting written
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 29 Mar 2007 20:12:11 +0100
> I am also facing similar kind of issue ,during transfor if I 
> have xsl:message with terminate=yes and it is redirected to 
> System.err and It does not fall as Exception

In Saxon, by default, if you don't specify a MessageReceiver and don't do
anything to change the behaviour of the standard one, then <xsl:message
terminate="yes">ABANDON SHIP</xsl:message> should result in the text
"ABANDON SHIP" being written to System.err, and to an exception of class
net.sf.saxon.trans.TerminationException being thrown, with the exception
message

"Processing terminated by xsl:message at line NNN in URI.xsl"

If you are running from the command line, the application will terminate
with exit code 1.

If you want to capture the message text in your application, you need to
call setMessageEmitter() to supply your own code to receive xsl:message
notifications.

Michael Kay
http://www.saxonica.com/

Current Thread