[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Catching document() error in ErrorListener

Subject: RE: Catching document() error in ErrorListener
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 7 Apr 2004 22:25:21 +0100
xml error catching
> 	Using Xalan 2.5.0 I gave my TransformerFactory an ErrorListener.
> 
> 	Which works perfectly well... unless the error occurs in a file 
> brought in by document().  In which case the Xalan logs the error to 
> stderr and continues on as best it can - leaving no record of 
> the error 
> in the ErrorListener.
> 
> 	Am I missing something? What can I do to catch the errors?

Presumably this was an error detected and reported by the XML parser and not
by Xalan. If you want control over error handling by the XML parser you will
need to write a URIResolver that intercepts the call on document(), and
wraps the URI into a SAXSource along with an XMLReader configured with your
own SAX ErrorHandler.

Michael Kay

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.