The spec says: "If there is an error retrieving the resource, then the
XSLT processor may signal an error; if it does not signal an error, it
must recover by returning an empty node-set."
[http://www.w3.org/TR/xslt#function-document]
I though that there is some "feature" or "property" that I can set in
order to get that recovery.
Adrian.
Santiago Pericas-Geertsen wrote:
Adrian,
Have you tried using a URIResolver [1]? That should give you some
control over how the processor resolves external references. For
example, you could return an "empty" Source when a resource isn't
available or something like that.
-- Santiago
[1] http://java.sun.com/j2se/1.5.0/docs/api/
On Jun 17, 2007, at 5:45 PM, Adrian Herscu wrote:
Hi all,
I need to implement a validator in which one of its rules must check
the existence of external documents. In case that an external document
does not exist, a message should be created and the validation should
continue. I couldn't find a way to make the XSLT engine continue after
a FileNotFoundException has been thrown :-(
Is it possible to recover from a call to the document() function which
has failed?
Adrian.