The XSLT specification has always said that the document() and doc() functions MAY throw a dynamic error when the document cannot be loaded from the URL (e.g. 404 not found) and in the browser's XSLT processors as well as Saxon (the version I keep using even after a decade is 8.1.1) usually that has all been that way. But now trying Saxon-JS, I see an exception is thrown. Now I need to use the new fn:doc-available function which, however, isn't in XSLT/XPath 2.0! So I have to break my backward compatibility of my XSLT code because of that new super-strict behavior.
Is there some option in Saxon-JS where the old behavior of fn:document can be selected as an option?
doc-availablein XPath 2 and later. I don't see how the use of Saxon 8.1.1, some version of Saxon from before even XSLT 2 became a W3C standard, is relevant to claim that "XSLT 2.0" did not throw an error. And Saxon-JS is not based on Saxon Java 8.1.1 or Saxon Java at all, so I don't understand the request to select the "old behaviour".