Setting ErrorListener has no effect
Added by Anonymous over 19 years ago
Legacy ID: #3205671 Legacy Poster: James Michael Wright (jimwrightbe)
Hi, I am coming to the conclusion that setting an ErrorListener of my own on a Transformer has no effect if it is a Saxon 7.8 IdentifyTransformer (and quite possibly any other Saxon transformer). In order to control errors, I probably have to set the ErrorListener on the TransformerFactory. Is this a bug or a feature, or am I wrong about this? I have been looking at the sourcecode but not enough that I can walk you through it ;-) Well, actually you need to look at net.sf.saxon.Controller. Jim
Replies (3)
Please register to reply
RE: Setting ErrorListener has no effect - Added by Anonymous over 19 years ago
Legacy ID: #3205858 Legacy Poster: Michael Kay (mhkay)
Sorry, but it's now over 18 months since 7.8 was released and there have been another 6 releases since, so you can probably investigate this as easily as I can. I'd be surprised if you're right, though. Michael Kay
RE: Setting ErrorListener has no effect - Added by Anonymous over 19 years ago
Legacy ID: #3208172 Legacy Poster: James Michael Wright (jimwrightbe)
Thanks. That was enough info. I appear to have confirmed that what I thought is true in 7.8 but not in b8-4. I worked around my problem with 7.8 by setting the error listener in a TransformerFactory. Calling 7.8 Controller.setErrorListener() does not change the error listener in the configuration which is used for most purposes. Jim Wright
RE: Setting ErrorListener has no effect - Added by Anonymous over 19 years ago
Legacy ID: #3208223 Legacy Poster: Michael Kay (mhkay)
Thanks for jogging my memory. The bug was that many dynamic errors were being reported to the TransformerFactory's error listener rather than to the Transformer's error listener. This was fixed a while ago and should be OK in recent releases. Michael Kay
Please register to reply