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

RE: [XSLT 2] rescue

Subject: RE: [XSLT 2] rescue
From: "Varley, Roger" <Roger.Varley@xxxxxxxxxxx>
Date: Tue, 17 Jun 2003 16:33:30 +0100
RE:  [XSLT 2] rescue
> If my XSLT application, running without supervision (eg on 
> the server), 
> gets fed a document which references a non-existent file, then my 
> application must be able to deal with that; It is 
> unacceptable to abort 
> the whole transformation. Since I'm not aware of any 
> facilities to test 
> for the existence of files (validity of paths/URIs), I need a way to 
> recover from the currently unfortunately fatal error raised after a 
> failed unparsed-text().
> 

Delegate the decision. I solved this by removing any direct reference to a
path and instead referenced a servlet in the document() function passing the
path as a parameter. The servlet becomes responsible for opening the
resource and passing the XML back in the HttpOutputStream. If the resource
cannot be found, the servlet returns a valid, but empty XML file.

Regards
Roger

 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.