|
Re: [saxon - Help] RE: Setting ErrorListener has no effect: msg#00122text.xml.saxon.help
Oh. I still use Saxon 7.8 despite all the chatter. ErrorListener class Errors implements ErrorListener{...} System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl"); TransformerFactory tFactory = TransformerFactory.newInstance(); err = new Errors(xsl, path); tFactory.setErrorListener(err); This is very abbreviated code but covers the heart of the matter. Hmm. But maybe I'm wrong about this. Later on in the code before the transformer transform() method is called, I do err = new Errors(xsl, path); transformer.setErrorListener(err); Even later down I see; catch(Exception e){ // isError set by errorListener and avoid recursion on a bad error stylesheet if(isError && !xsl.equalsIgnoreCase(path + errorStyleSheet)){ transform(path + errorStyleSheet); } Which, in my case, starts another transform that reports the error to the browser through servletResponse. This only reports the first error which is usually the one I'm intereseted in as hundreds of subsequent errors may be reported but aren't of any interest. Now I'm starting to think that one chunk of code here is useless but I don't know which one. I use the identical code with Saxon 8.4 (yes, I actually use that version) and it does the same thing. If anyone can see something stupid I'm doing, I'd like to hear. HTH, Roger Kovack SourceForge.net wrote: Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=3205858 ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Template recursion, StackOverflowError, saxon:while a nd variable assignability: 00122, Andre Cusson |
|---|---|
| Next by Date: | Re: Template recursion, StackOverflowError, saxon:while a nd variable assignability: 00122, Dimitre Novatchev |
| Previous by Thread: | (no subject)i: 00122, W Jirapanthong |
| Next by Thread: | Re: Template recursion , StackOverflowError, saxon:while and variable assignability: 00122, Dimitre Novatchev |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |