From: Adam Retter [mailto:Adam.Retter@landmark.co.uk]
Sent: 02 February 2009 15:08
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: [saxon] throw SAXException from XMLFilterImpl?
I am using Saxon 18.104.22.168 with Java 6 on Windows XP.
I have an XMLFilterImpl from which I wish to be able to abort processing of the input document under certain circumstances, I then wish to log this event.
I have extended SAXException with my own exception class SkipProcessingException, which I throw from XMLFilterImpl.endElement() under certain circumstances.
For my transform I have something like –
if(xpe.getException() instanceof SkipProcessingException)
//log that we skipped this one
I am unable to get back details of my SkipProcessingException, looking at line 413 of net.sf.saxon.event.Sender, I am wondering why it is that in the first case it doesn’t reference the SAXException (line 415) and in the second case it does line 418.
Is there something that I can do, so that I can receive the underlying SAXException from the XPathException?