I'm writing a JAXP/TRAX Java application to drive various XSLT/XSL-FO
transformations. This application has a log window. Everything works
fine except for the messages sent by xsl:message elements in the XSLT
Is there a standard way to intercept them? Or a Saxon way? Or are they
always sent to system.err without any programmatic control?
Thank's for any help,
From: Michael Kay <michael.kay@nt...> - 2001-12-10 09:46:25
There's no standard way of doing this in JAXP, but Saxon provides a
If you merely want to change the file to which messages are written:
If you want to change the way in which messages are serialized, or intercept
them under program control:
where newEmitter implements the com.icl.saxon.output.Emitter interface.
The standard (default) message emitter is in
com.icl.saxon.output.MessageEmitter; it is identical to the XMLEmitter used
for method="xml" output, except that it outputs a newline at the end of each
> -----Original Message-----
> From: saxon-help-admin@...
> [mailto:saxon-help-admin@...]On Behalf Of Martin
> Sent: 10 December 2001 09:25
> To: saxon-help@...
> Subject: [saxon] Collecting xsl:message?
> I'm writing a JAXP/TRAX Java application to drive various XSLT/XSL-FO
> transformations. This application has a log window. Everything works
> fine except for the messages sent by xsl:message elements in the XSLT
> style sheets.
> Is there a standard way to intercept them? Or a Saxon way? Or are they
> always sent to system.err without any programmatic control?
> Thank's for any help,
> Martin Sévigny
> saxon-help mailing list
Michael and others,
> There's no standard way of doing this in JAXP, but Saxon provides a
OK, thank's for the tip. Since My application knows which processor is
being used, I will manage it this way for Saxon. I'll look for a similar
approach for Xalan and others will be directed to standard error.
May be an interesting addition to TRAX? We can control error handling,
and naively I had thought we could handle xsl:messages as well.