I want to do a XSLT transformation with multiple output files. There for I used \"xsl:result-document\". When the transformation fails, all output files should be deleted. But i
I suspect you have uncovered a bug. I've logged it here: please track it for a resolution.
https://saxonica.plan.io/issues/1857
You could work around the problem by registering your own OutputURIResolver (perhaps based on the standard one) which keeps track of all open output streams and has the ability to be called directly by the application to close them at the end.