xsl:result-document expects a URI, and as you say, # is not valid (or has special meaning) in a URI. You could try escaping it as %23, but somehow I suspect you would end up with a filename containing %23 rather than one containing #.
In Saxon you can register an OutputURIResolver which is called to process the URI supplied to xsl:result-document. For example you could subclass the StandardOutputResolver, overriding its makeOutputFile() method to unescape %23 (and optionally other escape sequences) found in the URI.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|