[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: document() function - friendly error message when
Hi Ovidiu,
What a coincidence: for the past few days we happen to have being discussing this very thing (though, more generic, about URI escaping and wrong URI references), see More meaningful error for "Fatal error during transformation: null" on the Saxon list. Alas, that is about XSLT 2. You use MSXML, thus limited to XSLT 1. And XSLT 1 does not provide such function (nor does XPath 1 for that matter). You can use msxsl:script, I suppose. If it supports normal JavaScript of VBScript (I never used msxml), I reckon you can employ the XMLHttpRequest object to try to load the file. If it returns a 404 (or any 4xx error), it is not there and you can act accordingly. Note, however, that this requires two times requesting the file: 1x for the XHR, and 1x for XSLT document(). Cheers, -- Abel Braaksma http://www.nuntia.nl Ovidiu Cotarlea wrote: 1. Hi, Is there any way to catch the error that the
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|