From: Michael Clark <MClark@sa...> - 2003-06-30 07:24:54
Michael Clark wrote:
>I'm using Saxon 7.6 with the TraX TransformerFactory and Transformer
>If the source document has XML syntax errors, they get reported to
>System.err. I would really like to have control over error
>reporting, as my resulting program should be reporting problems into
>a log file, not stderr!
As usual, I'm eating humble pie. The answer was staring me in the
face. From the j2sdk 1.4 javax.xml.transform documentation:
The error listener may be set via
for reporting errors that have to do with syntax errors in the
transformation instructions, or via
to report errors that occur during the transformation.
So to receive syntax errors, register a listener with a
TransformerFactory instance. To receive runtime transformation
errors, register a handler with the Transformer instance
Works like a charm (yay saxon).
Get latest updates about Open Source Projects, Conferences and News.